WiFiRS21 on 4.3 FEZ Spider does not get past init

Ok so I finally got my spider up to date.
And I plug in the WiFiRS21 into 6 or 9 and this is what I get on Initialization.

Needless to say it fails and white screens out.

The Driver code for wifi is in place so I could debug it.

Thanks

WARN: Total initialization time exceeds 10 seconds.
: ProgramStarted is blocking execution, which means events and timers will not run properly.
: Make sure not to use blocking code such as while(true) - use a GT.Timer instead.
Step into: Stepping over property ‘Gadgeteer.Socket.SPIModule.get’. To step into properties, go to Tools->Options->Debugging and uncheck ‘Step over properties and operators (Managed only)’.
Step into: Stepping over non-user code 'Gadgeteer.Socket.CpuPins.get’
Step into: Stepping over non-user code 'Gadgeteer.Socket.CpuPins.get’
Step into: Stepping over non-user code 'Gadgeteer.Socket.CpuPins.get’
Step into: Stepping over non-user code 'GHI.Networking.WiFiRS9110.WiFiRS9110’
Step into: Stepping over non-user code 'GHI.Networking.BaseInterface.BaseInterface’
Step into: Stepping over non-user code 'GHI.Networking.BaseInterface.BaseInterface’
Step into: Stepping over non-user code 'GHI.Networking.BaseInterface.BaseInterface’
Step into: Stepping over non-user code 'GHI.Networking.BaseInterface.BaseInterface’
Step into: Stepping over non-user code 'Microsoft.SPOT.Net.NetworkInformation.NetworkChange.NetworkAddressChanged.add’
Step into: Stepping over non-user code 'Microsoft.SPOT.Net.NetworkInformation.NetworkChange.NetworkAddressChanged.add’
Step into: Stepping over non-user code 'GHI.Networking.BaseInterface.BaseInterface’
Step into: Stepping over non-user code 'Microsoft.SPOT.Net.NetworkInformation.NetworkChange.NetworkAvailabilityChanged.add’
Step into: Stepping over non-user code 'Microsoft.SPOT.Net.NetworkInformation.NetworkChange.NetworkAvailabilityChanged.add’
Step into: Stepping over non-user code 'GHI.Networking.BaseInterface.BaseInterface’
Step into: Stepping over non-user code 'GHI.Networking.BaseInterface.RefreshNetworkInterface’
Step into: Stepping over non-user code 'Microsoft.SPOT.Net.NetworkInformation.NetworkInterface.GetAllNetworkInterfaces’
Step into: Stepping over non-user code 'Microsoft.SPOT.Net.NetworkInformation.NetworkInterface.GetAllNetworkInterfaces’
Step into: Stepping over non-user code 'Microsoft.SPOT.Net.NetworkInformation.NetworkInterface.GetAllNetworkInterfaces’
Step into: Stepping over non-user code 'Microsoft.SPOT.Net.NetworkInformation.NetworkInterface.GetAllNetworkInterfaces’
Step into: Stepping over non-user code 'Microsoft.SPOT.Net.NetworkInformation.NetworkInterface.GetAllNetworkInterfaces’
Step into: Stepping over non-user code 'Microsoft.SPOT.Net.NetworkInformation.NetworkInterface.GetAllNetworkInterfaces’
Step into: Stepping over non-user code 'GHI.Networking.BaseInterface.RefreshNetworkInterface’
Step into: Stepping over non-user code 'GHI.Networking.BaseInterface.BaseInterface’
Step into: Stepping over non-user code 'GHI.Networking.WiFiRS9110.WiFiRS9110’
Step into: Stepping over non-user code 'GHI.Networking.WiFiRS9110.WiFiRS9110’
Step into: Stepping over non-user code 'GHI.Networking.WiFiRS9110.WiFiRS9110’
Step into: Stepping over non-user code 'GHI.Networking.WiFiRS9110.WiFiRS9110’
Step into: Stepping over non-user code 'GHI.Networking.WiFiRS9110.WiFiRS9110’
Step into: Stepping over non-user code 'GHI.Networking.WiFiRS9110.WiFiRS9110’
Step into: Stepping over non-user code 'GHI.Networking.WiFiRS9110.WiFiRS9110’
Step into: Stepping over non-user code 'GHI.Networking.WiFiRS9110.WiFiRS9110’
Step into: Stepping over non-user code 'GHI.Networking.WiFiRS9110.WiFiRS9110’
Step into: Stepping over non-user code 'GHI.Networking.WiFiRS9110.WiFiRS9110’
Step into: Stepping over non-user code 'Microsoft.SPOT.Hardware.OutputPort.OutputPort’
Step into: Stepping over non-user code 'Microsoft.SPOT.Hardware.OutputPort.OutputPort’
Step into: Stepping over non-user code 'GHI.Networking.WiFiRS9110.WiFiRS9110’
Step into: Stepping over non-user code 'GHI.Networking.WiFiRS9110.WiFiRS9110’
Step into: Stepping over non-user code 'GHI.Networking.WiFiRS9110.UpdateInternalMacAddress’
Step into: Stepping over non-user code 'GHI.Networking.WiFiRS9110.Reset’
Step into: Stepping over non-user code 'GHI.Networking.WiFiRS9110.Reset’
Step into: Stepping over non-user code 'GHI.Networking.WiFiRS9110.Reset’
Step into: Stepping over non-user code 'GHI.Networking.WiFiRS9110.Reset’
Step into: Stepping over non-user code 'GHI.Networking.WiFiRS9110.Reset’
Step into: Stepping over non-user code 'GHI.Networking.WiFiRS9110.UpdateInternalMacAddress’
Step into: Stepping over non-user code 'GHI.Networking.WiFiRS9110.UpdateInternalMacAddress’
Step into: Stepping over non-user code 'GHI.Networking.WiFiRS9110.UpdateInternalMacAddress’
Step into: Stepping over non-user code 'GHI.Networking.WiFiRS9110.UpdateInternalMacAddress’
Step into: Stepping over non-user code ‘GHI.Networking.WiFiRS9110.WaitOn’

