Catch and Read WiFi.WiFiException error code
http://www.ghielectronics.com/downloads/NETMF/Library%20Documentation/html/ed8a2169-4d0e-7b22-5421-d0469fb255cf.htm
Joe,
Thanks for that. THat has been the biggest help so far. It turns out I had not added a reference to GHIElectronics.NETMF.Net, thats why I could not effectivly deal with the exception or find the error message and error code. At least I know what the error code is now.
I have been getting error code 3. Which is Authenticaion failure or Wrong pass phrase. The thing about it is that the pass phrase I was passing into the method call was correct. I checked it serveral times with other devices. I set a break point at the Join method call and checked the properties of MyNet. The security mode is 3, WEP, which is correct. All the other properties were also correct. I know that the string I am passing is correct.
Any other ideas?
Debug.Print("Program Started");
wifi.UseDHCP();
WiFi_RS21.WiFiNetworkInfo MyNet = wifi.Search("wireless");
try
{
wifi.Join(MyNet,"15128");
}
catch (WiFi.WiFiException ex)
{
Debug.Print("Exception was Error: " + ex.Message);
Debug.Print("Error code: "+ex.errorCode);
Debug.Print("Error MSG "+ex.ErrorMsg.ToString());
Debug.Print("Stack trace: " + ex.StackTrace.ToString());
}
if (wifi.IsNetworkConnected)
{
led.TurnGreen();
}
I believe the length of a wep key must be at least 10 hex digtits long?
try hex equivalent of five char password.
Yes it must be a 10 digit hex number with WEP 64bit key
This link seems to be broken.