WiFi RS21 problem

Hello,
I have a problem with connecting to internet with Wifi RS21 and Fez Spider board. On Spider, I have installed 4.2 firmware.
I found available networks, connect to password protected network, and get dynamic ip address (in my case 192.168.10.6). However, I cannot ping this address from my laptop, which is in same network. When I try to get response from web page, the socket server occures. Please help :slight_smile:
The code and output messages:

 
        void ConnectMe()
        {
            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);

            wifi_RS21.Interface.WirelessConnectivityChanged += new WiFiRS9110.WirelessConnectivityChangedEventHandler(Interface_WirelessConnectivityChanged);
            wifi_RS21.Interface.NetworkAddressChanged       += new NetworkInterfaceExtension.NetworkAddressChangedEventHandler(Interface_NetworkAddressChanged);
            wifi_RS21.NetworkDown                           += new GTM.Module.NetworkModule.NetworkEventHandler(wifi_RS21_NetworkDown);
            wifi_RS21.NetworkUp                             += new GTM.Module.NetworkModule.NetworkEventHandler(wifi_RS21_NetworkUp);

            WiFiNetworkInfo[] ScanResp = wifi_RS21.Interface.Scan("MyAP");
            if (ScanResp != null && ScanResp.Length > 0)
                wifi_RS21.Interface.Join(ScanResp[0], "MyPwd");
            
            Debug.Print("Connected to network...");
            Gadgeteer.Networking.HttpRequest wc = WebClient.GetFromWeb("http://www.google.com");
            wc.ResponseReceived += new HttpRequest.ResponseHandler(wc_ResponseReceived);
            Debug.Print("Waiting for response...");
        }

        void wifi_RS21_NetworkUp(GTM.Module.NetworkModule sender, GTM.Module.NetworkModule.NetworkState state)
        {
            Debug.Print("NetworkUp event!");
        }

        void wifi_RS21_NetworkDown(GTM.Module.NetworkModule sender, GTM.Module.NetworkModule.NetworkState state)
        {
            Debug.Print("NetworkDown event!");
        }
        
        void Interface_WirelessConnectivityChanged(object sender, WiFiRS9110.WirelessConnectivityEventArgs e)
        {
            Debug.Print("WirelessConnectivityChanged event!");
            Debug.Print("IP Address : " + wifi_RS21.Interface.NetworkInterface.IPAddress);
        }

        void wc_ResponseReceived(HttpRequest sender, HttpResponse response)
        {
            Debug.Print("Response is received");
            string text = response.Text;
        }

        void Interface_NetworkAddressChanged(object sender, EventArgs e)
        {
            Debug.Print("NetworkAddressChanged event!");
            Debug.Print("IP Address : " + wifi_RS21.Interface.NetworkInterface.IPAddress);
        }

And messages:

Using mainboard GHI Electronics FEZSpider version 1.0
RS9110 firmware version Number is 4.4.5
RS9110 driver version Number is 4.4.5

NetworkDown event!

WirelessConnectivityChanged event!
IP Address : 0.0.0.0

Connected to network…

Waiting for response…

NetworkAddressChanged event!
IP Address : 192.168.10.6

#### Exception System.Net.Sockets.SocketException - CLR_E_FAIL (9) ####
#### 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 (9) ####
#### 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 (9) ####
#### 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.


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)

Thanks for warning. Modified…

I tested code at my work, with different router works. Is there any issues with RS21, that work only with specific routers?

Not that we are aware of.

Is it possible to update firmware on RS21? What is purpose of method UpdateFirmware() ?

Thanks

Perhaps this is of use:

http://www.tinyclr.com/forum/topic?id=8618&page=3

Also from bsaunders:

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());
            }

Thanks for tip. I’ll try this…