Here is an update:
Using mainboard GHI Electronics FEZ Spider version 1.0
#### Exception GHI.Networking.WiFiRS9110+HardwareFailureException - 0x00000000 (1) ####
#### Message:
#### GHI.Networking.WiFiRS9110::UpdateInternalMacAddress [IP: 001c] ####
#### Gadgeteer.Modules.GHIElectronics.WiFiRS21::.ctor [IP: 0054] ####
#### LENRController2.Program::InitializeModules [IP: 0015] ####
#### Exception GHI.Networking.WiFiRS9110+HardwareFailureException - 0x00000000 (1) ####
#### Message:
#### GHI.Networking.WiFiRS9110::ThrowFailure [IP: 0007] ####
#### GHI.Networking.WiFiRS9110::UpdateFirmware [IP: 0031] ####
#### Gadgeteer.Modules.GHIElectronics.WiFiRS21::.ctor [IP: 0054] ####
#### LENRController2.Program::InitializeModules [IP: 0015] ####
A first chance exception of type ‘GHI.Networking.WiFiRS9110.HardwareFailureException’ occurred in GHI.Networking.dll
An unhandled exception of type ‘GHI.Networking.WiFiRS9110.HardwareFailureException’ occurred in GHI.Networking.dll

@ danmeland - have you tried this really simple test. Although it is on a raptor it should work, you have to change the pins and spi channel/pins. Can be read from the spider schema, I don’t have a spider, otherwise I’d try.

https://www.ghielectronics.com/community/codeshare/entry/962

On the first line it is mentioned that you exceed the main loop time, it is advised to have the code in a separate thread. At least in gadgeteer mode.

1 Like

YES.
well that is the code that is done in the designer.
the copy of the wifirs21 driver is instantiated in the Progam.InitializeModules.

Not in my code.

presently I am bypassing the progam designer code and placing this in the time event.

        NetworkChange.NetworkAvailabilityChanged += NetworkChange_NetworkAvailabilityChanged;
        NetworkChange.NetworkAddressChanged += NetworkChange_NetworkAddressChanged;

        networkInterface = new WiFiRS9110(SPI.SPI_module.SPI1, Cpu.Pin.GPIO_Pin1, Cpu.Pin.GPIO_Pin2, Cpu.Pin.GPIO_Pin3);
        networkInterface.Open();
        networkInterface.EnableDhcp();
        networkInterface.EnableDynamicDns();

and wifirs21 is in socket 6

EDIT:

By the way if I use the designer code the initializeModules fails on WiFiRS9110.WaitOn.

