ip address changed Results


Page 5 of 13.
Results 81...100 of 250

Sponsored Links:



I'm having a connection issue with my new computer running Windows 7 Professional x64. When I first set it up, the wireless connection worked flawlessly, and then the next day the internet cut out and has not connected since (currently 2 days). Note that I can still connect to the Network, it is just the internet connection that is the issue. Other computers and devices can still connect to the network and internet, and as a temp fix I am using a wired connection to the same router.

My router is a Dynalink RTA1025W Rev2 using WPA2-Personal security, and my computer has a 802.11n Wireless LAN Card.

I have searched through many forum threads, and tried the following suggestions:
Release / Renew the IPFlushing the DNSCreating a static IP addressUpdating the wireless driverUninstalling / re-installing the network card / driverResetting the modem/routerResetting the computerDisabling the firewallChanging the security type (tried WEP and none)System restoring the computerWiping the computer back to it's original state
I've probably tried a couple more things that have now slipped to the back of my mind in the many hours of frustration which I have encountered. None of the above have worked, even temporarily.

I have also attempted to connect to a neighbor's unsecured wireless network, however I was also unsuccessful with that.

If anyone can offer any further suggestions or help to my situation it would be greatly appreciated, as I'm quite stuck and am unsure on how to resolve. If you need more just let me know and I will be happy to provide it.




Hi all,

I came to this forum in order to get a solution for my problem. As many know and some would know now, when the drivers are not available for Windows 7, the NIC will just return a APIPA i.e., 169.x.x.x IP. We all thought this is a driver issue, but how do we find whether it is a driver issue or setting issue? Follow these simple steps.
1. Ping 127.0.0.1, if you get success replies, then your NIC is working fine, rule out the driver issue.
2. If failure reply, then you can try searching for the best drivers and then give it a go. Or, you can fix the TCP/IP stack or fix the socket issue.

Fixing corrupt TCP/IP stack,
netsh int ip reset resetlog.txt

Fixing socket issue,
netsh winsock reset

Let me now come to the problem I was facing and the fix that worked.

I have tried all the steps which every1 wil do when they encounter APIPA. Nothing worked. Then one of our fellow member(Acestes) asked me to ping 127.0.0.1 and check. This gave me success reply. So, this made me think in a different way, rather than the old driver issue.

Then went to Netgear website and studied the basic difference of FA311 v1 and v2. Then went to driversguide website, downloaded a bunch of drivers which included MacPhyter too.

Tried installing all the various drivers, nothing worked. From driversguide I got one set of driver with the name drivers.zip. The description told that it is the extract of the CD given by Netgear. When I tried installing this, in DM, under NA, it showed, Netgear FA311 Fast PCI Adapter. This is the correct version of my NIC.

When I tried the others, it would show, Netgear FA311/FA312 PCI Adapter. This is not the right version of my NIC. Okay, now I have got the right drivers installed and again pinged 127, success. Tried ipconfig, same 169. Set a static IP, but stil no internet.

Tried to refresh my networking knowledge and started this process.

Went to DM, right clicked on my NIC, Selected properties. Then Clicked Advanced, Under the property, there were 3 entries,
1. Network Address - Not present selected
2. Speed & Duplex settings - Auto sense
3. Transmit buffers - 160

Went to Power Management,
Both the check boxes were selected.

When I went to Netgear website, the v1 doesnt support wake-on LAN and it has a speed of 100Tx.

So, In Advanced tab, Selected Speed & Duplex settings, selected 100Tx in the place of Auto sense.
Went to Power Management, Unchecked both the check boxes. Clicked Ok.

Went to command prompt, ipconfig..

VOILA!!!!!! Got my DHCP IP address.

Opened IE8, flashed the MSN webpage.

Finally, internet had a taste of my Windows 7 RC 7100.

Still I do not know which setting change made it to work, either Advanced or Power management, but got it to work.

Happy now.

Hope all the users of this forum and other people having the same problem be happy with this solution.

Try it and check.

Note: If somebody needs that drivers.zip, request here, will upload or send it to them. If some1 needs screenshots, let me know, will take and post it.




Hi all,

I'm having a problem getting my laptop connected to some wireless networks. I can connect to the wireless connections at work and home without issues, but I'm currently house sitting for my parents and unable to connect to theirs. Apparently I have 'Limited Connectivity' on an 'Unidentifed Network.

DHCP works and is issuing an IP address (plus gateway and dns), but when I try to ping anything on the network I get 'destination host unreachable'. I've tried using a valid static IP and it's no different. I've tried using the Win7 troubleshooting tool and it's complaining that it can't connect to the gateway. I've reset and reconfigured the wireless router but that hasn't helped either. I can connect to this network fine with my phone and an old vista laptop.

Below is the output of ifconfig /all (using DHCP)Windows IP Configuration

Host Name . . . . . . . . . . . . : Dan-Laptop
Primary Dns Suffix . . . . . . . :
Node Type . . . . . . . . . . . . : Broadcast
IP Routing Enabled. . . . . . . . : No
WINS Proxy Enabled. . . . . . . . : No
DNS Suffix Search List . . . . . . : home

Wireless LAN adapter Wireless Network Connection:

Connection-specific DNS Suffix . : home
Description . . . . . . . . . . . : Intel(R) Centrino (R) Advanced-N 6200 AGN
Physical Address. . . . . . . . . : 00-23-14-07-81-88
DHCP Enabled. . . . . . . . . . . : Yes
Autoconfiguration Enabled . . . . : Yes
IPv4 Address. . : 192.168.1.7(Preferred)
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Lease Obtained . . . . . . : 01 May 2011 11:52:08
Lease Expires . . . . . . : 02 May 2011 11:52:07
Default Gateway . . . . . . . . . : 192.168.1.1
DHCP Server . . . . . . : 192.168.1.1
DNS Servers . . . . . . : 192.168.1.1
NetBIOS over Tcpip. . . . . . . . : Enabled
I'm running 64bit Win7 Ultimate and the wireless device is an Engenius Senao LR Multi-Client Bridge. I have already reloaded my laptop - there is now no software installed other than Photoshop, Office and Inkscape. I have no software firewall and no anti-virus. I've tried changing the wireless mode to 802.11g, but that didn't work. Bonjour doesn't seem to be installed. I've cleared down all of the known networks as well.

Any suggestions? Thanks in advance!




Hi,
I have a wired desktop PC running windows seven home premium. For 12 months my PC connected to my netgear router flawlessly.

a month ago my partner bought a macbook pro (boo) and also connected to this router using network cable without a problem.

2 weeks ago my PC started behaving funnily, in that it would have no connection on startup or sometimes when waking up. During this time the macbook would connect as normal.

Now it just will not connect at all.

Other laptops can connect using the exact same cable as my PC.

I took my PC to the only computer store in my small town who said that it took them 30 seconds to 'fix' and that IE and firefox worked as well as world of warcraft launcher. So it obviously connects to other networks.

I cheered and bought it home and alas, the exact same problem. I have attempted to follow the direction of this post: wired pc won't connect with router and change settings in the properties of my network adapter but i get this message: ".... controls on this property sheet are disable because..... other network property sheets are already open" and i have nothing else open. Also, W7 continuously attempts to restore the connection, fails, and tries again.

I ran /ipconfig all and it shows the server name of the computer store in the DNS suffix list. The default gateway entry is blank and i cant see an IP address entry.

Is this a W7 problem or should i be looking elsewhere?
Please help, im at my wits end.




Hello to all,

I hope someone can help with this major printer problem. If this is not the correct area for this post, I apologize in advance please point me to where I should be, Thanks. Here is my problem: Ive got a Windows 7 Acer Aspire Laptop, 64 bit, Epson R280 printer, Apple Airport Extreme. I downloaded the latest drivers from Epson and Bonjour for Windows. Ive hooked the Epson directly to the Acer and have been printing with no problems what so ever. The problem comes when trying to print wirelessly through the airport. It was working fine a few months ago then just started acting up. I would hit print, it would print maybe one page, then start the second page and get hung up in the middle, now it will get hung up at the end of a first page. Lights are all flashing on the printer, “See whats printing” is showing an error message. Its all quit maddening.

Things Ive done: Uninstalled, installed, reinstalled, used the original software disk, uninstalled, and reinstalled using just the current driver, uninstalled and reinstalled Bonjour. Noda! Ive changed IP addresses, port numbers, added printers, turned off bio directional printing, added new ports, deleted new ports, added and deleted new LPT ports. Ive tried everything I have found on the web that has worked for others but not for me. Absolutely nothing Ive tried works. Im getting beyond ticked and ready to throw the damned thing out. What irritates me the most is that it was working at one point. So what changed, Ive added nothing else, what could it be?? Im very stubborn, which is why I haven’t pitch this sucker. I feel Im missing something and my stubbornness is blinding me to what it is..

Any and all advice is so gratefully accepted and needed. Also, Im PLEADING AND BEGGING SOMEONE FOR HELP……………

Thank you all so much in advance. Mac




The installation on a SATA hard disk [ Seagate SATA 11 500GB HDD :ST3500410 SATA] with Windows VISTA X32 on partition 1 (200GB) after paritioning the free space was very easy ( similar to VISTA and better than XP) and rather fast in my System built on a PCChips P55G Motherboard , Intel Dual Core CPU E2160 1.80 GHz and 4 GB ( 2x2) DDR2 667[PC2 5300] G.Skill heat-spreader RAM, Encore 802.11g Wireless PCI adapter ENLWI-G2 and Hybrid wired -wireless Buffalo AirStation model WHR-G 125 router. I anticipated problem with my Wireless PCI adapter and therefore did not accept the prompt to start my Wireless Network setup for automatic mode offered during the install and waited till the setup was succesfully accomplished at much faster rate than WinXP and probably equal to or better than VISTA x32. Although the setup had automatically installed all the drivers for the integrated devices like video, audio, LAN and IDE and sata controllers on my PCChips P55G motherboard, and even the Encore wireles adapter with its Realtek 8185 Extensible 802.1b/g Wireless Device driver , the Smb had a yellow flag. To my pleasant surprise the system was happy to load the x64 VISTA driver from PChips' Version N-5.00 Motherboard software CD by just dropping it into the optical drive and pointing the device manager to the drtive letter. It took probably less than 20 seconds for "Successful driver installation" and the disappearance of the yellow exclammation point from the Device Manager. The Wireless adapter although showed no problem in the DM ["device is working properly" in its Properties] and my Homenetwork name was seen as "connencted" in the wireless Configuration , [ Open Network and Sharing Center], Internet connection failed was the message and IE would not open any webpages when launched and IPCONFIG >>>>no IP address either. I attempted to update the driver using the ENCORE software CD I had although it had only VISTA x64 driver. To my pleasant surprise that too was easily accepted and installed by Windows 7 and suddenly there was spontaneous activity on the Taskbar ["system Tray] Open Network and Sharing Center icon showing My Network -"Internet access". Very soon the computers in my home network took their proper places along with this new Windows 7 system [ like the My Network Places in XP under Workgroup]. I had previously changed the Workgroup name of the new system to that of the existing one. IE 7 was launched and sudenly the "Send feed back " icon appeared on my desktop. I am very very pleased so far. I could easily connect to my EPSON Stylus Photo R 380 Photo Printer attached to a WinXP x64 PC without any problem . It used the VISTA X64 drv and its icon was promptly on my system tray. I am going to try and "stress" the system with additional hardware and software install to see what works and what does not and be happy to post my experience here for the benefit of others.

Microsoft LifeCam VX 3000 WebCam failed to install properly using the Vista x64 driver and also a driver the Windows 7 troubleshooter prompted me to download and install from MS. The Camera seems to install with the message "USB device installed and ready to use" appearing in the system tray ("notification area") but when the LiveCam icon is clicked I get the message "Camera is not connected" . After several repeated uninstall /reinstall routine I called it quits. I had no problem installing a logitech USB headset.

I had no problem installing the following applications:
7Zip 64 bits, Antivir (free) Personal Antivirus, CCleaner, Auslogic Defrag, Paint Dot Net, ImgBurn, Windows Live Messenger ver 2009, Yahoo Messenger 9.0.0.2136, Adobe Reader 9. skype 4.0.




I have Dell Studio 14 with i5 processor with window 7 OS, realtek network adapters

Whenever i tried to connect to internet(Airtel Broadband) through ethernet cable. It shows unidentified network no internet access, but when i use wireless connection it established.

