WiFi RS21 stopped working

My RS21 has stopped working for some reason. I have no idea what caused it. No hardware changed and no code changed that related to the WiFi module.

The program has been working for some time without problems.

I think something happened to the WiFi firmware and needs refreshing but I have not been able to get the wifi_RS21.Interface.UpdateFirmware() to work.

But then again, I cannot find anything that shows what code is required to make it ‘do it’s thing’… I have tried but have not been successful.

So I am asking for one of the GHI software Gurus for help. Besides I would think this should be provided in print somewhere…

I receive two different errors depending I the code I have tried.



wifi_RS21.Interface.IsLinkConnected

'wifi_RS21.Interface.IsLinkConnected' threw an exception of type 'GHI.Premium.Net.NetworkInterfaceExtensionException'
	bool {GHI.Premium.Net.NetworkInterfaceExtensionException}

errorCode 12 GHI.Premium.Net.NetworkInterfaceExtensionException.ErrorCode {int}

 I believe this is 'HardwareCommunicationTimeout'

It means that the system could communicate with the WiFi module but
it did not get the expected initialization response. 
This happens when the WiFi module firmware is corrupted. 
The firmware can be updated using WiFi FirmwareUpdate() method. 
Using mainboard GHI Electronics FEZSpider version 1.0
Program Started
The thread '<No Name>' (0x3) has exited with code 0 (0x0).
Start Updating WiFi module firmware:
This might take up to 1 minute
0 Sec
1 Sec
2 Sec
3 Sec
4 Sec
5 Sec
......
98 Sec
99 Sec
RS9110 firmware update failed: Time out
    #### Exception GHI.Premium.Net.NetworkInterfaceExtensionException - 0x00000000 (1) ####
    #### Message: 
    #### GHI.Premium.Net.WiFiRS9110::UpdateFirmware [IP: 006a] ####
    #### KindleWifiSpeakSpider.Program::updateWiFiModule [IP: 000b] ####
    #### Gadgeteer.Modules.GHIElectronics.Button::OnButtonEvent [IP: 0058] ####
    #### Gadgeteer.Modules.GHIElectronics.Button::_input_Interrupt [IP: 0068] ####
    #### Gadgeteer.Interfaces.InterruptInput::OnInterruptEvent [IP: 0055] ####
    #### System.Reflection.MethodBase::Invoke [IP: 0000] ####
    #### Gadgeteer.Program::DoOperation [IP: 001a] ####
    #### Microsoft.SPOT.Dispatcher::PushFrameImpl [IP: 0054] ####
    #### Microsoft.SPOT.Dispatcher::PushFrame [IP: 001a] ####
    #### Microsoft.SPOT.Dispatcher::Run [IP: 0006] ####
    #### Gadgeteer.Program::Run [IP: 0020] ####
A first chance exception of type 'GHI.Premium.Net.NetworkInterfaceExtensionException' occurred in GHI.Premium.Net.dll
Error invoking method "Gadgeteer.Interfaces.InterruptInput" (check arguments to Program.BeginInvoke are correct)

// With a different approach I receive...

            try
            {
                wifi_RS21.Interface.UpdateFirmware();
            }
            catch (SystemException)
            {
                //The System exception received is NOT caught here
            }

Using mainboard GHI Electronics FEZSpider version 1.0
Program Started. Press button to begin.
RS9110 firmware version Number is 4.4.5
RS9110 driver version Number is 4.4.5
Start Updating WiFi module firmware:
This might take up to 1 minute
0 Sec
1 Sec
2 Sec

//Long delay here 5/10 seconds

The thread '<No Name>' (0x3) has exited with code 0 (0x0).

3 Sec
4 Sec
5 Sec
    #### Exception System.Exception - 0xffffffff (5) ####
    #### Message: 
    #### GHI.Premium.Net.RS9110Helper::QueryConnectionStatus [IP: 0000] ####
    #### GHI.Premium.Net.RS9110Helper::CheckForEvent [IP: 001e] ####
An unhandled exception of type 'System.Exception' occurred in GHI.Premium.Net.dll


As of now. my Module is useless… Sad here…

Any time I see a “randomly stopped working with no change” I think two things. First, the natural instinct is to say of course there was a change :wink: But I’ll assume you really mean there was no change and move past that…

Second, I always try to suggest simple things first, like swapping cables and adding more debugging rather than trying to force something like a firmware update (which personally I don’t think you need to do - I suspect the RS modules are pretty solid in that regard). Did you test any of that by any chance?

@ Brett -

The only code change I made to the application was to add a button in the Glide XML and a event handler in the code. I changed nothing related to the WiFi code. I use the same code in other applications. In fact it is the same code (with slight changes) that was used for the DHCP test that Gus had posted.

I tried a new ribbon cable and changed to socket 6 from socket 9.

As to… which personally I don’t think you need to do - That very well may be… but for some reason the RS21 just stopped working and everything I tried did not bring it back to life.

I finally got it working again but I am still not sure what went wrong.

One thing I (finally) noticed is that the green led on the RS21 never came on when the EMX booted up.

The led turned green only on method wifi_RS21.Interface.Open() and would turn off on method wifi_RS21.Interface.Join()… with Exceptions.

I erased the application and rebooted the CLR several times and restarted the Spider. For no particular reason, I erased several times and on the fifth (5) erasure and restart the RS21
finally had the green led ON at restart. Not sure what or why… But it is working again.

Thank You for your suggestions and for responding.