Step into: Stepping over non-user code 'GHI.Networking.WiFiRS9110.Reset’
Step into: Stepping over non-user code 'GHI.Networking.WiFiRS9110.UpdateInternalMacAddress’
Step into: Stepping over non-user code 'GHI.Networking.WiFiRS9110.UpdateInternalMacAddress’
Step into: Stepping over non-user code 'GHI.Networking.WiFiRS9110.UpdateInternalMacAddress’
Step into: Stepping over non-user code 'GHI.Networking.WiFiRS9110.UpdateInternalMacAddress’
Step into: Stepping over non-user code ‘GHI.Networking.WiFiRS9110.WaitOn’

The CLR reboots at this point.

I try with my Cerberus.

And I got Hardware failure on Construct WifiRS21 


‘Microsoft.SPOT.Debugger.CorDebug.12.dll’ (ManagĂ©) : ‘C:\Program Files (x86)\Microsoft .NET Gadgeteer\Core\Assemblies.NET Micro Framework 4.3\le\Gadgeteer.WebClient.dll’ chargĂ©, symboles chargĂ©s.
Le thread ‘’ (0x2) s’est arrĂȘtĂ© avec le code 0 (0x0).
Using mainboard GHI Electronics FEZ Cerberus version 1.3
Une exception de premiùre chance de type ‘GHI.Networking.WiFiRS9110.HardwareFailureException’ s’est produite dans GHI.Networking.dll
Une exception non gĂ©rĂ©e du type ‘GHI.Networking.WiFiRS9110.HardwareFailureException’ s’est produite dans GHI.Networking.dll




At the same place, I can connect ENC28 and all works.
            
