I am getting a “GHI.Premium.Net.NetworkInterfaceExtensionException” when I try to join my wifi network. Any ideas whats wrong here?
public void Connect()
{
var networkName = configurationManager.GetSetting(ConfigSettings.WifiNetwork);
var password = configurationManager.GetSetting(ConfigSettings.WifiPassword);
if (!wifi.Interface.IsOpen)
wifi.Interface.Open();
var networks = wifi.Interface.Scan(networkName);
if (networks == null || networks.Length < 1)
throw new Exception("Could not find a WIFI network with name: " + networkName);
var network = networks[0];
wifi.Interface.Join(network, password);
}
@ tvinko I tried all your suggestions, but am still getting an error on Join. The error code is 7 (authentication failed). However, I am 100% sure i have the right password to connect to my WEP wifi network.
Also the authentication error is a little misleading because that is wrapping another error that occurred. (see attached image).
@ Paul F. - Did you check (Debug.print) the networks[] array. Perhaps there are more than one networks with the same name in your area and you try to join a false one?
Roland
@ RoSchmi, yep I’m sure I have the right network, there is only one with the name I’m using.
Also, I have tried every combination of WEP 64 key / String/Hex password and WEP 128 key / String/Hex password - just keep getting error 7 (authentication failed).
I have also tried the “UpdateFirmware” method a couple times, but that fails with an exception every time, so that’s not working either.
I’m not sure what else to try, have been working on this for hours now.
I guess I could try a static IP, but need to figure out what the network card’s MAC address is - anyone know how to do that?