Using code tags will make your post more readable. This can be done in two ways:[ol]
Click the â101010â icon and paste your code between the
tags or...
Select the code within your post and click the "101010" icon.[/ol]
(Generated by QuickReply)
Welcome to the forum.
What brand/type of access point do you have?
Another user reported something similar when trying to join to a Cisco AP, but when using the same code and a different brand AP, it worked just fine.
Yeah I set a break point. MyNet does have a value when the join() method is called. It appears to have all the correct information in it as well. I cant find what the issue could be.
I will try that. Should I put the IP address, gateway and DNS address from my network, the ones I have already posted above or should I create different ones? I know that may sound like a really dumb question but I have no idea. First time with networking.
Each device on your network needs a unique IP address. However, the Subnet mask, Gateway and DNS should be the same as what you listed earlier.
If it were me, I would pick the next one higher (I am assuming that the 192.168.1.5 is from your PC) â so 192.168.1.6
From your PC, open a command window and do âPING 192.168.1.6â. If it comes back with 4 âRequest timed out.â then more than likely that address is free on your network. If the response to that command is âReply from 192âŚâ then that address is use - then pick another address and try again, like 192.168.1.7.
Once you get an unused IP address, use that in RS21 module.
Thanks, Still no joy though. I keep getting the exception message. I cant work out what is going wrong. The Module must be able to communicate with the network because it identify available networks. THere is no delay between the Join() method being called and the excpetion message, to me it appears as if the method contians some bad code, with respect to my particular network anyway, although I havent done anything strange to my network and none of my other devices have any problems joining. If there was some delay if the Method call and and excpetion I would be checking the router and authentication but there is no delay at all so I dont beleive the module is even communicating with the router when the method is called.
bsaunders, hi there. I just saw your APâs name in your debug and thought - an Aussie ! Iâm Sydney based, let me know where you are (or update your profile to show that).
I canât help on the RS21 side though sorry, I donât have one.
Actually I do have one line of questions about this. We all know the RS21 is sensitive to power, can you tell us what Fez device you have it on and what power supply you have ?
Hi Bret, Im in Townsville. Im running a FEZ Spider, for power im just using the USBClientDP module. Do you think the module is not getting enough power?
Townsville, ok well no local Fezaholics Anonymous meet-up for us then
DP module, with or without an external power supply? If without, then you may well be pushing the boundaries of a USB power supply, which is meant to be able to supply only 500mA but often donât. If you can connect the Fez to a powered hub, or better still run the device with a 1A power supply input into the DP module, that would be better. We explicitly saw a module that was working OK up to the point where it had to join an AP; then it reset and did all kinds of weirdness, and by using a more capable power supply the problem was resolved.
OK I will gove that try. I just got another strange result, while trying to run the example code on GHI website:
void ProgramStarted()
{
GT.Timer t = new GT.Timer(10000);
t.Tick += new GT.Timer.TickEventHandler(t_Tick);
t.Start();
}
void t_Tick(GT.Timer timer)
{
timer.Stop();
// setup events
//wifi.NetworkDown += new GT.Modules.Module.NetworkModule.NetworkEventHandler(wifi_NetworkDown);
wifi.NetworkUp += new GT.Modules.Module.NetworkModule.NetworkEventHandler(wifi_NetworkUp);
// to use hold the network to connect to
WiFi_RS21.WiFiNetworkInfo info = null;
// use the router's DHCP server to set my network info
wifi.UseDHCP();
// look for avaiable networks
WiFi_RS21.WiFiNetworkInfo[] scanResults = wifi.Scan();
// go through each network and print out settings in the debug window
foreach (WiFi_RS21.WiFiNetworkInfo result in scanResults)
{
Debug.Print("****" + result.SSID + "****");
Debug.Print("ChannelNumber = " + result.ChannelNumber);
Debug.Print("networkType = " + result.networkType);
//Debug.Print("PhysicalAddress = " + GetMACAddress(result.PhysicalAddress));
Debug.Print("RSSI = " + result.RSSI);
Debug.Print("SecMode = " + result.SecMode);
}
// locate a specific network
info = wifi.Search("wireless");
if (info != null)
{
wifi.Join(info, "15128");
Debug.Print("Network joined");
// After connecting, go out and get a web page. This can also be used to access web services
Gadgeteer.Networking.HttpRequest wc = WebClient.GetFromWeb("http://www.tinyclr.com");
wc.ResponseReceived += new HttpRequest.ResponseHandler(wc_ResponseReceived);
}
}
void wc_ResponseReceived(HttpRequest sender, HttpResponse response)
{
string text = response.Text;
// now that the information has been returned, disconnect from the network
wifi.Disconnect();
}
void wifi_NetworkUp(GT.Modules.Module.NetworkModule sender, GT.Modules.Module.NetworkModule.NetworkState state)
{
if (state == GT.Modules.Module.NetworkModule.NetworkState.Up)
Debug.Print("Network Up event; state = Up");
else
Debug.Print("Network Up event; state = Down");
}
}
This time the excpetion was with regard to the timer:
Well i tried connecting an external power source to the USBClientDP module, I bought one with 12 V output and up to 2.5A. Still no joy. Same exception.
Joe, How would I catch this exception? Could you paste some example code? I tired cathing âGHIElectronics.NETMF.Net.WiFi.WiFiExceptionâ but I keep getting a message saying are you missing a reference. Surely if I have added the module I have also added all the required references to effectly command the module, inculding error handling?
THe Debug out was Exception was Error: Exception was thrown: GHIElectronics.NETMF.Net.WiFi+WiFiException. Which isnt much help. That was contained in the Debug output when the exception was unhandled, in hind sight.
I appreciate you assistance on this, I have absolutly no idea what the problem is. Im starting the think in my be an issue on on the FEZ Spider itself. although I dont have any other issues with it so maybe it was orginal thought in that the dll contains some some code that simply isnt working with my setup. Although im not running anything special so I cant work out what the issue could be.
on the debug.print line, put a breakpoint and then check out the ex object (hover over it with the mouse), and see if you can see more detail in itâs details.