I have done all the following things...

1.. i use ipconfig /all i found that no address for default gateway & my subnet mask 255.255.0.0. After that i manully set the ip address, subnet mask & default gatway like this...

ip address : 192.168.24.8subnet mask : 255.255.255.0default gateway : 192.168.1.1dns server : 192.168.1.2alternate dns server : 203.145.184.32

This all are under IPv4.. after that i again use ipconfig /all all settings are displayed which i have changed.

but the problem still persisted. After that i use netsh winsock reset catalog & it prompted to restart & i did restart the computer.. Again ipconfig /all & same details appear with all changes i have done manually but problem not resolved. After that i also turnoff the firewall uninstalled the antiviruse & restart. but again same problem "no internet access"..

i also use the ipconfig /release.. but an error is occured
loopback Pseudo-interface 1 - the system cant find the file specified"... I have checked the BIOS also for NIC which is enabled

I have again reinstalled the all driver for my dell laptop & problem still there. & there is No Bounjour installed ...Whatever it is ... When i troubleshoot the problem through Window 7 method it show (i don't know the exact but it is something like this)
"Invalid IP address for Lan configuration."

What do i do now..????

Please give me a solution.




In a race to optimize everything, developers often go to extremes to build software that performs routine tasks. MissionControl is a system that allows users to program a control center that stores interfaces with attached hardware sensors, allowing the users to control any other devices that can be activated via the underlying protocol. For demo purposes, the MissionControl build at this point is compatible with the Phidgets IR hybrid sensor.
The system has two core components:

A server application, which is a Win32 console application that handles incoming queries and returns data to the connected clients. This application runs on the desktop machine with the connected sensor.The Windows Phone application that sends requests to the target server and can trigger a variety of pre-programmed commands.
The Basics

Hardware and Communication Infrastructure

One of the most important parts of the project is the signal capture and replication hardware. For the purposes of this project, I decided to use a dual-mode Phidgets IR sensor. It supports both IR code capture and subsequent replication. From a user’s perspective, this device also eliminates a substantial code-learning overhead as well as the potential error rate. Instead of searching for a device-specific hexadecimal sequence that later has to be transformed in a working IR code, the user simply has to point his remote control at the sensor and press the button that he wants accessible from a mobile device. Given that the capturing software is running on the target machine, once the sensor detects that a code can be repeated within an acceptable precision range, it will be automatically captured and stored, with all required transformations worked out in the backend using the free Phidgets SDK.

Even though I can, I don’t have to handle the binary code content received through the sensor—the Phidgets .NET libraries carry built-in types that contain all the processed metadata that I will discuss later in this article.
This sensor is connected through a USB port to a machine that acts as a communication gateway. This server should have port 6169 open for inbound connections.
NOTE: The port number can be changed, but you have to keep it consistent between your server and client applications.
The communication between the phone and the computer running the client is performed via a TCP channel—sockets are used to perform the initial connections and serialized data transfer. You can see the generalized data flow between the devices that are involved in the procedure in the graphic below:

The server (desktop client) handles the local storage and release of all incoming IR codes. The mobile client has to know the location of the server—once specified and confirmed, it can send one of the pre-defined commands to it and either query the server for existing command groups (sets) or invoke one of the stored IR codes. When I pass data between devices, I use JSON for the serializable components. The data is also processed before being sent in order to speed-up the process—for example, on the server side the sets are serialized together with the associated codes. Like this:

[
{
"Name":"batman",
"IsList":false,
"Commands":[
{
"Name":"test command",
"Code":{
"Mask":{
"BitSize":12,
"CodeData":"AAA="
},
"BitSize":12,
"Encoding":2,
"CarrierFrequency":38000,
"DutyCycle":50,
"Gap":44761,
"Header":[
2374,
606
],
"CodeData":"DJA=",
"MinRepeat":5,
"One":[
1189,
606
],
"Repeat":null,
"Trail":0,
"Zero":[
582,
606
]
}
},
{
"Name":"turn off",
"Code":{
"Mask":{
"BitSize":12,
"CodeData":"AAA="
},
"BitSize":12,
"Encoding":2,
"CarrierFrequency":38000,
"DutyCycle":50,
"Gap":44770,
"Header":[
2360,
613
],
"CodeData":"DJA=",
"MinRepeat":5,
"One":[
1169,
613
],
"Repeat":null,
"Trail":0,
"Zero":[
585,
613
]
}
}
]
}
]

The inherent problem with the JSON data above is the fact that the phone client does not need the information related to the code binary sequence and all the metadata that goes with it. So it is effectively stripped down and reduced to the names of the sets (when a list of sets is requested) and commands (when a list of commands is requested).
The Data Model

As you saw from the description above, the server organizes individual infrared codes in sets. A single set is a bundle of codes that may or may not be related to each other—ultimately, this is the user’s decision. A good example of using sets is organizing IR commands by rooms, devices or code types. Each set has a unique name on the server, therefore eliminating the possibility of a request conflict.
Each set stores individual commands built around the Command model:

namespace Coding4Fun.MissionControl.API.Models
{
public class Command
{
public Command()
{
}

public string Name { get; set; }
public SerializableIRCode Code { get; set; }
}
}

Despite the obvious Name property, you can see that I am using a SerializableIRCode instance that is specific to each model. Before going any further, I need to mention that the Phidgets SDK offers the IRLearnedCode model to store code contents. I could have used it instead, but there is an issue that prevents me from doing that—there is no public constructor defined for IRLearnedCode, therefore there is no way to serialize it, either with the built-in .NET serialization capabilities or JSON.NET, which I am using in the context of the project.
Instead, I have this:

using Phidgets;
namespace Coding4Fun.MissionControl.API.Models
{
public class SerializableIRCode
{
public SerializableIRCode()
{

}

IRLearnedCode code;
public ToggleMask Mask { get; set; }
public int BitSize { get; set; }
public Phidgets.IRCodeInfo.IREncoding Encoding { get; set; }
public int CarrierFrequency { get; set; }
public int DutyCycle { get; set; }
public int Gap { get; set; }
public int[] Header { get; set; }
public byte[] CodeData { get; set; }
public int MinRepeat { get; set; }
public int[] One { get; set; }
public int[] Repeat { get; set; }
public int Trail { get; set; }
public int[] Zero { get; set; }
}
}

It is an almost identical 1:1 copy of the original class, storing both the layout of the IR code and additional information related to its replication mechanism. You can learn more about each property listed in the model above by reading the official document on the topic.
ToggleMask, the identity bit carrier that helps marking the code as repeated or not, is also implemented through a built-in Phidgets SDK model, and it has the same problem as IRLearnedCode. I implemented this model to replace it in the serializable code:

namespace Coding4Fun.MissionControl.API.Models
{
public class ToggleMask
{
public ToggleMask()
{

}

public int BitSize { get; set; }
public byte[] CodeData { get; set; }
}
}

I also needed an easy way to store all sets at once and carry all associated codes in a single instance retrieved from the storage. Here is the Set class:

namespace Coding4Fun.MissionControl.API.Models
{
public class Set
{
public Set()
{
Commands = new List();
}

public string Name { get; set; }
public bool IsList { get; set; }
public List Commands { get; set; }
}
}

Notice that there is an IsList flag that allows me to specify how to display this specific list on the connecting device. This adds some level of flexibility for situations where the user wants to build a virtual remote for closely-related keys, such as digits. With that in mind, displaying those as a list might be inconvenient, wasting visual space on the client. But if the flag is set to false, the list can be displayed as a pad.
Also, when the server performs the data exchange, it provides a single “envelope” that allows the connecting device to easily understand what the server is trying to do:

namespace Coding4Fun.MissionControl.API.Models
{
public class ServerResponse
{
public string Identifier { get; set; }
public string Marker { get; set; }
public string Content { get; set; }
}
}

The Identifier property carries the server IP address. That way, when a device receives a response, it is able to either accept it, because it knows that a response is requested from a target location, or discard it because the user is no longer using the specific server.
Marker carries the command type of the sent command, therefore giving the Windows Phone application a hint as to what to do with the data. The server can send the following commands:

SET_LIST – returns the list of sets that are currently available on the server.SET_COMMANDS:SET_NAME:IS_LIST – returns the list of commands that are associated with a given set that is currently stored on the server.NOTIFICATION – send a simple notification to the client; no further action is required.
Last but not least, Content is used to push the necessary data that is associated with the given Marker. It can be either a JSON-based string that lists the sets or commands, or a plain-text message that is used as an alert for the end-user.
Server Architecture

The server is the only component of this entire system that does all the heavy lifting. It learns commands, stores them and then generates new IR signal requests, as controlled from any of the connected clients. Let’s take a closer look at what happens behind the scenes—to start, I am going to document the network infrastructure.
The Network Layer

In order to be a reliable system, the server needs to be always ready to accept an incoming connection. For that purpose, it is possible to use the TcpListener class—an “always on” receiver that can handle incoming TCP connections. I integrated it in my CoreStarter class that is used to start the listener when the application is launched:

namespace Coding4Fun.MissionControl.API
{
public class CoreStarter
{
static TcpListener listener;

public static void LaunchSocket()
{
Console.WriteLine("Starting socket server on port {0}...", Constants.DEFAULT_PORT);
listener = new TcpListener(NetworkHelper.GetLocalIPAddress(), Constants.DEFAULT_PORT);
listener.Start();

for (int i = 0; i < Constants.MAX_CONCURRENT_CLIENTS; i++)
{
Thread socketThread = new Thread(new ThreadStart(ListenForData));
socketThread.Start();
}
}

private static void ListenForData()
{
Console.WriteLine("Listener thread started.");

while (true)
{
Socket acceptedSocket = listener.AcceptSocket();
using (MemoryStream coreStream = new MemoryStream())
{
try
{
Console.WriteLine("Incoming connection: {0}", acceptedSocket.RemoteEndPoint);

using (Stream sourceStream = new NetworkStream(acceptedSocket))
{
sourceStream.ReadTimeout = Constants.SOCKET_READ_TIMEOUT;

byte[] buffer = new byte[Constants.DEFAULT_BUFFER_SIZE];
int i;

while ((i = sourceStream.Read(buffer, 0, buffer.Length)) != 0)
{
coreStream.Write(buffer, 0, i);
}
}
}
catch
{
string data = Encoding.ASCII.GetString(coreStream.ToArray());

CommandHelper.InterpretCommand(data, acceptedSocket.RemoteEndPoint.ToString());
}
}
}
}
}
}

When LaunchSocket is called, the listener is activated on the current machine. As I mentioned above, the port number can be arbitrarily assigned, but has to be consistent between connecting apps in order for the TCP links to be established. Because I expect that more than one device will be connecting to the service at a time, the listener is set as active across a constant number of threads.
NOTE: By default, a there is a maximum limit of 5 simultaneous clients. Although this number can be adjusted, be aware of the requirements of each environment in which a limited number of potential devices can connect. Even though the performance footprint of each thread is minimal, it can have a negative effect if used in unnecessarily large instances.
ListenForData is used to read the incoming stream. When an inbound connection is accepted, the data is read with the help of a fixed content buffer. Then a read timeout is specified to prevent situations where the stream was completely read but the application still waits to pull non-existent data. Once the timeout milestone is hit, an exception is thrown, which marks the end of the stream—at this point, the plain text data that was received (remember that both the server and client exchange text data only) is passed to the command interpreter—CommandHelper, with a reference to the source of the command.
The commands from the device are passed as serialized key-value pairs (KeyValuePair), the key being the command with any possible suffixes, and the value being the contents of the command itself that helps the server identify the specific item in the local storage.
InterpretCommand,in this case, does three things sequentially:

Deserialize the incoming string and create a KeyValuePair instance.Process the command and check whether it is recognizable.Send a response to the client, if deemed necessary by the command type.
The serialization and deserialization is done via JSON.NET. You can install this package in your console managed Win32 project and the Windows Phone application project via NuGet:

The deserialization step is as simple as one line of C# code:

KeyValuePair result = JsonConvert.DeserializeObject(rawCommand.Remove(0, rawCommand.IndexOf('{')));

The string is sanitized to ensure that only JSON content is being passed to the serializer.
Because of a relatively limited command set, I can put together the entire interpretation stack like this:

// Get the initial list of sets on the target server
if (result.Key == Constants.COMMAND_INIT)
{
SendSets(sourceLocation);
}
// Create a new set on the target server
else if (result.Key.Contains(Constants.COMMAND_CREATE_SET))
{
CreateSet(result, sourceLocation);
SendSets(sourceLocation);
}
// Get the commands that are associated with a given set.
else if (result.Key == Constants.COMMAND_GET_COMMANDS)
{
SendCommands(result.Value, sourceLocation);
}
// The client requested the server to learn a new command.
else if (result.Key.Contains(Constants.COMMAND_LEARN_COMMAND))
{
LearnCommand(result, sourceLocation);
}
// The client requested one of the commands to be executed on the
// target server.
else if (result.Key.Contains(Constants.COMMAND_EXECUTE))
{
ExecuteCommand(result);
}
// The client has requested a set to be deleted from the target server.
else if (result.Key == Constants.COMMAND_DELETE_SET)
{
DeleteSet(result.Value);
SendSets(sourceLocation);
}
// The client has requested a set to be deleted from the target server.
else if (result.Key.Contains(Constants.COMMAND_DELETE_COMMAND))
{
DeleteCommand(result);
SendCommands(result.Key.Split(new char[] { ':' })[1], sourceLocation);
}

All commands are constants, declared in the local helper class:

public const string COMMAND_INIT = "INIT";

public const string COMMAND_CREATE_SET = "CREATE_SET";

public const string COMMAND_GET_COMMANDS = "GET_COMMANDS";

public const string COMMAND_LEARN_COMMAND = "LEARN_COMMAND";

public const string COMMAND_EXECUTE = "EXECUTE";

public const string COMMAND_DELETE_SET = "DELETE_SET";
public const string COMMAND_DELETE_COMMAND = "DELETE_COMMAND";

Notice that these are not the commands that the server sends back, but rather the commands it receives from connecting Windows Phone devices.
Let’s now take a look at the breakdown for each command.
SendSets:

///
/// Send the list of sets to the client that requested those.
///
///
The location of the requesting client.
private static void SendSets(string sourceLocation)
{
Console.WriteLine("Received an initial set query from {0}", sourceLocation);
ServerResponse response = new ServerResponse();
response.Marker = "SET_LIST";
response.Content = JsonConvert.SerializeObject(StorageHelper.GetRawSetNames());
response.Identifier = NetworkHelper.GetLocalIPAddress().ToString();
NetworkHelper.SendData(sourceLocation, JsonConvert.SerializeObject(response));
Console.WriteLine("Sent the set list to {0}", sourceLocation);
}
When this command is received, the server does not have to do much processing. It is only invoked when the client establishes the initiating link and needs to know what possible sets it can get from the target machine. The request is logged in the console and a server response is prepared that contains a serialized list of set names, which is later serialized as well and sent back to the source machine location.
StorageHelper and NetworkHelper will be documented later in this article.
CreateSet:

///
/// Create a new set and store it on the local server.
///
///
The original deserialized command.
///
The location of the requesting client.
private static void CreateSet(KeyValuePair result, string sourceLocation)
{
bool isSuccessful = false;
string[] data = result.Key.Split(new char[] { ':' });

Console.WriteLine("There is an attempt to create the {0} set from {1}.", result.Value, sourceLocation);

if (data[1].ToLower() == "list")
isSuccessful = StorageHelper.AddSet(result.Value);
else
isSuccessful = StorageHelper.AddSet(result.Value, false);

if (isSuccessful)
Console.WriteLine("The {0} set was successfully created.", result.Value);
else
Console.WriteLine("Something happened and the {0} set was not created.", result.Value);
}
When a mobile device attempts to create a new set on the server, it sends a command in the following format:
CREATE_SET:list/pad, SET_NAME
CreateSet will get the type of the set that was created, will check whether a set with the same name already exists and will either create it or ignore the command altogether. No notification is sent to the connecting device, but either the failure or the success of the command is registered in the local console.
SendCommands:

///
/// Send a list of commands that are associated with the pushed set.
///
///
The original deserialized command.
///
The location of the requesting client.
private static void SendCommands(string setName, string sourceLocation)
{
Console.WriteLine("There was a request to get the commands for the {0} set from {1}.", setName, sourceLocation);

bool isList = StorageHelper.IsSetAList(setName);

ServerResponse response = new ServerResponse();
response.Marker = string.Format("SET_COMMANDS:{0}:{1}", setName, isList);
response.Identifier = NetworkHelper.GetLocalIPAddress().ToString();
response.Content = JsonConvert.SerializeObject(StorageHelper.GetRawCommandNames(setName));

NetworkHelper.SendData(sourceLocation, JsonConvert.SerializeObject(response));

Console.WriteLine("Command list for the {0} set were sent to {1}.", setName, sourceLocation);
}
Commands are sent in the same manner as sets—once the set is recognized, the names of the associated commands are retrieved and serialized inside a ServerResponse instance and then pushed back to the requesting device.
LearnCommand:

///
/// Learn a new command and store it on the target server.
///
///
The original deserialized command.
///
The location of the requesting client.
private static void LearnCommand(KeyValuePair result, string sourceLocation)
{
Console.WriteLine("[!] Server in COMMAND LEARNING MODE! Point the remote towards the sensor and send a command.");

string[] data = result.Key.Split(new char[] { ':' });
var set = StorageHelper.GetSingleSet(StorageHelper.GetSets(), data[1]);

if (set != null)
{
if ((from c in set.Commands where c.Name == result.Value select c).FirstOrDefault() != null)
{
Console.WriteLine("Cannot learn command {0} for the following set: {1}. Command already exists.", data[1], result.Value);

ServerResponse response = new ServerResponse();
response.Marker = "NOTIFICATION";
response.Identifier = NetworkHelper.GetLocalIPAddress().ToString();
response.Content = "We could not save the following command - " + result.Value + ". It already exists in the set.";

NetworkHelper.SendData(sourceLocation, JsonConvert.SerializeObject(response));
}
else
{
if (sensor == null)
sensor = new IR();

sensor.open(-1);

sensor.waitForAttachment();

sensor.Learn += (sender, args) =>
{
Console.WriteLine("[!] Server learned the command and is no longer in COMMAND LEARNING MODE.");
IRLearnedCode code = args.LearnedCode;
code.CodeInfo.MinRepeat = 5;

Command command = new Command();
command.Name = result.Value;
command.Code = IRCodeWorker.GetSerializableIRCode(code);

StorageHelper.AddCommand(command, set.Name);

ServerResponse response = new ServerResponse();
response.Marker = "NOTIFICATION";
response.Identifier = NetworkHelper.GetLocalIPAddress().ToString();
response.Content = "The following command has been stored: " + result.Value;

NetworkHelper.SendData(sourceLocation, JsonConvert.SerializeObject(response));
};
}
}
}
Once a request was received that the server needs to learn a new command, an initial verification is done to make sure that the requested command name and set are not already taken. If neither the command nor the set exist, both will be created.
After the basic setup is complete, the IR sensor is activated and will be waiting for the command to be learned. The way it works is quite simple – the sensor will remain in learning mode until the point where it recognizes a command without error, being 100% sure that it can be reproduced internally. You will need to point your remote towards the sensor and hold the button you want captured for one or two seconds in order for the command to be learned.
NOTE: To ensure that a proper transmission is done, I manually set the minimal repeat value to 5. This is the number of times the sensor will fire the same code towards the target. That is the optimal value for a target device to receive the code if the remote is pointed directly at it without necessarily triggering the same command twice or more.
After the command is learned, the code is processed and transformed into a serializable instance. The connecting client is then notified about whether the command was learned.
ExecuteCommand:

///
/// Execute one of the commands currently stored on the local server.
///
///
The original deserialized command.
private static void ExecuteCommand(KeyValuePair result)
{
string[] data = result.Key.Split(new char[] { ':' });

var set = StorageHelper.GetSingleSet(StorageHelper.GetSets(), data[1]);

if (set != null)
{
var command = StorageHelper.GetSingleCommand(StorageHelper.GetCommands(set.Name), result.Value);

IRLearnedCode code = IRCodeWorker.GetLearnedCode(command.Code);

if (sensor == null)
sensor = new IR();

sensor.open(-1);
sensor.waitForAttachment();
sensor.transmit(code.Code, code.CodeInfo);
sensor.close();
}
}
Command execution relies on the hardware sensor. The phone sends a command execution request in the following format:
EXECUTE:SET_NAME, COMMAND_NAME
Once the command is parsed out and found in the local storage, the IR code is transformed back to a model that is recognizable by the Phidgets SDK and transmitted towards the location where the sensor is pointed at the time of the execution.
DeleteSet:

///
/// Delete a single set and all the associated commands
///
///
The name of the set.
private static void DeleteSet(string target)
{
var sets = StorageHelper.GetSets();
var targetSet = StorageHelper.GetSingleSet(sets, target);

if (targetSet != null)
{
StorageHelper.RemoveSet(sets, targetSet);
}
}
When deleting a set, only the name of the set should be specified. The user will get a warning on the client side that requires a confirmation of the deletion. The server will blindly execute the command.
DeleteCommand:

private static void DeleteCommand(KeyValuePair result)
{
var sets = StorageHelper.GetSets();
string setName = result.Key.Split(new char[] {':'})[1];
var targetSet = StorageHelper.GetSingleSet(sets, setName);
var command = (from c in targetSet.Commands where c.Name == result.Value select c).FirstOrDefault();

if (command != null)
{
targetSet.Commands.Remove(command);
StorageHelper.SerializeSets(sets);
}
}

Not only can the user remove entire sets, but he can also target specific commands from a given set. Once a DELETE_COMMAND directive is recognized, the set name is parsed out from the original string, that follows the DELETE_COMMAND:SET_NAME, COMMAND_NAME format, and a simple LINQ query extracts the command instance, removes it and stores the set content on the local hard drive.
Notice that for some commands, particularly for set creation, deletion and command deletion, the server will return a list of the remaining items. The contents will be automatically updated on the devices, which will be waiting for that response. This measure was deliberately introduced to minimize the chances of a user triggering a command that was already deleted or trying to query a previously removed set.
Transforming Codes

You might have noticed that I am using IRCodeWorker.GetSerializableCodeType to transform a Phidgets SDK native IR code model into a serializable one. This is a helper function that performs a field copy of the existing object. Because of the differences in the model structure, it has to be done manually:

public static SerializableIRCode GetSerializableIRCode(IRLearnedCode code)
{
SerializableIRCode sCode = new SerializableIRCode();
sCode.BitSize = code.Code.BitCount;
sCode.Encoding = code.CodeInfo.Encoding;
sCode.CarrierFrequency = code.CodeInfo.CarrierFrequency;
sCode.CodeData = code.Code.Data;
sCode.DutyCycle = code.CodeInfo.DutyCycle;
sCode.Gap = code.CodeInfo.Gap;
sCode.Header = code.CodeInfo.Header;
sCode.MinRepeat = 5;
sCode.One = code.CodeInfo.One;
sCode.Repeat = code.CodeInfo.Repeat;
sCode.Trail = code.CodeInfo.Trail;
sCode.Zero = code.CodeInfo.Zero;
sCode.Mask = new ToggleMask()
{
BitSize = code.CodeInfo.ToggleMask.BitCount,
CodeData = code.CodeInfo.ToggleMask.Data
};

return sCode;
}

The reverse process is easier because I can pass each of the existing properties to the IRCodeInfo constructor. The only difference is the fact that I need to use Reflection to create an instance of IRLearnedCode because there is no public constructor defined and a dynamic object has to be created:

internal static IRLearnedCode GetLearnedCode(SerializableIRCode serializableIRCode)
{
IRCode code = new IRCode(serializableIRCode.CodeData, serializableIRCode.BitSize);
IRCodeInfo info = new IRCodeInfo(serializableIRCode.Encoding, serializableIRCode.BitSize, serializableIRCode.Header,
serializableIRCode.Zero, serializableIRCode.One, serializableIRCode.Trail, serializableIRCode.Gap, serializableIRCode.Repeat,
serializableIRCode.MinRepeat, serializableIRCode.Mask.CodeData, IRCodeInfo.IRCodeLength.Constant,
serializableIRCode.CarrierFrequency, serializableIRCode.DutyCycle);

object[] parameters = new object[] { code, info };

BindingFlags flags = BindingFlags.NonPublic | BindingFlags.Instance;
object instantType = Activator.CreateInstance(typeof(IRLearnedCode), flags, null, parameters, null);

return (IRLearnedCode)instantType;
}

Command and Set Management

Looking back at the code that I put together for the command interpreter, there is one class that does all local content manipulation—StorageHelper. This is a simple class that performs LINQ queries on set as well as command collections, and makes sure that all the changes are preserved in the sets.xml file in the application folder that is used as the only storage place for all the content that is being manipulated by the server.

namespace Coding4Fun.MissionControl.API.Helpers
{
public class StorageHelper
{

///
/// Lists all available sets that are currently stored on the server.
///
/// List of sets on the machine.
internal static List GetSets()
{
List sets = null;

string rawContent = GetRawSets();
sets = JsonConvert.DeserializeObject(rawContent);

return sets;
}

///
/// Returns the list of commands that are associated with the given set.
///
///
The name of the target set.
/// List of commands associated with the given set.
internal static List GetCommands(string setName)
{
List commandList = null;

var sets = GetSets();

Set singleSet = null;
if (sets != null)
singleSet = (from c in sets where c.Name == setName select c).FirstOrDefault();

if (singleSet != null)
{
commandList = singleSet.Commands;
}

return commandList;
}

///
/// Gets the list of names for the commands in the requested set.
///
///
The name of the target set.
/// List of commands associated with the given set.
internal static List GetRawCommandNames(string setName)
{
List commandList = GetCommands(setName);

List stringSet = null;

if (commandList != null)
{
stringSet = commandList.Select(x => x.Name).ToList();
}

return stringSet;
}

///
/// Get the list of names for all sets on the local server.
///
/// List of sets on the machine.
internal static List GetRawSetNames()
{
List sets = GetSets();

List stringSet = null;

if (sets != null)
{
stringSet = sets.Select(x => x.Name).ToList();
}

return stringSet;
}

///
/// Get the raw string contents of sets.xml. Should only be used in the
/// context of this class.
///
/// JSON string representing stored sets and commands.
internal static string GetRawSets()
{
string sets = string.Empty;

if (File.Exists("sets"))
{
using (StreamReader reader = new StreamReader(File.OpenRead("sets")))
{
sets = reader.ReadToEnd();
}
}
else
{
FileStream stream = File.Create("sets.xml");

stream.Close();
}

return sets;
}

///
/// Check whether a set is marked with a IsList flag.
///
///
The name of the target set.
/// TRUE - set is a list. FALSE - set is not a list.
internal static bool IsSetAList(string setName)
{
bool isList = true;
var sets = GetSets();
Set set = null;

if (sets != null)
set = (from c in sets where c.Name == setName select c).FirstOrDefault();

if (set != null)
isList = set.IsList;

return isList;
}

///
/// Serialize the set collection to sets.xml
///
///
Collection to be serialized.
/// true if sets are serialized.
private static bool SerializeSets(List sets)
{
try
{
using (StreamWriter writer = new StreamWriter("sets.xml", false))
{
string data = JsonConvert.SerializeObject(sets);

writer.Write(data);
}

return true;
}
catch
{
return false;
}
}

///
/// Add a new set to the existing global set collection.
///
///
Set name.
/// true if successfully added set.
internal static bool AddSet(string name, bool isList = true)
{
var sets = GetSets();

if (sets == null)
sets = new List();

var singleSet = GetSingleSet(sets, name);

if (singleSet == null)
sets.Add(new Set { Name = name, IsList = isList });

if (SerializeSets(sets))
return true;
else
return false;
}

///
/// Retrieves a single set from a collection that has a specific name.
///
///
The source collection from which to extract the set.
///
The name of the set to get.
/// An instance of the found set, if any.
internal static Set GetSingleSet(List sets, string name)
{
if (sets != null)
return (from c in sets where c.Name == name select c).FirstOrDefault();
else
return null;
}

///
/// Add a IR command to an existing set. If the set is not found, it will be created.
///
///
The command instance to be added.
///
The name of the target set.
/// true if the command was successfully added.
internal static bool AddCommand(Command command, string targetSet)
{
var sets = GetSets();

if (sets == null)
sets = new List();

var singleSet = GetSingleSet(sets, targetSet);

if (singleSet == null)
singleSet = new Set { Name = targetSet };

var singleCommand = (from c in singleSet.Commands where c.Name == command.Name select c).FirstOrDefault();

if (singleCommand == null)
{
singleSet.Commands.Add(command);

if (SerializeSets(sets))
return true;
else
return false;
}
else
return false;
}

///
/// Retrieve a single command instance from one of the sets on the local server.
///
///
Original list of commands.
///
Name of the command to be retrieved.
/// An instance of the command, if found. NULL if not.
internal static Command GetSingleCommand(List commands, string name)
{
if (commands != null)
return (from c in commands where c.Name == name select c).FirstOrDefault();
else
return null;
}

///
/// Remove a set from a local machine.
///
///
Original list of sets.
///
Name of the set to remove.
internal static void RemoveSet(List sets, Set targetSet)
{
sets.Remove(targetSet);

SerializeSets(sets);
}
}
}
Sending Data Back to the Client

SendData in the NetworkHelper class handles all outbound connections. Here is its structure:

///
/// Send data to the target network machine.
///
///
The target machine IP.
///
Data to be sent, in string format.
///
Determines whether to remove the port from the given IP string.
public static void SendData(string destination, string data, bool sanitizeIp = true)
{
using (Socket client = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp))
{
string completeIp = string.Empty;

if (sanitizeIp)
completeIp = destination.Remove(destination.IndexOf(":"), destination.Length - destination.IndexOf(":"));

client.Connect(completeIp, 6169);
client.Send(Encoding.UTF8.GetBytes(data));
}
}
A new stream socket is created in order to connect to the target machine over the TCP pipe. If IP sanitization is enabled, the port is stripped from the address in order to pass a valid IP. A Socket instance cannot directly handle IPs of the format:
255.255.255.0:PORT_NUMBER
Later, in a synchronous manner, a connection is established and the data is sent.
At this point, you can see that the barebones service offers a flexible way to manage content. It can be accessed by any application type as long as the server can be accessed and the application can send commands in the pre-defined format and the content requested is actually located on the target server. This allows for high levels of extensibility and interoperability, as the server usage is not limited to a single platform. If I decide to create a Windows Store application that would allow me to control my TV, I simply need to add socket connection layer that will send plain strings to the machine where the IR sensor is connected.
Similarly, if some functionality needs to be added, it is possible to do so without ever touching the client applications. A modification in the endpoint will be reflected with no direct effect on all connection applications as long as all handled returned and requested values are preserved. The only additional requirement is that if the client applications want to take advantage of newly introduced capabilities, they need to have an updated command transmission layer for the new command types.
In Program.cs, I simply need to start the server through the CoreStarter class:

