Wifi blocks other work

Hi,

I use FEZ Spider with WiFi_RS21, UsbHost and Display_T35
On the display there should be always a overview for some data (e.g. time, IP and in the moment some random values (simulate user actions))

I have some code to connect with wifi after USBDriveConnected event, the usb-stick has an special file containing SSID and PASSPHRASE.
After connecting the display stand still for more than 20 seconds, I tried to start the wifi init in an second thread but then it always throw an exception.

What I have to do, that the wifi don’t block the display until connecting?

Here some relevant parts of my code:

Gadgeteer.Modules.GHIElectronics.WiFi_RS21.WiFiNetworkInfo info = new WiFi_RS21.WiFiNetworkInfo();
info.SSID = SSID;
info.SecMode = WiFi_RS21.SecurityMode.WPA2;
info.networkType = WiFi_RS21.NetworkType.AccessPoint;

wifi.UseDHCP();
wifi.Join(info, PASSPHRASE);

The Display shows
InfoClass : Microsoft.SPOT.Presentation.Window
with one UIElement that draws an Bitmap from Resources (in the constructor loaded) and one Text element

I tried to update the display with an timer, but the timer stops too while the wifi connect.

Regards
Fabio

Welcome Fabio!

I had the same issue with the RS21 as you did with this. I tried the same things as you did as well (separate thread). I asked the same type of questions you did :smiley:

It appears that there are some low level operations (not in NETMF) that are pausing the device until the WiFi init is completed. Since it’s not happening in NETMF, a thread/timer/etc doesn’t prevent that pause from occuring.

It is the DHCP that is blocking the system.
This should be better when we release the new GHI Premium SDK with NETMF 4.2. But his will take a while since the first NETMF SDK will not support WiFi.

Thanks for the update Joe!

Thanks,

Hope “take a while” means 1-2 month or maybe end of the year and not longer :slight_smile:

@ Joe out of interest, if you use fixed IP does the binding process take a shorter time and not block?