Thanks andre:
I will try it .
Who can recommend GHI to modify their tutorials?
I think a new user will confused to use this example and will waste time.
So If the new SDK released, maybe the tutorials can be modified in the same time.
It is better for many starters.
Maybe this will be of some help.
WiFi using 4.2 DOES work… Really…
I’m not a expert on anything but I was having problems trying to get WiFi to work using 4.2 and I saw this post.
A question from Weston Bridgewater “However, my up address keeps coming up 0.0.0.0 no matter what.”
Dear willgeorge
Thank you.
Actually, I have down load all your Wifi related project and take a part of your code to modify my code.
I don’t know why it do not work for me, I was also asking in http://www.tinyclr.com/forum/topic?id=9648
Hi, andre
Thanks for your hint, I will try tomorrow.
Thank you Gus, I think I will pay more efforts in NETMF and Gadgeteer in 2013.
I conduct a research project in my company ,I recommend my boss to use GHI’s products to develop.
So I think I will frequently find help in the forum.
Dear willgeorge"
When I run your code (WiFi42), I got errors below.
A first chance exception of type ‘GHI.Premium.Net.NetworkInterfaceExtensionException’ occurred in GHI.Premium.Net.dll
An unhandled exception of type ‘GHI.Premium.Net.NetworkInterfaceExtensionException’ occurred in GHI.Premium.Net.dll
I have tried two days, but still not work. Depressed.
What’s wrong in my code below?
public partial class Program
{
string ssid = "ZyXEL9FA"; // <<<<< You need to enter your SSID here
string PassKey = "sinotech11569326"; // <<<<< You need to enter your Password/Key here
// This method is run when the mainboard is powered up or reset.
void ProgramStarted()
{
wifi_RS21.Interface.WirelessConnectivityChanged += new WiFiRS9110.WirelessConnectivityChangedEventHandler(Interface_WirelessConnectivityChanged);
InitializeWifi();
NetworkInterfaceExtension.AssignNetworkingStackTo(wifi_RS21.Interface);
// Use Debug.Print to show messages in Visual Studio's "Output" window during debugging.
Debug.Print("Program Started");
}
private void InitializeWifi()
{
if (!wifi_RS21.Interface.IsOpen)
{
wifi_RS21.Interface.Open();
}
if (!wifi_RS21.Interface.NetworkInterface.IsDhcpEnabled)
{
wifi_RS21.Interface.NetworkInterface.EnableDhcp();
}
// NetworkInterfaceExtension.AssignNetworkingStackTo(wifi_RS21.Interface);
try
{
WiFiNetworkInfo[] networkinfo = wifi_RS21.Interface.Scan(ssid);
if (networkinfo != null && networkinfo.Length > 0)
{
wifi_RS21.Interface.Join(networkinfo[0], PassKey);//networkinfo[0]
Debug.Print("IP=" + wifi_RS21.Interface.NetworkInterface.IPAddress);
}
}
catch (Exception e)
{
Debug.Print("!!Exception : " + e.Message);
}
}
void Interface_WirelessConnectivityChanged(object sender, WiFiRS9110.WirelessConnectivityEventArgs e)
{
Debug.Print("IP=" + wifi_RS21.Interface.NetworkInterface.IPAddress);
Debug.Print("IP=" + e.IsConnected.ToString());
Gadgeteer.Networking.HttpRequest wc = WebClient.GetFromWeb("http://www.google.com");
wc.ResponseReceived += new HttpRequest.ResponseHandler(wc_ResponseReceived);
}
void wc_ResponseReceived(HttpRequest sender, HttpResponse response)
{
string text = response.Text;
Debug.Print("***Response is received : " + text);
}
}
The debug output
Using mainboard GHI Electronics FEZSpider version 1.0
RS9110 firmware version Number is 4.4.5
RS9110 driver version Number is 4.4.5
IP=0.0.0.0
IP=True
IP=0.0.0.0
Program Started
The thread ‘’ (0x3) has exited with code 0 (0x0).
#### Exception System.Net.Sockets.SocketException - CLR_E_FAIL (6) ####
#### Message:
#### Microsoft.SPOT.Net.SocketNative::getaddrinfo [IP: 0000] ####
#### System.Net.Dns::GetHostEntry [IP: 0008] ####
#### System.Net.HttpWebRequest::EstablishConnection [IP: 00e1] ####
#### System.Net.HttpWebRequest::SubmitRequest [IP: 0019] ####
#### System.Net.HttpWebRequest::GetResponse [IP: 000c] ####
#### Gadgeteer.Networking.HttpRequest::HandleRequestSync [IP: 01a9] ####
#### SocketException ErrorCode = 10060
#### SocketException ErrorCode = 10060
A first chance exception of type ‘System.Net.Sockets.SocketException’ occurred in Microsoft.SPOT.Net.dll
#### SocketException ErrorCode = 10060
#### SocketException ErrorCode = 10060
#### Exception System.Net.WebException - 0x00000000 (6) ####
#### Message: host not available
#### System.Net.HttpWebRequest::EstablishConnection [IP: 00f1] ####
#### System.Net.HttpWebRequest::SubmitRequest [IP: 0019] ####
#### System.Net.HttpWebRequest::GetResponse [IP: 000c] ####
#### Gadgeteer.Networking.HttpRequest::HandleRequestSync [IP: 01a9] ####
A first chance exception of type ‘System.Net.WebException’ occurred in System.Http.dll
#### Exception System.Net.WebException - 0x00000000 (6) ####
#### Message:
#### System.Net.HttpWebRequest::GetResponse [IP: 00d3] ####
#### Gadgeteer.Networking.HttpRequest::HandleRequestSync [IP: 01a9] ####
A first chance exception of type ‘System.Net.WebException’ occurred in System.Http.dll
An exception occured while connecting to the Internet. Please, make sure that a valid URL is used and a network connection is up.
No help I can offer but I wonder why you are receiving the #### SocketException ErrorCode = 10060
WSAETIMEDOUT
10060
Connection timed out.
A connection attempt failed because the connected party did not properly respond after a period of time,
or the established connection failed because the connected host has failed to respond.
First post in 2013/1/1
I test the wifi module in my house, the router on my home is wep. But, still not works even use my code or willgeorge’s code.
Do not understand what is doing on? Maybe re-install the firmware?
Anyway , happy new year for you guys in this forum, thanks for your help in 2012.