namespace Coding4Fun.MissionControl.API
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Coding4Fun MissionControl Server");
CoreStarter.LaunchSocket();
}
}
}

Mobile client overview

The mobile client does not have the capability to send commands directly to the IR sensor. Instead, it connects to a remote machine that has the IR sensor plugged in and attempts to invoke a command from the list returned by the service. A single mobile client can support control over multiple servers.
NOTE: Make sure that at the time of working with the Windows Phone client, the server is actually running on your local machine. To make it easier to test, also open port 6169 for incoming connections in Windows Firewall.
When building a Windows Phone application, make sure you have the proper version of the SDK installed, as well as a SLAT-compatible machine if you plan on testing the application in the emulator.
Networking Infrastructure

The Windows Phone application also relies on a network infrastructure somewhat similar to that of the server. There is a TCP listener that is created when the application is started:

// Code to execute when the application is launching (eg, from Start)
// This code will not execute when the application is reactivated
private void Application_Launching(object sender, LaunchingEventArgs e)
{
ServiceSerializer.DeserializeServices();

listener.OnClientConnected += listener_OnClientConnected;
listener.Start(6169);
}

Here, listener is an instance of TcpSocketListener—a custom class designed to handle incoming network connections:

namespace Coding4Fun.MissionControl.WP.Network
{
public class TcpSocketListener : SocketConnectorBase
{
StreamSocketListener coreSocket;

public async void Start(int port)
{
coreSocket = new StreamSocketListener();
coreSocket.ConnectionReceived += coreSocket_ConnectionReceived;

try
{
await coreSocket.BindServiceNameAsync(port.ToString());
}
catch (Exception ex)
{
Debug.WriteLine(ex.Message);

coreSocket.Dispose();
coreSocket = null;
OnConnectionCompleted(new ConnectionEventArgs { IsSuccessful = false, DeviceID = string.Empty });
}
}

async void coreSocket_ConnectionReceived(StreamSocketListener sender, StreamSocketListenerConnectionReceivedEventArgs args)
{
Debug.WriteLine("Connection received!");

DataReader reader = new DataReader(args.Socket.InputStream);

try
{
while (true)
{
StringBuilder builder = new StringBuilder();

uint actualLength = 1;

while (actualLength > 0)
{
actualLength = await reader.LoadAsync(256);
builder.Append(reader.ReadString(actualLength));
}

OnConnectionCompleted(new ConnectionEventArgs
{
Socket = args.Socket,
IsSuccessful = true,
DeviceID = args.Socket.Information.RemoteHostName.DisplayName,
Token = builder.ToString()
});
break;
}
}
catch (Exception exception)
{
Debug.WriteLine(exception.Message);

OnConnectionCompleted(new ConnectionEventArgs { IsSuccessful = false });
}
}
}
}