```cs]_ethernet=new EthernetENC28J60(SPI.SPI_module.SPI1,(Cpu.Pin)13,(Cpu.Pin)14,(Cpu.Pin)26);[/code


Same problem or not ?!?

Oh, sorry I did’nt know but where it is noticed and why ?

But if reply is too long and risks to pollute this subject I’ll open a new one 


Thanks anyway @ andre.m !

Yes Cerberus is great for small app requirements.
But If I understand why cerberus can handle wifi module, it would be nice to indicate that in document, it could save some hours !

I’ll try now with Spider !

@ danmeland - In your second post you did not update the pins in the constructor to match those on socket six. It should be networkInterface = new WiFiRS9110(SPI.SPI_module.SPI2, (Cpu.Pin)10, (Cpu.Pin)18, (Cpu.Pin)20);

Thanks John,

But
 that didn’t do it either.
I get the same UpdateMacAddress error.

It appears that the WaitOn call or the UpdateMACAddress is failing.

I hard coded to the line you instructed and commented out the lines in the WiFirs21 driver 4.3 code.

Then executed the line in the timer.

It is better but


Using mainboard GHI Electronics FEZ Spider version 1.0
Program Started
Step into: Stepping over non-user code 'GHI.Networking.WiFiRS9110.WiFiRS9110’
Step into: Stepping over non-user code 'GHI.Networking.BaseInterface.BaseInterface’
Step into: Stepping over non-user code 'GHI.Networking.BaseInterface.BaseInterface’
Step into: Stepping over non-user code 'GHI.Networking.BaseInterface.BaseInterface’
Step into: Stepping over non-user code 'GHI.Networking.BaseInterface.BaseInterface’
Step into: Stepping over non-user code 'Microsoft.SPOT.Net.NetworkInformation.NetworkChange.NetworkAddressChanged.add’
Step into: Stepping over non-user code 'Microsoft.SPOT.Net.NetworkInformation.NetworkChange.NetworkAddressChanged.add’
Step into: Stepping over non-user code 'GHI.Networking.BaseInterface.BaseInterface’
Step into: Stepping over non-user code 'Microsoft.SPOT.Net.NetworkInformation.NetworkChange.NetworkAvailabilityChanged.add’
Step into: Stepping over non-user code 'Microsoft.SPOT.Net.NetworkInformation.NetworkChange.NetworkAvailabilityChanged.add’
Step into: Stepping over non-user code 'GHI.Networking.BaseInterface.BaseInterface’
Step into: Stepping over non-user code 'GHI.Networking.BaseInterface.RefreshNetworkInterface’
Step into: Stepping over non-user code 'Microsoft.SPOT.Net.NetworkInformation.NetworkInterface.GetAllNetworkInterfaces’
Step into: Stepping over non-user code 'Microsoft.SPOT.Net.NetworkInformation.NetworkInterface.GetAllNetworkInterfaces’
Step into: Stepping over non-user code 'Microsoft.SPOT.Net.NetworkInformation.NetworkInterface.GetAllNetworkInterfaces’
Step into: Stepping over non-user code 'Microsoft.SPOT.Net.NetworkInformation.NetworkInterface.GetAllNetworkInterfaces’
Step into: Stepping over non-user code 'Microsoft.SPOT.Net.NetworkInformation.NetworkInterface.GetAllNetworkInterfaces’
Step into: Stepping over non-user code 'Microsoft.SPOT.Net.NetworkInformation.NetworkInterface.GetAllNetworkInterfaces’
Step into: Stepping over non-user code 'GHI.Networking.BaseInterface.RefreshNetworkInterface’
Step into: Stepping over non-user code 'GHI.Networking.BaseInterface.BaseInterface’
Step into: Stepping over non-user code 'GHI.Networking.WiFiRS9110.WiFiRS9110’
Step into: Stepping over non-user code 'GHI.Networking.WiFiRS9110.WiFiRS9110’
Step into: Stepping over non-user code 'GHI.Networking.WiFiRS9110.WiFiRS9110’
Step into: Stepping over non-user code 'GHI.Networking.WiFiRS9110.WiFiRS9110’
Step into: Stepping over non-user code 'GHI.Networking.WiFiRS9110.WiFiRS9110’
Step into: Stepping over non-user code 'GHI.Networking.WiFiRS9110.WiFiRS9110’
Step into: Stepping over non-user code 'GHI.Networking.WiFiRS9110.WiFiRS9110’
Step into: Stepping over non-user code 'GHI.Networking.WiFiRS9110.WiFiRS9110’
Step into: Stepping over non-user code 'GHI.Networking.WiFiRS9110.WiFiRS9110’
Step into: Stepping over non-user code 'GHI.Networking.WiFiRS9110.WiFiRS9110’
Step into: Stepping over non-user code 'Microsoft.SPOT.Hardware.OutputPort.OutputPort’
Step into: Stepping over non-user code 'Microsoft.SPOT.Hardware.OutputPort.OutputPort’
Step into: Stepping over non-user code 'GHI.Networking.WiFiRS9110.WiFiRS9110’
Step into: Stepping over non-user code 'GHI.Networking.WiFiRS9110.WiFiRS9110’
Step into: Stepping over non-user code 'GHI.Networking.WiFiRS9110.UpdateInternalMacAddress’
Step into: Stepping over non-user code 'GHI.Networking.WiFiRS9110.Reset’
Step into: Stepping over non-user code 'GHI.Networking.WiFiRS9110.Reset’
Step into: Stepping over non-user code 'GHI.Networking.WiFiRS9110.Reset’
Step into: Stepping over non-user code 'GHI.Networking.WiFiRS9110.Reset’
Step into: Stepping over non-user code 'GHI.Networking.WiFiRS9110.Reset’
Step into: Stepping over non-user code 'GHI.Networking.WiFiRS9110.UpdateInternalMacAddress’
The thread ‘’ (0x3) has exited with code 0 (0x0).
Step into: Stepping over non-user code 'GHI.Networking.WiFiRS9110.UpdateInternalMacAddress’
Step into: Stepping over non-user code 'GHI.Networking.WiFiRS9110.UpdateInternalMacAddress’
Step into: Stepping over non-user code 'GHI.Networking.WiFiRS9110.UpdateInternalMacAddress’
Step into: Stepping over non-user code ‘GHI.Networking.WiFiRS9110.WaitOn’

@ danmeland - And you get the same exception from your first post?

Yes.

@ danmeland - Do you have any other mainboard you can try this on?

No I don’t.

@ danmeland - Can you try to reflash the loader and firmware on the device? If it still fails after that, do you see a green light illuminate on the board at all when your program runs?

Ok, but
 the green lit is on when the 9110 WaitOn call is made.
So it is seeing the card, just failing out.

@ danmeland - Have you tried to use it from a new non-Gadgeteer application?

Out of interest, what version of WiFiRS21 module do you have? I have a version 1.1 that throws exceptions during initialisation but the version 1.2 works fine.

John, No I really am not sure how, but would try it.

Spirgo, it is version 1.2.
Just got it two weeks ago.

stamped rs9110-n-11-22-04

@ danmeland - Have you ever gotten the module to work?

Yes in 4.2

@ danmeland - And if you go back to 4.2, does it work again?