I have bought EMX spider with J11D Eth board and Wifi_RS21 board. I took a try to connect EMX with my Netgear router. The result is that I can make the connection with J11D, but I failed with Wifi_RS21, and the message I got from dll:
tc_ip_process: iface not open
the code that I use isquite standard:
wifi.UseDHCP();
string myAP = "NETGEAR";
wifi.NetworkDown += new GTM.Module.NetworkModule.NetworkEventHandler(wifi_NetworkDown);
wifi.NetworkUp += new GTM.Module.NetworkModule.NetworkEventHandler(wifi_NetworkUp);
Debug.Print("Scan for wireless networks");
try
{
WiFi_RS21.WiFiNetworkInfo[] scanResult = wifi.Scan();
if (scanResult != null)
{
foreach (WiFi_RS21.WiFiNetworkInfo x in scanResult)
{
Debug.Print(x.ToString());
Debug.Print("------------------------------------");
}
}
else
{
Debug.Print("No wireless netowrks were found.");
AddLogMessage(txtf, "No wireless netowrks were found.");
}
}
catch (Exception ex)
{
Debug.Print(ex.Message);
}
Debug.Print("Searching for: " + myAP);
WiFi_RS21.WiFiNetworkInfo myBSS = null;
try
{
myBSS = wifi.Search(myAP);
}
catch (Exception)
{ }
if (myBSS != null)
{
Debug.Print("Connecting to " + myAP);
wifi.Join(myBSS, "password"); // Network with WEP 64bit (10 hex digits).
Debug.Print("Connected");
AddLogMessage(txtf, "Wifi Connected");
}
else
{
Debug.Print(myAP + " Wireless network was not found");
AddLogMessage(txtf,myAP + " Wireless network was not found");
}
I really want to do what’s wrong with my code or any thing I missed.
Thanks