A StreamSocketListener is used for the connection core. When a connection is received, a continuous loop reads the entire contents of the incoming stream. OnConnectionCompleted is declared in the base class—SocketConnectorBase.

namespace Coding4Fun.MissionControl.WP.Network
{
public class SocketConnectorBase
{
public event EventHandler OnClientConnected;
public virtual void OnConnectionCompleted(ConnectionEventArgs connectionArgs)
{
if (OnClientConnected != null)
{
OnClientConnected(this, connectionArgs);
}
}

public event EventHandler OnSendCompletedEvent;
public virtual void OnSendCompleted(bool succeeded)
{
if (OnSendCompletedEvent != null)
{
OnSendCompletedEvent(this, succeeded);
}
}
}

public class ConnectionEventArgs : EventArgs
{
public StreamSocket Socket { get; set; }
public string DeviceID { get; set; }
public string Token { get; set; }
public bool IsSuccessful { get; set; }
}
}

ConnectionEventArgs here is used to identify the content that is passed to the client. DeviceID gives access to the source IP, IsSuccessful tells the developer whether the established connection is active and the Token carries the raw string if any was received.
Sending data is simplified to the maximum with the help of the SocketClient class, which relies on a StreamSocket instance that handles outbound connections and writing to the output stream:

namespace Coding4Fun.MissionControl.WP.Network
{
public class SocketClient : SocketConnectorBase
{
StreamSocket _socket;

public SocketClient()
{
_socket = new StreamSocket();
}

public SocketClient(StreamSocket socket)
{
_socket = socket;
}

public async void Connect(string hostName, int portNumber)
{
try
{
await _socket.ConnectAsync(new HostName(hostName), portNumber.ToString(), SocketProtectionLevel.PlainSocket);

OnConnectionCompleted(new ConnectionEventArgs { IsSuccessful = true });
}
catch (Exception ex)
{
Debug.WriteLine(ex.Message);

OnConnectionCompleted(new ConnectionEventArgs { IsSuccessful = false });
}
}

public async void Send(string dataToSend)
{
try
{
using (DataWriter writer = new DataWriter(_socket.OutputStream))
{
// Write the length of the binary data that is being
// sent to the client.
writer.WriteUInt32((UInt32)dataToSend.Length);

writer.WriteString(dataToSend);

// Send the actual data.
await writer.StoreAsync();

writer.DetachStream();

OnSendCompleted(true);
}
}
catch
{
_socket.Dispose();
_socket = null;
OnSendCompleted(false);
}
}
}
}

As with the listener class, SocketClient supports OnConnectionCompleted to notify the application that the connection attempt completed.
Back in App.xaml.cs, the data from the incoming connection captured by the TcpSocketListener instance is passed to the ResponseHelper class:

void listener_OnClientConnected(object sender, ConnectionEventArgs e)
{
ResponseHelper.HandleIncomingResponse(e.Token);
}

This class reads the possible three commands sent by the server and interprets them, creating internal collections from the raw data if the current server IP matches the one obtained in the ServerResponse (the same model in the desktop application):

