I am having trouble to get the Wifi module working with the FEZ Spider board. I get following error / exception thrown on initialization:
Using mainboard GHIElectronics-FEZSpider version 1.0
Version Number is 4.3.0
#### Exception GHIElectronics.NETMF.Net.WiFi+HardwareException - 0x00000000 (1) ####
#### Message:
#### GHIElectronics.NETMF.Net.WiFi::Enable [IP: 008d] ####
#### Gadgeteer.Modules.GHIElectronics.WiFi_RS21::.ctor [IP: 0064] ####
#### WifiTest.Program::InitializeModules [IP: 0006] ####
#### WifiTest.Program::Main [IP: 0010] ####
A first chance exception of type 'GHIElectronics.NETMF.Net.WiFi.HardwareException' occurred in GHIElectronics.NETMF.Net.dll
#### Exception System.ApplicationException - 0x00000000 (1) ####
#### Message: Unable to enable WiFi module.
#### Gadgeteer.Modules.GHIElectronics.WiFi_RS21::.ctor [IP: 006e] ####
#### WifiTest.Program::InitializeModules [IP: 0006] ####
#### WifiTest.Program::Main [IP: 0010] ####
A first chance exception of type 'System.ApplicationException' occurred in GTM.GHIElectronics.WiFi_RS21.dll
An unhandled exception of type 'System.ApplicationException' occurred in GTM.GHIElectronics.WiFi_RS21.dll
Additional information: Unable to enable WiFi module.
I get the same error when connecting the wifi module to socket 6 or to socket 9.
Just a quick update. I have tried your test code. It succeeded once including connecting to my airport extreme and DNS test but in all other cases it failed when trying to enable DHCP.
The function that fails is netif[0].EnabledDhcp()
Here is the exception that is thrown:
#### Exception System.Exception - CLR_E_FAIL (1) ####
#### Message:
#### Microsoft.SPOT.Net.NetworkInformation.NetworkInterface::UpdateConfiguration [IP: 0000] ####
#### Microsoft.SPOT.Net.NetworkInformation.NetworkInterface::EnableDhcp [IP: 000f] ####
#### WifiTest2.Program::Main2 [IP: 01a4] ####
#### WifiTest2.Program::ProgramStarted [IP: 000b] ####
#### WifiTest2.Program::Main [IP: 0015] ####
A first chance exception of type 'System.Exception' occurred in Microsoft.SPOT.Net.dll
An unhandled exception of type 'System.Exception' occurred in Microsoft.SPOT.Net.dll
When using a static IP the DNS fails:
Test DNS
#### Exception System.Net.Sockets.SocketException - CLR_E_FAIL (1) ####
#### Message:
#### Microsoft.SPOT.Net.SocketNative::getaddrinfo [IP: 0000] ####
#### System.Net.Dns::GetHostEntry [IP: 0008] ####
#### WifiTest2.Program::Main2 [IP: 024d] ####
#### WifiTest2.Program::ProgramStarted [IP: 000b] ####
#### WifiTest2.Program::Main [IP: 0015] ####
#### SocketException ErrorCode = -1
#### SocketException ErrorCode = -1
A first chance exception of type 'System.Net.Sockets.SocketException' occurred in Microsoft.SPOT.Net.dll
#### SocketException ErrorCode = -1
#### SocketException ErrorCode = -1
Faild to Get the host entry of the FQN from DNS server!