using Coding4Fun.MissionControl.WP.Models;
using Coding4Fun.MissionControl.WP.ViewModels;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Windows;

namespace Coding4Fun.MissionControl.WP.Misc
{
public class ResponseHelper
{
public static void HandleIncomingResponse(string rawResponse)
{
if (rawResponse != null)
{
ServerResponse response = JsonConvert.DeserializeObject(rawResponse);

if (response.Marker == Constants.COMMAND_SERVER_NOTIFICATION)
{
Deployment.Current.Dispatcher.BeginInvoke(() =>
{
MessageBox.Show(response.Content, "Server Response", MessageBoxButton.OK);
});
}
else
{
if (CommonViewModel.Instance.IsWaiting)
{
if (response.Identifier == CommonViewModel.Instance.CurrentServer.Location)
{
// returns the list of sets that are associated with the current server.
if (response.Marker == Constants.COMMAND_SERVER_SET_LIST)
{

List items = JsonConvert.DeserializeObject(response.Content);

if (items != null)
{
List groupedItems = Group.CreateGroups(items,
CultureInfo.CurrentCulture, (string s) => { return s[0].ToString(); }, true);
SetsPageViewModel.Instance.Sets = groupedItems;
}
else
{
SetsPageViewModel.Instance.Sets = new List();
}

Deployment.Current.Dispatcher.BeginInvoke(() =>
{
CommonViewModel.Instance.IsWaiting = false;

if (!App.RootFrame.CurrentSource.ToString().Contains("SetsPage"))
{
App.RootFrame.Navigate(new Uri("/Views/SetsPage.xaml", UriKind.Relative));
}
});

}
// returns the list of commands associated with a given set.
else if (response.Marker.Contains(Constants.COMMAND_SERVER_SET_COMMANDS))
{
string[] data = response.Marker.Split(new char[] { ':' });
if (data[1] == CommonViewModel.Instance.CurrentSet)
{
bool isList = false;
bool.TryParse(data[2].ToLower(), out isList);

if (isList)
{
CommonViewModel.Instance.CurrentSetType = "list";
}
else
{
CommonViewModel.Instance.CurrentSetType = "pad";
}

CommandsPageViewModel.Instance.Commands = new System.Collections.ObjectModel.ObservableCollection(JsonConvert.DeserializeObject(response.Content));

Deployment.Current.Dispatcher.BeginInvoke(() =>
{
CommonViewModel.Instance.IsWaiting = false;
App.RootFrame.Navigate(new Uri("/Views/CommandsPage.xaml", UriKind.Relative));
});
}
}
}
}
}
}
}
}
}

If the response comes from a server that is different than the one that is currently active, the data is discarded as the user no longer needs it. Also, for specific commands, the mobile application will be on standby, waiting for a response (unless the user decides to cancel the request) – the IsWaiting flag is an application-wide indicator that a pending server action is in the queue.
Same as with the server, the commands in the Windows Phone application are represented through pre-defined constants:

public const string COMMAND_SERVER_SET_LIST = "SET_LIST";

public const string COMMAND_SERVER_SET_COMMANDS = "SET_COMMANDS";

public const string COMMAND_SERVER_NOTIFICATION = "NOTIFICATION";

Let’s now take a closer look at how it is handled internally to build the visual layer.
Handling the Data

The first thing users will see when the application is launched is the list of registered servers:

This is ServiceListPage.xaml





So Philips recently introduced their Hue Connected Bulbs: an easy-to-use set of LED light bulbs and Wi-Fi connected bridge which allows you to dynamically change the color of your home lighting using their iOS or Android app. What’s particularly cool is that the bridge has a web API which you can access to set the colors of each bulb at with your own app.
We at untitled network developed our own Philips Hue app called Oni: light Control, which currently available on the Windows Phone Store. In addition to allowing you to set you’re the color of your home lighting with defined “Moods”, the app also allows you to do the same using your phone’s built in voice commands or inexpensive NFC stickers. Here’s a demo of the Oni: Light Control in action:

I’m going to show you how you can develop your own app using the color picker from the Coding4Fun Toolkit for Windows Phone and the Json.Net library from Newtonsoft. These libraries can be found on NuGet, but you’ll obviously need the Philips Hue Connected Bulbs kit to test things out.
Getting Started:
The Philips Hue API uses a restful JSON interface you can access using any http client. Documentation on all of the supported methods by the Philips Hue bridge can be found at http://blog.ef.net/2012/11/02/philips-hue-api.html.
To get started, you’ll need authorized access to your bridge’s API. Once the bridge has successfully established a network connection with your router, discover its internal IP address via the URL: http://www.meethue.com/api/nupnp
You should get a response similar to:

[{"id":"ffss00fffe123456","internalipaddress":"192.168.1.100","macaddress":"0aa:bb:cc:dd:00:11"}] Note the internalipaddress value and use the IP to access the bridge’s API directly the with the URL http://192.168.1.100/api
Now, since we haven’t registered a user for authorization, attempting to access the hub will return an error from the bridge:

[{"error":{"type":1,"address":"/","description":"unauthorized user"}}] To register a new user, we’ll first POST the username we wish to use.

var client = new WebClient(); //our uri to perform registration var uri = new Uri(string.Format("http://{0}/api", HostnameTextBox.Text)); //create our registration object, along with username and description var reg = new { username = UsernameTextBox.Text, devicetype = "Coding4Fun Hue Light Project" }; var jsonObj = JsonConvert.SerializeObject(reg); //decide what to do with the response we get back from the bridge client.UploadStringCompleted += (o, args) =] Dispatcher.BeginInvoke(() =] { try { ResponseTextBox.Text = args.Result; } catch (Exception ex) { ResponseTextBox.Text = ex.Message; } }); //Invoke a POST to the bridge client.UploadStringAsync(uri, jsonObj); Note the response we get back from our hub will be

[{"error":{"type":101,"address":"","description":"link button not pressed"}}] This is because bridge requires you to first push the link button before new registrations can be made. After pushing the button and invoking the registration function again, you should receive the following result from the bridge:

[{"success":{"username":"coding4fun"}}]
Setting the Bulb Color:
We should now be able to access all methods on the bridge. You can get all of the configuration details, including all of the bulbs and their statuses with the same base url: http://192.168.1.100/api/coding4fun
Now comes the fun part. There are three color modes in which you can use to set the color of your bulbs:

hue & sat: ‘hue’ is a color range between 0-65535 which represent 182.04*degrees, ‘sat’ is saturation with a range of 0-254xy: are coordinates in the CIE 1931 spacect: is a color temperature expressed in mireds from 154 to 500, coolest to warmest respectfully
Source: http://rsmck.co.uk/hue
We’ll be setting the colors of our bulbs using hue & saturation parameters. Luckily, the Coding4Fun Toolkit for Windows Phone has three awesome color picker controls and some useful color extensions which makes setting the bulb colors a breeze. We start by building our state object – a list of parameters we want our bulb to be set to. Then we use the PUT verb to set the light with the following URL: http://{BRIGE-IPADDRESS}/api/coding4fun/lights/1/state
The “1” in the url is the 1-based index of the bulb you want to set.

//Get the HSV Value from the currently selected color var hsv = LightColorSlider.Color.GetHSV(); //build our State object var state = new { on = true, hue = (int)(hsv.Hue * 182.04), //we convert the hue value into degrees by multiplying the value by 182.04 sat = (int)(hsv.Saturation * 254) }; //convert it to json: var jsonObj = JsonConvert.SerializeObject(state); //set the api url to set the state var uri = new Uri(string.Format("http://{0}/api/{1}/lights/{2}/state", HostnameTextBox.Text, UsernameTextBox.Text, LightIndexTextBox.Text)); var client = new WebClient(); //decide what to do with the response we get back from the bridge client.UploadStringCompleted += (o, args) => Dispatcher.BeginInvoke(() => { try { ResponseTextBox.Text = args.Result; } catch (Exception ex) { ResponseTextBox.Text = ex.Message; } }); //Invoke the PUT method to set the state of the bulb client.UploadStringAsync(uri, "PUT", jsonObj);
That’s it! Be sure to check out all of the other functions the (other functions the Hue API supports) at http://blog.ef.net/2012/11/02/philips-hue-api.html
Bio:
Jarem Archer is a self-taught Software Developer and UX Designer. He’s part of a small team at untitled network who have a passion for video games, digital motion, entertainment and gadgets. Follow him on Twitter at http://twitter.com/unt1tled.

More...




Hosts: Jonathan Ness, Security Development Manager, MSRC
Pete Voss, Sr. Response Communications Manager, Trustworthy Computing
Website: TechNet/Security
Chat Topic: December 2011 Out-Of-Band Security Bulletin Release
Date: Thursday, December 29, 2011
Q: How are Denial of Service, Tampering, Information Disclosure orSpoofing issues rated?
A: The Exploitability Index only attempts to rate vulnerabilities that can be leveraged for code execution. Vulnerabilities that could allow denial of service, tampering, information disclosure or spoofing will receive an Exploitability Index rating of "3." The notes for that particular CVE will also reflect the nature of the vulnerability.
Q: One angle I'm interested in is those Microsoft products that might use forms authentication, such as Exchange 2010 or TMG 2010. If we're using forms authentication there, does that mean we're vulnerable?
A: Any products that are using ASP.NET forms authentication will be secured with this update. This includes SharePoint and Exchange, when they are using ASP.NET forms authentication. If these products are using a Forms Authentication module other than the one provided by ASP.NET, then the issue addressed in this bulletin does not apply to you.
Q: Why does Windows Update on Windows 2008 servers show this update, but the check-box next to it is un-checked? What is the difference between patches that are checked by default and those that are not checked?
A: In the case of "Important Updates", an update that is in the "PENDING" state will be unchecked when you view it in Windows Update. This means it is already queued for downloading. You can manually override this to start the download manually by checking the box next to the update.
Q: Please confirm that if an IIS instance is installed that we are at risk for one of the CVE's and therefore we should patch ASAP. The assumption is that the server has IIS without .NET components.
A: By default, IIS is not installed with .NET and by default, .NET is not installed by ASP.NET. Customers would first need to have installed .NET framework with ASP.NET in order to be vulnerable to the vulnerabilities documented by MS11-100.
Q: What level of testing or specific tests is recommended for applications using ASP.NET? Is it highly likely that the hashing change will impact applications using the framework?
A: Microsoft recommends that customers test this update before deploying. There is a change in how forms authentication occurs and will require updates to be deployed at the same time across server environments. Click here for more about forms authentication.
Q: Can sample DoS requests be provided to allow us to understand what the DOS signature may look like so we can test the patch as well as monitor our production environments until the patching is completed?
A: For more technical information regarding MS11-100, please see the SRD blog, where we have shared a short signature detecting this issue.
Q: Is this critical to environments where there are no Internet-facing systems? And what if there is no IIS installed on the workstation -- is it atrisk?
A: Exploitation requires ASP.NET installed and to be exposed to input from unauthenticated users. Typically this is through IIS. If workstations do not have ASP.NET or IIS installed, then those systems are not exposed.
Q: In the Critical Elevation of Privilege can the attacker elevate is privilege only if they have the username without having the password? Can we have machines with the fix and without the fix working with each other?
A: Yes, the attacker only needs the username to carry out the attack. The fix involves changing the format of the forms authentication ticket, so that unpatched and patched machines cannot work with each other. So after patching you cannot have machines with the fix and without it working together, unless you set a configuration setting on the patched machines. For details, please read the FAQ for this CVE for more information on applying updates to web farms.
Q: For CVE-2011-3414, is there a requirement of authentication to exploit the DoS vulnerability successfully?
A: No, CVE-2011-3414 is anunauthenticated Denial of Service.
Q: What could be a potential impact on server running IIS with custom code? In short, can this update impact server or service to go down after installation? Do you have any suggestions on installation on web servers running custom code?
A: This update is specifically for ASP.NET, but the issue that was disclosed is an industry-wide issue concerning hash collisions. So, it is possible for your custom code to be affected, but you will need to investigate what kind of hash-tables your custom code uses and if it operates on untrusted user data.
Q: Is there a client-side patch that will protect users that fall for phishing attacks and visit websites that have not patched?
A: As clients are not affected by server-sided vulnerability, the security update does need to be installed on the server.
Q: If the main target is Internet facing systems with IIS & ASP.NET installed, should I concentrate on patching my webservers first before patching client systems?
A: Prioritization for this update would be specific to users’ environments, but servers that are internet-facing and accept input from unauthenticated or untrusted user-provided content are most affected and should be prioritized. Likewise, clients are typically not in a web server role, and so systems that are running a web server role should be prioritized.
Q: What steps can I take to reproduce and see if/how my site is affected, and so I can confirm the issue is gone after applying the patch?
A: For the protection of customers, Microsoft does not disclose proof of concept code (POC). The technical details of this issue are however public.
Q: If Microsoft .NET Framework is installed on an IIS Server, does this mean that ASP.NET is also installed but possibly not enabled?
A: Whether you have the .NET Framework (and ASP.NET) installed on a machine will depend upon the specific OS platform. Windows Server 2008, Windows Server 2008 SP2, Windows Server 2008 R2 and Windows Server 2008 R2 SP1 all ship with the .NET Framework 2.0 or higher, which includes ASP.NET, and you should install the corresponding patches listed in the security bulletin. If you are using an older Server OS such as Windows Server 2003 SP2 x86, then that platform includes .NET Framework 1.1 SP1, and you should install the corresponding patch listed in the security bulletin.
Q: From a desktop browsing experience, this update will patch Windows XP, Vista and 7. If machines do not have IIS installed and enabled, as well as ASP.NET enabled, is the criticality of this update reduced? For example if the user goes to an internet site, would their desktop PC be vulnerable? It seems to be mostly if you have IIS and ASP.net installed and acting as a web server.
A: If you have a client machine with no ASP.NET installed, then your desktop PC would not be vulnerable to the particular security issues that are being addressed in this update.
Q: ASP.Net has been identified for the DoS. How about classic ASP/ISAPI applications? Is it just a .Net hash-table issue? And has the Microsoft Foundation Class / ATL / Visual Basic 6.0 been checked?
A: This is an industry-wide issue that could affect a broad spectrum of technologies. Since ASP.NET was at the greatest risk because of the public disclosure, we have focused our efforts so far on making sure we secure ASP.NET. We are actively investigating other technologies where this could be vulnerable and so far we do not think that classic ASP is vulnerable. Information on other affected technologies will be revealed as the issue develops.
Q: So just to be clear, Exchange 2010 Outlook Web Access isn't vulnerable to the privilege of escalation? Just to the DOS?
A: OWA 2010 can be configured for forms-based authentication. Based on this, it should be considered vulnerable. If there is any doubt, Microsoft KB Article 2638420 discusses parameters you can check for to verify if an application is using forms auth. Specifically, to determine whether your application uses forms authentication,
examine the System.web file. Applications that use forms authentication use the following entry in System.web file:
Q: What tools are available to remotely scan systems to see if they’re vulnerable -- that is, that IIS and ASP are installed and active?
A: The Detection and Deployment Tools and Guidance section in the security bulletin provides information on how to identify systems to which this update applies. If you want to identify whether a system has IIS installed with ASP.NET enabled, the answer depends on the operating system that each system is running.
Q: Are only webservers vulnerable? We have limited personnel this weekend for QA and deployment. Are we pretty much covered if we just deploy to systems in our DMZ this weekend and then rest of the enterprise next week?
A: Prioritization for this update would be specific to users’ environments, but servers that are internet-facing and accept input from unauthenticated or untrusted user provided content may be at greater risk than internal servers.
Q: Sites that disallow "application/x-www-form-urlencoded” or “multipart/form-data” HTTP content types are not vulnerable. Is this set to disallow by default? How do we verify if it is set to disallow?
A: No, application/x-www-form-urlencoded or multipart/form-data are not disallowed by default. Customers will need to explicitly disallow these. Customers can do this by using IIS request filtering.
Q: Forms authorization login from TMG/ISA doesn't use ASP.NET. Is it still vulnerable?
A: TMG is not exposed and is not related to the ASP.NET issue described in the bulletin.
Q: Do you suggest immediate patching of all servers (internal/external) or just of externally available servers and allow internal servers to be patched during the next patching cycle?
A: Once again, prioritization for this update would be specific to each user’s environment, but servers that are internet-facing and accept input from unauthenticated or untrusted user provided content may be at greater risk than internal servers.
Q: Is the critical CVE related to forms authentication only an issue if the site is configured to support forms authentication without cookies? Or, are all forms authentication implementations impacted?
A: No, this issue applies to all types of ASP.NET forms authentication, cookie and cookie-less.
Q: For CVE 2011-3414, does the patch change the size of request header accepted, place controls on the amount of CPU that can be used, or change the hashing functions used?
A:The security update addresses this issue by limiting the number of inputs ASP.NET accepts from clients.
Q: Does this patch limit the number of parameters passed in the post request? If so, what is the new limit? I am trying to determine what application problems may arise after applying the update.
A: The security update addresses this issue by limiting the number of inputs ASP.NET accepts from clients. If you are interested in changing the number of parameters passed in the post request, please see the section of the bulletin titled Workarounds for Collisions in HashTable May Cause DoS Vulnerability - CVE-2011-3414.
Q: Can the normally scheduled January bulletins be installed independently of the critical one?
A: Yes, Future security updates can be installed independently of this issue. Microsoft does recommend all customers always read security updates to ensure they fully understand any known issues that may be documented in the security bulletin.
Q: Is the attack vector based on the server or the client? Do we concentrate on server or desktop side first?
A: The vulnerabilities in the bulletins are primarily focused on systems operating in a Web server role that use ASP.NET. Clients are typically not in a web server role.
Q: Could you provide more detail around the 3rd mitigation factor -- specifically the account registration procedure?
A: I am assuming this question is about the first mitigating factor for CVE-2011-3416: forms authentication bypass. Essentially, to pull off an Elevation of Privilege attack, the attacker would need a valid account on the system they are trying to compromise and the user name of the target of the attack.
Q: Can an ASP.NET site (e.g. SharePoint 2010 site) using authentication (NTLM/Kerberos) come under the DoS attack as described in CVE-2011-3414 by an unauthenticated user?
A: NTLM/Kerberos authentication changes the attack vector of the vulnerability. An ASP.NET site can come under a DOS attack – however, the attacker would then need to be authenticated.
Q: Will this affect -- or will I need to be aware of -- this update impacting ASP.NET session and machine key settings in IIS for a load balanced environment, where all machine keys are matches to make sure sessions are the same across a server farm?
A: This update changes the way in which forms authentication tickets are created, so all servers would need to use the old or the new ticket format in order to maintain compatibility. Please refer to Knowledge Base Article 2659968 for deployment guidance for this update.
Q: What about servers that have IP address access limitations? Since we are resource-limited, we'd like to skip these servers that are only allowing certain IPs to access IIS.
A: As we’ve mentioned, prioritization for this update would be specific to users environments, but servers that are Internet-facing and can accept input from unauthenticated or untrusted user provided content may be at greater risk than internal servers. Servers that have additional protections may reduce the potential attack risk of these vulnerabilities. Customers are encouraged to analyze their own environments.
Q: We have ASP.NET prohibited in in our Web Service Extensions -- IIS 6. Are we still vulnerable?
A: No. If ASP.NET is not enabled, you are not vulnerable.
Q: The Section Workarounds for Collisions in HashTable May Cause DoS Vulnerability - CVE-2011-3414 in the bulletin is confusing. Is it required to put this script and then install the update?
A: Workaround refers to a setting or configuration change that does not correct the underlying vulnerability, but would help block known attack vectors before you apply the update. Microsoft has tested the following workarounds and states in the discussion whether a workaround reduces functionality. Customers are always encouraged to apply the security update. The workarounds are not a prerequisite for installing the security update.
Q: If TMG is not affected then, if TMG is protecting an Exchange 2010 server and the TMG is handling the forum authorization, would the patch for an Exchange server be necessary?
A: Although firewall solutions could protect systems behind the firewall it is important to understand the types of traffic that that FW may proxy to servers behind it. Systems behind the firewall are still vulnerable to internal attacks and have vulnerable code and should be updated to be properly protected.
Q: Is AppSettings.MaxHttpCollectionKeys the new parameter that contains the maximum number of form entries?
A: Yes it is.
Q: For ASP.NET on Internet-facing systems requiring authentication, does an attacker have to have a valid user name AND the valid password to carry out an attack?
A: No. The only requirement is to have the target's username, and *any* valid account on the system.
Q: Will any forms authentication tickets generated before the patch is applied be rendered invalid once the patch is applied?
A: Yes. The change in the forms authentication ticket format will render all pre-patch tickets invalid once the update is applied.
[B]Q: Our ASP.NET application requires large file uploads and requires our




Original release date: March 29, 2013
Systems Affected

Domain Name System (DNS) servers
Overview

A Domain Name Server (DNS) Amplification attack is a popular form of Distributed Denial of Service (DDoS) that relies on the use of publically accessible open recursive DNS servers to overwhelm a victim system with DNS response traffic. Description

A Domain Name Server (DNS) Amplification attack is a popular form of Distributed Denial of Service (DDoS) that relies on the use of publically accessible open recursive DNS servers to overwhelm a victim system with DNS response traffic. The basic attack technique consists of an attacker sending a DNS name lookup request to an open recursive DNS server with the source address spoofed to be the victim’s address. When the DNS server sends the DNS record response, it is sent instead to the victim. Because the size of the response is typically considerably larger than the request, the attacker is able to amplify the volume of traffic directed at the victim. By leveraging a botnet to perform additional spoofed DNS queries, an attacker can produce an overwhelming amount of traffic with little effort. Additionally, because the responses are legitimate data coming from valid servers, it is especially difficult to block these types of attacks.While the attacks are difficult to prevent, network operators can implement several possible mitigation strategies. The primary element in the attack that is the focus of an effective long-term solution is the detection and elimination of open recursive DNS resolvers. These systems are typically legitimate DNS servers that have been improperly configured to respond to recursive queries on behalf of any system, rather than restricting recursive responses only to requests from local or authorized clients. By identifying these systems, an organization or network operator can reduce the number of potential resources that the attacker can employ in an attack.
Impact

A misconfigured Domain Name System (DNS) server can be exploited to participate in a Distributed Denial of Service (DDoS) attack.
Solution

DETECTION

Several organizations offer free, web-based scanning tools that will search a network for vulnerable open DNS resolvers.  These tools will scan entire network ranges and list the address of any identified open resolvers.

Open DNS Resolver Project
http://openresolverproject.org
The Open DNS Resolver Project has compiled a list of DNS servers that are known to serve as globally accessible open resolvers.  The query interface allows network administrators to enter IP ranges in CIDR format [1].

The Measurement Factory
http://dns.measurement-factory.com
Like the Open DNS Resolver Project, the Measurement Factory maintains a list of Internet accessible DNS servers and allows administrators to search for open recursive resolvers [2].  In addition, the Measurement Factory offers a free tool to directly test an individual DNS resolver to determine if it allows open recursion.  This will allow an administrator to determine if configuration changes are necessary and verify that configuration changes have been effective [3].  Finally, the site offers statistics showing the number of open resolvers detected on the various Autonomous System (AS) networks, sorted by the highest number found [4].

DNSInspect
http://www.dnsinspect.com
Another freely available, web-based tool for testing DNS resolvers is DNSInspect.  This site is similar to The Measurement Factory’s ability to test a specific resolver for vulnerability, but offers the ability to test an entire DNS Zone for several other potential configuration and security issues [5].
Indicators

In a typical recursive DNS query, a client sends a query request to a local DNS server requesting the resolution of a name or the reverse resolution of an IP address.  The DNS server performs the necessary queries on behalf of the client and returns a response packet with the requested information or an error [6, page 21].  The specification does not allow for unsolicited responses.  In a DNS amplification attack, the key indicator is a query response without a matching request.  
MITIGATION

Unfortunately, due to the overwhelming traffic volume that can be produced by one of these attacks, there is often little that the victim can do to counter a large-scale, DNS amplification-based distributed denial-of-service attack.  While the only effective means of eliminating this type of attack is to eliminate open recursive resolvers, this requires a large-scale effort by numerous parties.  According to the Open DNS Resolver Project, of the 27 million known DNS resolvers on the Internet, approximately “25 million pose a significant threat” of being used in an attack [1].  However, several possible techniques are available to reduce the overall effectiveness of such attacks to the Internet community as a whole.  Where possible, configuration links have been provided to assist administrators with making the recommended changes.  The configuration information has been limited to BIND9 and Microsoft’s DNS Server, which are two widely deployed DNS servers.  If you are running a different DNS server, please see your vendor’s documentation for configuration details.
Source IP Verification

Because the DNS queries being sent by the attacker-controlled clients must have a source address spoofed to appear as the victim’s system, the first step to reducing the effectiveness of DNS amplification is for Internet Service Providers to deny any DNS traffic with spoofed addresses.  The Network Working Group of the Internet Engineering Task Force released a Best Current Practice document in May 2000 that describes how an Internet Service Provider can filter network traffic on their network to drop packets with source addresses not reachable via the actual packet’s path [7].  This configuration change would considerably reduce the potential for most current types of DDoS attacks.
Disabling Recursion on Authoritative Name Servers

Many of the DNS servers currently deployed on the Internet are exclusively intended to provide name resolution for a single domain.  These systems do not need to support resolution of other domains on behalf of a client, and therefore should be configured with recursion disabled.
Bind9

Add the following to the global options [8]:
options {
     allow-query-cache { none; };
     recursion no;
};
Microsoft DNS Server

In the Microsoft DNS console tool [9]:

Right-click the DNS server and click Properties.Click the Advanced tab.In Server options, select the “Disable recursion” check box, and then click OK.
Limiting Recursion to Authorized Clients

For DNS servers that are deployed within an organization or ISP to support name queries on behalf of a client, the resolver should be configured to only allow queries on behalf of authorized clients.  These requests should typically only come from clients within the organization’s network address range.
BIND9

In the global options, add the following [10]:
acl corpnets { 192.168.1.0/24; 192.168.2.0/24; };
options {
  allow-query { corpnets; };
  allow-recursion { corpnets; };
};
Microsoft DNS Server

It is not currently possible to restrict recursive DNS requests to a specific client address range in Microsoft DNS Server.  The most effective means of approximating this functionality is to configure the internal DNS server to forward queries to an external DNS server and restrict DNS traffic in the firewall to restrict port 53 UDP traffic to the internal server and the external forwarder [11].
Rate Limiting Response of Recursive Name Servers

There is currently an experimental feature available as a set of patches for BIND9 that allows an administrator to restrict the number of responses per second being sent from the name server [12].  This is intended to reduce the effectiveness of DNS amplification attacks by reducing the volume of traffic coming from any single resolver.
BIND9

On BIND9 implementation running the RRL patches, add the following lines to the options block of the authoritative views [13]:
rate-limit {
    responses-per-second 5;
    window 5;
};
Microsoft DNS Server

This option is currently not available for Microsoft DNS Server.
References

[1] Open DNS Resolver Project[2] The Measurement Factory, "List Open Resolvers on Your Network"[3] The Measurement Factory, "Open Resolver Test"[4] The Measurement Factory, "Open Resolvers for Each Autonomous System"[5] "DNSInspect," DNSInspect.com[6] RFC 1034: DOMAIN NAMES - CONCEPTS AND FACILITIES[7] BCP 38: Network Ingress Filtering: Defeating Denial of Service Attacks which employ IP Source Address Spoofing[8] Chapter 3. Name Server Configuration[9] Disable recursion on the DNS server[10] Chapter 7. BIND 9 Security Considerations[11] Configure a DNS Server to Use Forwarders[12] DNS Response Rate Limiting (DNS RRL)[13] Response Rate Limiting in the Domain Name System (DNS RRL)
Revision History

March 29, 2013: Initial release
This product is provided subject to this Notification and this Privacy & Use policy.

Syndicated from the United States Security Readiness Team (US-CERT). More...




I have a D-Link DIR-600 N Wireless Router, connected to a
Comcast Cable Modem. 3 of 4 computers in our house connected just fine to the
network and have internet access. The 4th computer has a D-Link DWA-525 wireless
transceiver. It will hookup to the network but will not connect to the internet.
I've changed from autodetect DNS and Default gateway to an explicit IP address
for the IP address, Default gateway and Devault DNS address based on the
settings from ipconfig on one of the other computers that is on the web. I've
used ipconfig/release ipconfig/flushdns ipconfig/renew to no avail, and now I'm
getting an error message from it.

Is it possible that the DWA-525 itself is faulty, or am I missing something? It shouldn't be this hard to connect to the router and get DHCP to pickup the current gateway IP address.

Any ideas would be appreciated.

Cheers!

Brandon_Forest@sbcglobal.net




Guy's check your email accounts. Today I received an email from codemasters:

Important information regarding your account

Dear valued Codemasters customer,

On Friday 3rd June, unauthorised entry was gained to our Codemasters.com website. As soon as the intrusion was detected, we immediately took codemasters.com and associated web services offline in order to prevent any further intrusion.

During the days since the attack we have conducted a thorough investigation in order to ascertain the extent and scope of the breach and have regrettably discovered that the intruder was able to gain access to the following:

Codemasters.com website

Access to the Codemasters corporate website and sub-domains.

DiRT 3 VIP code redemption page

Access to the DiRT 3 VIP code redemption page.

The Codemasters EStore

We believe the following have been compromised: Customer names and addresses, email addresses, telephone numbers, encrypted passwords and order history. Please note that no personal payment information was stored with Codemasters as we use external payment providers, meaning your payment details were not at risk from this intrusion.

Codemasters CodeM database

Members' names, usernames, screen names, email addresses, date of birth, encrypted passwords, newsletter preferences, any biographies entered by users, details of last site activity, IP addresses and Xbox Live Gamertags are all believed to have been compromised.

Whilst we do not have confirmation that any of this data was actually downloaded onto an external device, we have to assume that, as access was gained, all of these details were compromised and/or stolen.

The Codemasters.com website will remain offline for the foreseeable future with all Codemasters.com traffic re-directed to the Codemasters Facebook page instead. A new website will launch later in the year.

Advice

For your security, in the first instance we advise you to change any passwords you have associated with other Codemasters accounts. If you use the same login information for other sites, you should change that information too. Furthermore, be extra cautious of potential scams, via email, phone, or post that ask you for personal or sensitive information. Please note that Codemasters will never ask you for any payment data such as credit card numbers or bank account details, nor will Codemasters ask you for passwords or other personal identifying data. Be aware too of fraudulent emails that may outwardly appear to be from Codemasters with links inviting you to visit websites. The safest way to visit your favourite websites is always by typing in the address manually into the address bar of your browser.

Unfortunately, Codemasters is the latest victim in on-going targeted attacks against numerous game companies. We assure you that we are doing everything within our legal means to track down the perpetrators and take action to the full extent of the law.

We apologise for this incident and regret any inconvenience caused.

We are contacting all customers who may have been affected directly.

Should you have any concerns or wish to speak to a member of our Customer Services team, please email them at custservice@codemasters.com. Keep safe!




Hello.

I have a network with 2 W7s and 2 Macs. They would regularly stop seeing each other and it turned out that there was some sort of issue with the DHCP changing the IP addresses. I was advised to use static IP addresses. So after a bit of fiddling and setting statics everywhere it was all good except for . . . on W7 in the network folder I still have icons for the connections to the Macs which now don't work: "Error code: 0x80070035 The network path was not found." If I use the "run" and do a 192.168.1.7 it connects fine so I suspect the the details contained within the icon in networking are wrong but I cant work out how to delete it or fix it . . .

any clues out there?

cheers

Grasshopper

ps - you have to open responses with: Ah . . . Grasshopper . . . . (not really!)




I'm trying to make sure that this can be done, and here is my situation. In my graphics shop I have just built a new computer system using Windows 7 64bit OS. I am using a USB wireless internet device in the computer that connects to cable internet through a wireless router. The problem I have is that I need to connect a large format printer to this computer which only connects with a LAN cable. I remember the older computer using Windows XP 32bit I had to bridge connections or some such to get it to utilize the LAN port for the printer while also allowing access to internet through wireless USB device.

Does Windows 7 work the same way where I will have to setup a separate connection and then bridge them or is this going to take some more tweaking to get to work properly? The printer itself has it's own IP address which I can get to in the printer and change if needed, but I just need to know if I can be able to use the printer while allowing the computer to access internet and the steps that I will need to go through to enable both.

I cannot connect both the printer and computer directly to router as it would be too difficult to situate this way. I need to be able to use both connections and I've heard it can be difficult to setup properly. Any help would be appreciated.




I have been googling about this problem that I have been having for over 2 hours, but to no avail. Ever since I upgraded my previously windows vista computer up to windows 7, I have been having severe problems connecting to my home internet. Now, I cannot change any of my routers settings since they are my stepfathers ,and he has a set username and password that I am not allowed to know. All other device in our house will connect just fine to our internet, and my laptop can connect to all other routers fine, this one is the only one I have problems with. What happens is that I get a "connected with limited access" error, and am completely unable to gain any internet access. I managed to set some static IP settings that allow me internet access, yet make things run more slowly and I am unable to connect with people properly in game, such as hosting a terraria server and other things like it.
These are my computer specs:
Windows 7 Ultimate Service Pack 1
AMD Athlon(tm) X2 Dual-Core QL-65 2.10 GHz
3.00 GB RAM (2.75 GB usable)
32-bit operating system

when I type in Ipconfig /all, I get this:

Windows IP Configuration

Host Name . . . . . . . . . . . . : Gary-PC
Primary Dns Suffix . . . . . . . :
Node Type . . . . . . . . . . . . : Hybrid
IP Routing Enabled. . . . . . . . : No
WINS Proxy Enabled. . . . . . . . : No

Ethernet adapter Local Area Connection:

Media State . . . . . . . . . . . : Media disconnected
Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Realtek RTL8102E/RTL8103E Family PCI-E Fast Ethernet NIC (NDIS 6.20)
Physical Address. . . . . . . . . : 00-1E-33-CB-33-27
DHCP Enabled. . . . . . . . . . . : Yes
Autoconfiguration Enabled . . . . : Yes

Wireless LAN adapter Wireless Network Connection:

Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Realtek RTL8187SE Wireless LAN PCIE Network Adapter
Physical Address. . . . . . . . . : 00-24-D2-9D-FF-6E
DHCP Enabled. . . . . . . . . . . : No
Autoconfiguration Enabled . . . . : Yes
Link-local IPv6 Address . . . . . : fe80::2cf0:1df8:4c99:cf96%21(Preferred)
IPv4 Address. . . . . . . . . . . : 192.168.1.100(Preferred)
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 192.168.1.1
DHCPv6 IAID . . . . . . . . . . . : 335553746
DHCPv6 Client DUID. . . . . . . . : 00-01-00-01-16-B9-34-78-00-1E-33-CB-33-27
DNS Servers . . . . . . . . . . . : 4.2.2.2
NetBIOS over Tcpip. . . . . . . . : Enabled

Ethernet adapter Hamachi:

Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Hamachi Network Interface
Physical Address. . . . . . . . . : 7A-79-05-91-5F-6B
DHCP Enabled. . . . . . . . . . . : Yes
Autoconfiguration Enabled . . . . : Yes
IPv6 Address. . . . . . . . . . . : 2620:9b::591:5f6b(Preferred)
Link-local IPv6 Address . . . . . : fe80::8581:204:be25:41fc%17(Preferred)
IPv4 Address. . . . . . . . . . . : 5.145.95.107(Preferred)
Subnet Mask . . . . . . . . . . . : 255.0.0.0
Lease Obtained. . . . . . . . . . : Wednesday, June 27, 2012 10:40:13 PM
Lease Expires . . . . . . . . . . : Thursday, June 27, 2013 10:42:20 PM
Default Gateway . . . . . . . . . :
DHCP Server . . . . . . . . . . . : 5.0.0.1
DHCPv6 IAID . . . . . . . . . . . : 310016441
DHCPv6 Client DUID. . . . . . . . : 00-01-00-01-16-B9-34-78-00-1E-33-CB-33-27
DNS Servers . . . . . . . . . . . : fec0:0:0:ffff::1%1
fec0:0:0:ffff::2%1
fec0:0:0:ffff::3%1
NetBIOS over Tcpip. . . . . . . . : Enabled

Tunnel adapter Local Area Connection* 11:

Media State . . . . . . . . . . . : Media disconnected
Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Teredo Tunneling Pseudo-Interface
Physical Address. . . . . . . . . : 00-00-00-00-00-00-00-E0
DHCP Enabled. . . . . . . . . . . : No
Autoconfiguration Enabled . . . . : Yes

Tunnel adapter isatap.{D3E3AEAB-68E9-4E07-B4C2-7DD0F643DC81}:

Media State . . . . . . . . . . . : Media disconnected
Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Microsoft ISATAP Adapter #3
Physical Address. . . . . . . . . : 00-00-00-00-00-00-00-E0
DHCP Enabled. . . . . . . . . . . : No
Autoconfiguration Enabled . . . . : Yes

Tunnel adapter isatap.{F6242BA9-E6F0-4510-98AE-5EE2E0EB93B6}:

Media State . . . . . . . . . . . : Media disconnected
Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Microsoft ISATAP Adapter #4
Physical Address. . . . . . . . . : 00-00-00-00-00-00-00-E0
DHCP Enabled. . . . . . . . . . . : No
Autoconfiguration Enabled . . . . : Yes

Also, here is the static IP settings:

I have attempted uninstalling and reinstalling the network drivers, and when I troubleshoot problems when I'm not using the static IP, it says there is a problem but gives little to no information, while being unable to automatically solve the problem.
Let me make it clear that when I was on windows vista, my connection was fine, and I still connect to every other network I try fine without the static IP.
I have attempted to use ipconfig /remove and ipconfig /renew also to no avail, and I am really not sure what else I can do.

The static IP allows me connection to the internet, but I am tired of it being slow and giving me trouble with connectivity.

Could anyone help? I have posted on forums about my problem, but nowhere have I managed to find any REAL help.




hi

i bought and installed a sabrent wifi pci card into my computer. this is the card (Sabrent USA). my computer runs windows 7. the card installed properly, no warnings or anything. i've done my best to ensure i have the most updated drivers.

the card is terrible at identifying networks. it will pick up a couple, drop some, takes about a minute to find my access point, etc. it shows them all at healthy speeds.

i can connect to my access point but the internet is brutally slow. i currently get about .2mbps according to speedtest.net, whereas all my other devices get about 40mbps.

here's what ipconfig /all shows:

Windows IP Configuration

Host Name . . . . . . . . . . . . : DS-PC
Primary Dns Suffix . . . . . . . :
Node Type . . . . . . . . . . . . : Hybrid
IP Routing Enabled. . . . . . . . : No
WINS Proxy Enabled. . . . . . . . : No

Wireless LAN adapter Wireless Network Connection:

Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Ralink RT61 Turbo Wireless LAN Card
Physical Address. . . . . . . . . : 00-13-14-00-0E-B9
DHCP Enabled. . . . . . . . . . . : Yes
Autoconfiguration Enabled . . . . : Yes
Link-local IPv6 Address . . . . . : fe80::2dc8:a31d:242f:590f%14(Preferred)
IPv4 Address. . . . . . . . . . . : 192.168.0.13(Preferred)
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Lease Obtained. . . . . . . . . . : March-09-13 10:22:18 AM
Lease Expires . . . . . . . . . . : March-09-13 11:36:11 AM
Default Gateway . . . . . . . . . : 192.168.0.1
DHCP Server . . . . . . . . . . . : 192.168.0.1
DHCPv6 IAID . . . . . . . . . . . : 369103636
DHCPv6 Client DUID. . . . . . . . : 00-01-00-01-17-CF-35-B1-BC-AE-C5-A8-C9-C5

DNS Servers . . . . . . . . . . . : 64.71.255.204
64.71.255.198
NetBIOS over Tcpip. . . . . . . . : Enabled

Tunnel adapter isatap.{F03E65B1-767A-4677-B766-9FB43A3120FE}:

Media State . . . . . . . . . . . : Media disconnected
Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Microsoft ISATAP Adapter
Physical Address. . . . . . . . . : 00-00-00-00-00-00-00-E0
DHCP Enabled. . . . . . . . . . . : No
Autoconfiguration Enabled . . . . : Yes

Tunnel adapter Teredo Tunneling Pseudo-Interface:

Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Teredo Tunneling Pseudo-Interface
Physical Address. . . . . . . . . : 00-00-00-00-00-00-00-E0
DHCP Enabled. . . . . . . . . . . : No
Autoconfiguration Enabled . . . . : Yes
IPv6 Address. . . . . . . . . . . : 2001:0:9d38:953c:1449:1f0a:3f57:fff2(Pref
erred)
Link-local IPv6 Address . . . . . : fe80::1449:1f0a:3f57:fff2%13(Preferred)
Default Gateway . . . . . . . . . : ::
NetBIOS over Tcpip. . . . . . . . : Disabled

64.71.255.204 is what my dns server defaults to when i keep my ipv4 settings as 'assign dns servers automatically'. my laptop uses the same servers and no issues. when i diagnose the connection on my desktop, however, i get the 'dns server is not responding properly' error. changing my dns servers to 8.8.8.8 & 8.8.4.4 (or the opendns servers, or anything really for that matter) removes the error when i diagnose the connection, but doesn't affect the connection speed whatsoever.

i've tried shutting off and rebooting and power-cycling the router about a billion times in a billion different combinations, as well as reinstalling the card in a different pci slot, all to no avail.

i've also tried a myriad of ipconfig release/renew/flushdns/etc etc commands, none of which actually really do anything. my ipconfig /all thing above is very very similar to the settings on my laptop. everything's nearly identical there (with the exception of the name of the card, and my ip address and stuff like that, of course), so it's hard to troubleshoot.

originally i didn't have my microsoft virtual miniport wifi adapter thing showing in devices, but i was able to enable that thorugh the command prompt, and now it shows and is working properly and it hasn't changed the situation at all. here's everything i have under networking for device manager:

microsoft 6to4 adapter
microsoft ISATAP adapter
microsoft ISATAP adapter # 2
microsoft virtual miniport adapter
ralink rt61 turbo wireless LAN card (the card in question)
teredo tunneling pseudo-interface
WAN miniport (IKEv2)
WAN miniport (IP)
WAN miniport (IPv6)
WAN miniport (L2TP)
WAN miniport (Network Monitor)
WAN miniport (PPPOE)
WAN miniport (PPTP)
WAN miniport (SSTP)

this might be wishful thinking, but i think the following commands

Reset WINSOCK entries to installation defaults: netsh winsock reset catalog
Reset IPv4 TCP/IP stack to installation defaults. netsh int ipv4 reset reset.log
Reset IPv6 TCP/IP stack to installation defaults. netsh int ipv6 reset reset.log

may have helped speed my connection up to the whopping .22mpbs it's at right now. again, maybe this is just my fevered imagination at this point, but i think it was even slower before that.

here's two xirrus screen grabs, someone on another forum recommended i diagnose the connection that way:

this is what it was displaying. neither of these access points were my own. and also, i was connected to my own access point at this point in time, so i'm not sure why nothing was showing up in xirrus. after a few hours i noticed it was recognizing my access point:

i don't know if this helps anyone at all, though.

does anyone have any idea what's going on, or why my connection is so abysmally terrible? it's been like this for about 4 days now, and i'm about to give up and buy a little usb wifi adapter and spend another $40 i don't really have for this kind of thing.

thanks!




Hello all,

I've got a bit of a strange issue going on with a PC i just put together.
Its a Win7 Home Premium machine will all updates and service packs installed.
There is no antivirus software or security software or 3rd party firewall software installed...machine is clean though only play games on it.
its built on a MSI 970A-G46 motherboard and the issue involves the built in LAN Realtek port with latest drivers from MSI site.
Im trying to get the machine on the internet with my old pelican wireless 360 adapter. The pelican wireless 360 adapter is configured and setup properly for my wifi network. If i connect it via Ethernet cable to my ps3 or my macbook and tell them to configure via DHCP they get IP addresses and get on the internet fine. With the built in LAN port on the MSI board i get nothing, if i configure the IP manually with an address in the proper range it gets on the internet fine. I thought maybe there is somthing wrong with the NIC itself so i put in an old HD and downloaded the netinstaller for debian to see if it would grab an IP on its own during the install and that worked i was able to download and install debian without issue i did not need to manually enter the IP. So i guess that means the NIC is working fine, which leaves windows or driver issues. I ran the netsh ipreset command and that did not change anything, i also tried changing the speed and duplex from the advanced tab for the NIC from auto to 100 full duplex and that did not change anything either.

Any tips or advise or thoughts or anything its not a major issue as i can just assign a manual address but i'm pretty good with all things computers and such and its bugging me that i can't get it to work with DHCP.

Thanks in advance for any responses.




I'm not sure when this started happening - i don't think I changed any network settings, maybe after a windows update?

Anyhow, when i wake up my PC i'm unable to reach anything outside the LAN, even via it's IP address. I can ping the router and pull up the router's web page via http://192.168.0.1

I tried getting a new router - same problem.

The router is running dd-wrt, but it was happening with the default firmware as well as the latest firmware (asus rt-n16).

It's easy enough for me to fix the problem - i disabled the network connection and re-enable it and everything works. But this still a pain since I have my computer set up for Wake on Lan so that I can access it remotely.

The NIC is a Realtek PCIe card.

Anyone have any ideas why this is happening and how to fix it?




I've been connected to the same network using the same wireless adapter for about a year now, and it all decided to go kaput. I can connect to the network, but it's listed as an unidentified network with limited access. The troubleshooter told me that the problem was with the router, but countless other devices are working with the same router perfectly.

Fixes I've tried:
Uninstalling BonjourResetting the routerUsing a different network adapterSystem restoreDisabling IPv4Uninstalling and re-installing the network adapterInstalling the Reliable Multicast ProtocolSetting a manual IP addressipconfig /release and ipconfig /renew

Also, I've tried unsuccessfully to manually change my MAC address, but I can't find it in the properties for any of my adapters.

Here's an ipconfig /all that I ran:
Code: Microsoft Windows [Version 6.1.7600]Copyright (c) 2009 Microsoft Corporation. All rights reserved. C:UsersMarcus>ipconfig /all Windows IP Configuration Host Name . . . . . . . . . . . . : user-PC Primary Dns Suffix . . . . . . . : Node Type . . . . . . . . . . . . : Hybrid IP Routing Enabled. . . . . . . . : No WINS Proxy Enabled. . . . . . . . : No Ethernet adapter Local Area Connection: Media State . . . . . . . . . . . : Media disconnected Connection-specific DNS Suffix . : Description . . . . . . . . . . . : Realtek RTL8168C(P)/8111C(P) Family PCI-E Gigabit Ethernet NIC (NDIS 6.20) Physical Address. . . . . . . . . : 12-00-0C-00-AD-00 DHCP Enabled. . . . . . . . . . . : Yes Autoconfiguration Enabled . . . . : Yes Wireless LAN adapter Wireless Network Connection: Connection-specific DNS Suffix . : Description . . . . . . . . . . . : D-Link DWA-131 Wireless N Nano USB Adapte r Physical Address. . . . . . . . . : 00-18-E7-C4-32-19 DHCP Enabled. . . . . . . . . . . : Yes Autoconfiguration Enabled . . . . : Yes Link-local IPv6 Address . . . . . : fe80::d153:d5f1:6f48:3cf7%16(Preferred) Default Gateway . . . . . . . . . : DHCPv6 IAID . . . . . . . . . . . : 234887399 DHCPv6 Client DUID. . . . . . . . : 00-01-00-01-13-FB-47-60-00-21-9B-17-65-F4 DNS Servers . . . . . . . . . . . : fec0:0:0:ffff::1%1 fec0:0:0:ffff::2%1 fec0:0:0:ffff::3%1 NetBIOS over Tcpip. . . . . . . . : Disabled Tunnel adapter Teredo Tunneling Pseudo-Interface: Media State . . . . . . . . . . . : Media disconnected Connection-specific DNS Suffix . : Description . . . . . . . . . . . : Teredo Tunneling Pseudo-Interface Physical Address. . . . . . . . . : 00-00-00-00-00-00-00-E0 DHCP Enabled. . . . . . . . . . . : No Autoconfiguration Enabled . . . . : Yes Tunnel adapter isatap.{462F6913-F3CA-4FA9-B4D0-3B70CFCE54F2}: Media State . . . . . . . . . . . : Media disconnected Connection-specific DNS Suffix . : Description . . . . . . . . . . . : Microsoft ISATAP Adapter #2 Physical Address. . . . . . . . . : 00-00-00-00-00-00-00-E0 DHCP Enabled. . . . . . . . . . . : No Autoconfiguration Enabled . . . . : Yes Any suggestion of a fix would be very much appreciated.


Page 5 of 13.
Results 81...100 of 250