Main Site Documentation

4.3 - Fez Spider WiFiRS21

Here’s the code. ***** ASSERT ***** is displayed and it appears to blimp momentarily every 5 seconds. And this happens when I hit the line of code instantiating netif.

using System;
using System.Collections;
using System.Threading;
using Microsoft.SPOT;
using Microsoft.SPOT.Hardware;
using Microsoft.SPOT.Net.NetworkInformation;
using Microsoft.SPOT.Presentation;
using Microsoft.SPOT.Presentation.Controls;
using Microsoft.SPOT.Presentation.Media;
using Microsoft.SPOT.Presentation.Shapes;
using Microsoft.SPOT.Touch;

using GHI.Glide;
using GHI.Glide.UI;
using GHI.Glide.Display;

using GHIElectronics;
using GHI.Networking;

using Gadgeteer.Networking;
using GT = Gadgeteer;
using GTM = Gadgeteer.Modules;
using Gadgeteer.Modules.GHIElectronics;
using MF_RssAndWeather;
using uPLibrary.Cloud.WindowsAzure.MobileService;

namespace fanBase
{
    public partial class Program
    {
        private static WiFiRS9110 netif;

        private GT.Timer gcTimer = new GT.Timer(1000);

        // This method is run when the mainboard is powered up or reset.   
        void ProgramStarted()
        {
            gcTimer.Tick += gcTimer_Tick;
            gcTimer.Start();
        }

        void gcTimer_Tick(GT.Timer timer)
        {
            gcTimer.Stop();

            // /*******************************************************************************************           
            // Many modules generate useful events. Type +=<tab><tab> to add a handler to an event, e.g.:
            //     button.ButtonPressed +=<tab><tab>

            // If you want to do something periodically, use a GT.Timer and handle its Tick event, e.g.:
            //     GT.Timer timer = new GT.Timer(1000); // every second (1000ms)
            //     timer.Tick +=<tab><tab>
            //     timer.Start();
            //*******************************************************************************************/

            //// setup events
            //button.ButtonPressed += new Gadgeteer.Modules.GHIElectronics.Button.ButtonEventHandler(button_ButtonPressed);
            //button.ButtonReleased += new Gadgeteer.Modules.GHIElectronics.Button.ButtonEventHandler(button_ButtonReleased);
            //wifiRS21.NetworkDown += new GT.Modules.Module.NetworkModule.NetworkEventHandler(wifi_NetworkDown);
            //wifiRS21.NetworkUp += new GT.Modules.Module.NetworkModule.NetworkEventHandler(wifi_NetworkUp);

            // Use Debug.Print to show messages in Visual Studio's "Output" window during debugging.
            Debug.Print("Program Started");
            button.TurnLedOn();
            characterDisplay.Clear();
            characterDisplay.Print("Starting...");

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

            netif = new WiFiRS9110(SPI.SPI_module.SPI3, Cpu.Pin.GPIO_Pin6, Cpu.Pin.GPIO_Pin3, Cpu.Pin.GPIO_Pin4);
            netif.Open();
            netif.EnableDhcp();
            netif.EnableDynamicDns();
            netif.Join("MyNetwork", "MyPassword");

            while (netif.IPAddress == "0.0.0.0")
            {
                Debug.Print("Waiting for DHCP");
                Thread.Sleep(250);
            }

            InitializeDisplay();

        }

@ scicco - you are seizing the event thread by doing processing in the timer event handler. This is not recommended since it can cause funny things. to happen. I am not sure this is your problem. You would have to look at the Gadgeteer code to make that determination.

Do the join and then exit. you will know if your got an address in the address changed event.

@ scicco - The pins and SPI module you are using are invalid. You’re probably getting the ASSERT because SPI3 doesn’t exist. Socket 9 uses SPI1. The pins in the document I linked are just examples, you have to actually find the pins for your socket. For socket 9 on the Spider, you want to construct the object like so:


using GHI.Pins;

netif = new WiFiRS9110(SPI.SPI_module.SPI1, EMX.IO15, EMX.IO46, EMX.IO6);

John and Mike -

Tried both your suggestions and still no go, although those correct SPI and pins do get rid of the assert error. I am doing the following in the timer that’s kicked off in ProgramStarted.

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

                netif = new WiFiRS9110(SPI.SPI_module.SPI1, EMX.IO15, EMX.IO46, EMX.IO6);

                if (!netif.Opened)
                {
                    netif.Open();
                };
                netif.EnableDhcp();
                netif.EnableDynamicDns();
                netif.Join("network", "password");

            }
            catch (Exception ex)
            {
                Debug.Print(ex.Message);
            }

The NetworkAddressChanged event never fires. The NetworkAvailabilityChanged event does fire and that’s where I added the following:

        void NetworkChange_NetworkAvailabilityChanged(object sender, NetworkAvailabilityEventArgs e)
        {
            Debug.Print("Network availability: " + e.IsAvailable.ToString());
            //Debug.Print("IP Address:" + wifiRS21.NetworkInterface.IPAddress);

            while (netif.IPAddress == "0.0.0.0")
            {
                Debug.Print("Waiting for DHCP");
                Thread.Sleep(250);
            }

        }

My output shows the network is available and then a neverending loop of “Waiting for DHCP”:

The thread ‘’ (0x2) has exited with code 0 (0x0).
Using mainboard GHI Electronics FEZ Spider version 1.0
The thread ‘’ (0x3) has exited with code 0 (0x0).
Network availability: True
Waiting for DHCP
Waiting for DHCP

Waiting for DHCP

John - has someone at GHI successfully connected your WiFiRS21 module to a Spider 1 with the new SDK?

@ scicco - I’ve been able to use the WiFi RS21 on the Spider with our new SDK numerous times.

The while loop in the event handler for NetworkAvailabilityChanged is likely the issue. You need to return from the event so that NETMF can raise the next event which is likely the NetworkAddressChanged event.

That is something I just added based on Mike’s comment. I had run the same code with the while loop directly after the join like the GHI sample code suggests and have commented it out entirely and I have never had the NetworkAddressChanged event fire.

@ scicco - If you reflash the loader and firmware on your board and run the below code, NetworkAddressChanged never fires?


private static WiFiRS9110 netif;

void ProgramStarted()
{
	 NetworkChange.NetworkAvailabilityChanged += NetworkChange_NetworkAvailabilityChanged;
	 NetworkChange.NetworkAddressChanged += NetworkChange_NetworkAddressChanged;

	 netif = new WiFiRS9110(SPI.SPI_module.SPI1, EMX.IO15, EMX.IO46, EMX.IO6);
	 netif.Open();
	 netif.EnableDhcp();
	 netif.EnableDynamicDns();
	 
	 netif.Join("MyNetwork", "MyPassword");
}

void NetworkChange_NetworkAvailabilityChanged(object sender, NetworkAvailabilityEventArgs e)
{
	Debug.Print("Network availability: " + e.IsAvailable.ToString());
}

void NetworkChange_NetworkAddressChanged(object sender, EventArgs e)
{
	Debug.Print("Network address changed");
}

Hi John - sorry for an ignorant question but if I updated the loader and firmware when the new SDK came out is that considered “reflashing” or is there something else for me to do? Because I haven’t done anything since updating both in the FEZ Config and seeing both were up to date (4.3.3 I seem to remember - I’m at work now but will double check tonight).

If that is the case then yes, I have run that code and plenty of variants of it where the availability event fires but the address event does not. If I look at either the netif variable or the wifiRS21 variable from the module I see red X’s for most of their properties with something along the lines of a timeout error in my locals window. Again, will post more details when I get home.

I took another look at the FEZ Config last night and loaded the network configuration and don’t see anything out of the ordinary (DHCP is checked).

@ scicco - reflashing is the same as updating. I just wanted to make sure that the assert did not corrupt anything. When you run the code, do you see any lights come on on the board and, if so, in what sequence?

The red light is constantly lit on the Spider while running the code. The green (yellow?) light on the wifi module is off, temporarily flashes on then off when the program starts and then remains on after the program is started.

And here is info from FEZ Config:

Loader (TinyBooter) version information:
4.3.3.0 on this computer.
4.3.3.0 on this device.

The Loader (TinyBooter) is up to date. <<<

Firmware (TinyCLR) version information:
4.3.3.0 on this computer.
4.3.3.0 on this device.

The Firmware (TinyCLR) is up to date. <<<
Please wait for the device to reboot…

Just to be 100% sure I didn’t have anything in my program that might be causing this I created a new one with just the code you provided (with a try…catch):

using System;
using System.Collections;
using System.Threading;
using Microsoft.SPOT;
using Microsoft.SPOT.Hardware;
using Microsoft.SPOT.Net.NetworkInformation;
using Microsoft.SPOT.Presentation;
using Microsoft.SPOT.Presentation.Controls;
using Microsoft.SPOT.Presentation.Media;
using Microsoft.SPOT.Presentation.Shapes;
using Microsoft.SPOT.Touch;

using Gadgeteer.Networking;
using GT = Gadgeteer;
using GTM = Gadgeteer.Modules;

using GHI.Networking;
using GHI.Pins;

namespace wifiTest
{
    public partial class Program
    {
        private static WiFiRS9110 netif;

        void ProgramStarted()
        {
            try
            {
                NetworkChange.NetworkAvailabilityChanged += NetworkChange_NetworkAvailabilityChanged;
                NetworkChange.NetworkAddressChanged += NetworkChange_NetworkAddressChanged;

                netif = new WiFiRS9110(SPI.SPI_module.SPI1, EMX.IO15, EMX.IO46, EMX.IO6);
                netif.Open();
                netif.EnableDhcp();
                netif.EnableDynamicDns();

                netif.Join("network", "password");
            }
            catch (Exception ex)
            {
                Debug.Print(ex.Message);
            }
        }

        void NetworkChange_NetworkAvailabilityChanged(object sender, NetworkAvailabilityEventArgs e)
        {
            Debug.Print("Network availability: " + e.IsAvailable.ToString());
        }

        void NetworkChange_NetworkAddressChanged(object sender, EventArgs e)
        {
            Debug.Print("Network address changed:" + netif.IPAddress);
        }
    }
}

And got similar results. The network availability event fired but not the address event. Here’s the full output:

Found debugger!

Create TS.

Loading start at a0e00000, end a0e2f494

Assembly: mscorlib (4.3.1.0) Assembly: Microsoft.SPOT.Native (4.3.1.0) Assembly: Microsoft.SPOT.Security.PKCS11 (4.3
.1.0) Assembly: System.Security (4.3.1.0) Assembly: Microsoft.SPOT.Hardware (4.3.1.0)
Assembly: Microsoft.SPOT.Graphics (4.3.1.0) Assembly: Microsoft.SPOT.TinyCore (4.3.1.0)
Assembly: Microsoft.SPOT.IO (4.3.1.0) Assembly: System.IO (4.3.1.0) Assembly: Microsoft.SPOT.Hardware.Usb (4.3.1.0)
Assembly: Microsoft.SPOT.Hardware.SerialPort (4.3.1.0) Assembly: Microsoft.SPOT.Touch (4.3.1.0)
Assembly: Microsoft.SPOT.Ink (4.3.1.0) Assembly: Microsoft.SPOT.Hardware.PWM (4.3.1.0)
Loading Deployment Assemblies.

Attaching deployed file.

Assembly: Microsoft.SPOT.Net (4.3.1.0) Attaching deployed file.

Assembly: wifiTest (1.0.0.0) Attaching deployed file.

Assembly: GHI.Hardware (4.3.3.0) Attaching deployed file.

Assembly: Gadgeteer (2.43.1.0) Attaching deployed file.

Assembly: GHI.Usb (4.3.3.0) Attaching deployed file.

Assembly: GHI.Pins (4.3.3.0) Attaching deployed file.

Assembly: GHIElectronics.Gadgeteer.FEZSpider (4.3.3.0) Attaching deployed file.

Assembly: GHI.Networking (4.3.3.0) Resolving.

GC: 1msec 36384 bytes used, 7303284 bytes available

Type 0F (STRING ): 24 bytes

Type 15 (FREEBLOCK ): 7303284 bytes

Type 17 (ASSEMBLY ): 34524 bytes

Type 1E (BINARY_BLOB_HEAD ): 1332 bytes

Type 28 (MEMORY_STREAM_HEAD ): 36 bytes

Type 29 (MEMORY_STREAM_DATA ): 396 bytes

Type 34 (APPDOMAIN_HEAD ): 72 bytes

GC: performing heap compaction…

The debugging target runtime is loading the application assemblies and starting execution.
Ready.

‘Microsoft.SPOT.Debugger.CorDebug.dll’ (Managed): Loaded ‘C:\Program Files (x86)\Microsoft .NET Micro Framework\v4.3\Assemblies\le\mscorlib.dll’, Symbols loaded.
‘Microsoft.SPOT.Debugger.CorDebug.dll’ (Managed): Loaded ‘C:\Program Files (x86)\Microsoft .NET Micro Framework\v4.3\Assemblies\le\Microsoft.SPOT.Native.dll’, Symbols loaded.
‘Microsoft.SPOT.Debugger.CorDebug.dll’ (Managed): Loaded ‘C:\Program Files (x86)\Microsoft .NET Micro Framework\v4.3\Assemblies\le\Microsoft.SPOT.Hardware.dll’, Symbols loaded.
‘Microsoft.SPOT.Debugger.CorDebug.dll’ (Managed): Loaded ‘C:\Program Files (x86)\Microsoft .NET Micro Framework\v4.3\Assemblies\le\Microsoft.SPOT.Security.PKCS11.dll’, Symbols loaded.
‘Microsoft.SPOT.Debugger.CorDebug.dll’ (Managed): Loaded ‘C:\Program Files (x86)\Microsoft .NET Micro Framework\v4.3\Assemblies\le\System.Security.dll’, Symbols loaded.
‘Microsoft.SPOT.Debugger.CorDebug.dll’ (Managed): Loaded ‘C:\Program Files (x86)\Microsoft .NET Micro Framework\v4.3\Assemblies\le\Microsoft.SPOT.Graphics.dll’, Symbols loaded.
‘Microsoft.SPOT.Debugger.CorDebug.dll’ (Managed): Loaded ‘C:\Program Files (x86)\Microsoft .NET Micro Framework\v4.3\Assemblies\le\Microsoft.SPOT.TinyCore.dll’, Symbols loaded.
‘Microsoft.SPOT.Debugger.CorDebug.dll’ (Managed): Loaded ‘C:\Program Files (x86)\Microsoft .NET Micro Framework\v4.3\Assemblies\le\Microsoft.SPOT.IO.dll’, Symbols loaded.
‘Microsoft.SPOT.Debugger.CorDebug.dll’ (Managed): Loaded ‘C:\Program Files (x86)\Microsoft .NET Micro Framework\v4.3\Assemblies\le\System.IO.dll’, Symbols loaded.
‘Microsoft.SPOT.Debugger.CorDebug.dll’ (Managed): Loaded ‘C:\Program Files (x86)\Microsoft .NET Micro Framework\v4.3\Assemblies\le\Microsoft.SPOT.Hardware.Usb.dll’, Symbols loaded.
‘Microsoft.SPOT.Debugger.CorDebug.dll’ (Managed): Loaded ‘C:\Program Files (x86)\Microsoft .NET Micro Framework\v4.3\Assemblies\le\Microsoft.SPOT.Hardware.SerialPort.dll’, Symbols loaded.
‘Microsoft.SPOT.Debugger.CorDebug.dll’ (Managed): Loaded ‘C:\Program Files (x86)\Microsoft .NET Micro Framework\v4.3\Assemblies\le\Microsoft.SPOT.Touch.dll’, Symbols loaded.
‘Microsoft.SPOT.Debugger.CorDebug.dll’ (Managed): Loaded ‘C:\Program Files (x86)\Microsoft .NET Micro Framework\v4.3\Assemblies\le\Microsoft.SPOT.Ink.dll’, Symbols loaded.
‘Microsoft.SPOT.Debugger.CorDebug.dll’ (Managed): Loaded ‘C:\Program Files (x86)\Microsoft .NET Micro Framework\v4.3\Assemblies\le\Microsoft.SPOT.Hardware.PWM.dll’, Symbols loaded.
‘Microsoft.SPOT.Debugger.CorDebug.dll’ (Managed): Loaded ‘C:\Program Files (x86)\Microsoft .NET Micro Framework\v4.3\Assemblies\le\Microsoft.SPOT.Net.dll’, Symbols loaded.
‘Microsoft.SPOT.Debugger.CorDebug.dll’ (Managed): Loaded ‘C:\Program Files (x86)\Microsoft .NET Gadgeteer\Core\Assemblies.NET Micro Framework 4.3\le\Gadgeteer.dll’, Symbols loaded.
‘Microsoft.SPOT.Debugger.CorDebug.dll’ (Managed): Loaded ‘C:\Program Files (x86)\GHI Electronics\GHI NETMF v4.3 SDK\Libraries\le\GHI.Hardware.dll’
‘Microsoft.SPOT.Debugger.CorDebug.dll’ (Managed): Loaded ‘C:\Program Files (x86)\GHI Electronics\GHI NETMF v4.3 SDK\Libraries\le\GHI.Usb.dll’
‘Microsoft.SPOT.Debugger.CorDebug.dll’ (Managed): Loaded ‘C:\Program Files (x86)\GHI Electronics\GHI .NET Gadgeteer SDK\Mainboards\FEZSpider\NETMF 4.3\le\GHIElectronics.Gadgeteer.FEZSpider.dll’, Symbols loaded.
‘Microsoft.SPOT.Debugger.CorDebug.dll’ (Managed): Loaded ‘C:\Program Files (x86)\GHI Electronics\GHI NETMF v4.3 SDK\Libraries\le\GHI.Networking.dll’
‘Microsoft.SPOT.Debugger.CorDebug.dll’ (Managed): Loaded ‘c:\users\steve\documents\visual studio 2012\Projects\wifiTest\wifiTest\bin\Debug\le\wifiTest.exe’, Symbols loaded.
‘Microsoft.SPOT.Debugger.CorDebug.dll’ (Managed): Loaded 'C:\Program Files (x86)\GHI Electronics\GHI NETMF v4.3 SDK\Libraries\le\GHI.Pins.dll’
The thread ‘’ (0x2) has exited with code 0 (0x0).
Using mainboard GHI Electronics FEZ Spider version 1.0
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.
Network availability: True
The thread ‘’ (0x3) has exited with code 0 (0x0).

@ scicco - You are seeing an IP of 0.0.0.0 in the NetworkAddressChanged event handler because the IP property is not stable until after that event fires. We refresh the network interface object internally when that event is fired. Since the order of event handler execution is not defined, you cannot rely on our handler getting fired and updating the interface object before yours.

I have updated my code slightly to match the example in the document and to show that after the event is triggered the property is valid. It isn’t ideal that the property isn’t valid inside the event handler, but there is no easy way to guarantee that it is.

I wrapped the network initialization in a thread because it can take some time and it is not proper to block in ProgramStarted.

Your above code does indeed display an address of 0.0.0.0 in the handler. My below code does not print out that address in the handler but instead waits for the property itself to be updated. I verified both your code and my code on an actual Spider.


using GHI.Networking;
using GHI.Pins;
using Microsoft.SPOT;
using Microsoft.SPOT.Hardware;
using Microsoft.SPOT.Net.NetworkInformation;
using System.Threading;

namespace wifiTest
{
    public partial class Program
    {
        private static WiFiRS9110 netif;

        void ProgramStarted()
        {
            NetworkChange.NetworkAvailabilityChanged += NetworkChange_NetworkAvailabilityChanged;
            NetworkChange.NetworkAddressChanged += NetworkChange_NetworkAddressChanged;

            new Thread(() =>
            {
                netif = new WiFiRS9110(SPI.SPI_module.SPI1, EMX.IO15, EMX.IO46, EMX.IO6);
                netif.Open();
                netif.EnableDhcp();
                netif.EnableDynamicDns();

                Debug.Print("Joining");
                netif.Join("network", "password");
                Debug.Print("Joined");

                while (netif.IPAddress == "0.0.0.0")
                {
                    Debug.Print("Waiting DHCP");
                    Thread.Sleep(250);
                }

                Debug.Print(netif.IPAddress);
            }).Start();
        }

        void NetworkChange_NetworkAvailabilityChanged(object sender, NetworkAvailabilityEventArgs e)
        {
            Debug.Print("Network availability: " + e.IsAvailable.ToString());
        }

        void NetworkChange_NetworkAddressChanged(object sender, EventArgs e)
        {
            Debug.Print("Network address changed");
        }
    }
}

Hi John,

Hate to sound like a broken record but there is no change. Copied your code and only changed the SSID and password and got the same behavior - network availability event fired, network address changed event did not. The output is below. Is there something else buried in the properties of the VS project or the hardware itself I can check to make sure we’re talking apples-to-apples? thanks -

Found debugger!

Create TS.

Loading start at a0e00000, end a0e2f494

Assembly: mscorlib (4.3.1.0) Assembly: Microsoft.SPOT.Native (4.3.1.0) Assembly: Microsoft.SPOT.Security.PKCS11 (4.3
.1.0) Assembly: System.Security (4.3.1.0) Assembly: Microsoft.SPOT.Hardware (4.3.1.0)
Assembly: Microsoft.SPOT.Graphics (4.3.1.0) Assembly: Microsoft.SPOT.TinyCore (4.3.1.0)
Assembly: Microsoft.SPOT.IO (4.3.1.0) Assembly: System.IO (4.3.1.0) Assembly: Microsoft.SPOT.Hardware.Usb (4.3.1.0)
Assembly: Microsoft.SPOT.Hardware.SerialPort (4.3.1.0) Assembly: Microsoft.SPOT.Touch (4.3.1.0)
Assembly: Microsoft.SPOT.Ink (4.3.1.0) Assembly: Microsoft.SPOT.Hardware.PWM (4.3.1.0)
Loading Deployment Assemblies.

Attaching deployed file.

Assembly: Microsoft.SPOT.Net (4.3.1.0) Attaching deployed file.

Assembly: wifiTest (1.0.0.0) Attaching deployed file.

Assembly: GHI.Hardware (4.3.3.0) Attaching deployed file.

Assembly: Gadgeteer (2.43.1.0) Attaching deployed file.

Assembly: GHI.Usb (4.3.3.0) Attaching deployed file.

Assembly: GHI.Pins (4.3.3.0) Attaching deployed file.

Assembly: GHIElectronics.Gadgeteer.FEZSpider (4.3.3.0) Attaching deployed file.

Assembly: GHI.Networking (4.3.3.0) Resolving.

GC: 1msec 36408 bytes used, 7303260 bytes available

Type 0F (STRING ): 24 bytes

Type 15 (FREEBLOCK ): 7303260 bytes

Type 17 (ASSEMBLY ): 34548 bytes

Type 1E (BINARY_BLOB_HEAD ): 1332 bytes

Type 28 (MEMORY_STREAM_HEAD ): 36 bytes

Type 29 (MEMORY_STREAM_DATA ): 396 bytes

Type 34 (APPDOMAIN_HEAD ): 72 bytes

GC: performing heap compaction…

The debugging target runtime is loading the application assemblies and starting execution.
Ready.

‘Microsoft.SPOT.Debugger.CorDebug.dll’ (Managed): Loaded ‘C:\Program Files (x86)\Microsoft .NET Micro Framework\v4.3\Assemblies\le\mscorlib.dll’, Symbols loaded.
‘Microsoft.SPOT.Debugger.CorDebug.dll’ (Managed): Loaded ‘C:\Program Files (x86)\Microsoft .NET Micro Framework\v4.3\Assemblies\le\Microsoft.SPOT.Native.dll’, Symbols loaded.
‘Microsoft.SPOT.Debugger.CorDebug.dll’ (Managed): Loaded ‘C:\Program Files (x86)\Microsoft .NET Micro Framework\v4.3\Assemblies\le\Microsoft.SPOT.Hardware.dll’, Symbols loaded.
‘Microsoft.SPOT.Debugger.CorDebug.dll’ (Managed): Loaded ‘C:\Program Files (x86)\Microsoft .NET Micro Framework\v4.3\Assemblies\le\Microsoft.SPOT.Security.PKCS11.dll’, Symbols loaded.
‘Microsoft.SPOT.Debugger.CorDebug.dll’ (Managed): Loaded ‘C:\Program Files (x86)\Microsoft .NET Micro Framework\v4.3\Assemblies\le\System.Security.dll’, Symbols loaded.
‘Microsoft.SPOT.Debugger.CorDebug.dll’ (Managed): Loaded ‘C:\Program Files (x86)\Microsoft .NET Micro Framework\v4.3\Assemblies\le\Microsoft.SPOT.Graphics.dll’, Symbols loaded.
‘Microsoft.SPOT.Debugger.CorDebug.dll’ (Managed): Loaded ‘C:\Program Files (x86)\Microsoft .NET Micro Framework\v4.3\Assemblies\le\Microsoft.SPOT.TinyCore.dll’, Symbols loaded.
‘Microsoft.SPOT.Debugger.CorDebug.dll’ (Managed): Loaded ‘C:\Program Files (x86)\Microsoft .NET Micro Framework\v4.3\Assemblies\le\Microsoft.SPOT.IO.dll’, Symbols loaded.
‘Microsoft.SPOT.Debugger.CorDebug.dll’ (Managed): Loaded ‘C:\Program Files (x86)\Microsoft .NET Micro Framework\v4.3\Assemblies\le\System.IO.dll’, Symbols loaded.
‘Microsoft.SPOT.Debugger.CorDebug.dll’ (Managed): Loaded ‘C:\Program Files (x86)\Microsoft .NET Micro Framework\v4.3\Assemblies\le\Microsoft.SPOT.Hardware.Usb.dll’, Symbols loaded.
‘Microsoft.SPOT.Debugger.CorDebug.dll’ (Managed): Loaded ‘C:\Program Files (x86)\Microsoft .NET Micro Framework\v4.3\Assemblies\le\Microsoft.SPOT.Hardware.SerialPort.dll’, Symbols loaded.
‘Microsoft.SPOT.Debugger.CorDebug.dll’ (Managed): Loaded ‘C:\Program Files (x86)\Microsoft .NET Micro Framework\v4.3\Assemblies\le\Microsoft.SPOT.Touch.dll’, Symbols loaded.
‘Microsoft.SPOT.Debugger.CorDebug.dll’ (Managed): Loaded ‘C:\Program Files (x86)\Microsoft .NET Micro Framework\v4.3\Assemblies\le\Microsoft.SPOT.Ink.dll’, Symbols loaded.
‘Microsoft.SPOT.Debugger.CorDebug.dll’ (Managed): Loaded ‘C:\Program Files (x86)\Microsoft .NET Micro Framework\v4.3\Assemblies\le\Microsoft.SPOT.Hardware.PWM.dll’, Symbols loaded.
‘Microsoft.SPOT.Debugger.CorDebug.dll’ (Managed): Loaded ‘C:\Program Files (x86)\Microsoft .NET Micro Framework\v4.3\Assemblies\le\Microsoft.SPOT.Net.dll’, Symbols loaded.
‘Microsoft.SPOT.Debugger.CorDebug.dll’ (Managed): Loaded ‘C:\Program Files (x86)\Microsoft .NET Gadgeteer\Core\Assemblies.NET Micro Framework 4.3\le\Gadgeteer.dll’, Symbols loaded.
‘Microsoft.SPOT.Debugger.CorDebug.dll’ (Managed): Loaded ‘C:\Program Files (x86)\GHI Electronics\GHI NETMF v4.3 SDK\Libraries\le\GHI.Hardware.dll’
‘Microsoft.SPOT.Debugger.CorDebug.dll’ (Managed): Loaded ‘C:\Program Files (x86)\GHI Electronics\GHI NETMF v4.3 SDK\Libraries\le\GHI.Usb.dll’
‘Microsoft.SPOT.Debugger.CorDebug.dll’ (Managed): Loaded ‘C:\Program Files (x86)\GHI Electronics\GHI .NET Gadgeteer SDK\Mainboards\FEZSpider\NETMF 4.3\le\GHIElectronics.Gadgeteer.FEZSpider.dll’, Symbols loaded.
‘Microsoft.SPOT.Debugger.CorDebug.dll’ (Managed): Loaded ‘C:\Program Files (x86)\GHI Electronics\GHI NETMF v4.3 SDK\Libraries\le\GHI.Networking.dll’
‘Microsoft.SPOT.Debugger.CorDebug.dll’ (Managed): Loaded ‘C:\Users\Steve\documents\visual studio 2012\Projects\wifiTest\wifiTest\bin\Debug\le\wifiTest.exe’, Symbols loaded.
‘Microsoft.SPOT.Debugger.CorDebug.dll’ (Managed): Loaded 'C:\Program Files (x86)\GHI Electronics\GHI NETMF v4.3 SDK\Libraries\le\GHI.Pins.dll’
The thread ‘’ (0x2) has exited with code 0 (0x0).
Using mainboard GHI Electronics FEZ Spider version 1.0
Joining
The thread ‘’ (0x3) has exited with code 0 (0x0).
Joined
Waiting DHCP
Waiting DHCP
Waiting DHCP
Waiting DHCP
Waiting DHCP
Waiting DHCP
Network availability: True
Waiting DHCP
Waiting DHCP
Waiting DHCP
Waiting DHCP
Waiting DHCP
Waiting DHCP
(continuously - I let it run for about five minutes)

@ scicco - Could you try to run it a few times, unplugging and plugging the wifi module in between runs? Can you try with another Spider, WiFi module, and router?

I tried unplugging and plugging the wifi module with no change. Also swapped out the gadgeteer cable with a few other ones and there still was no change. I had a bunch of other modules plugged into the Spider as well that I also removed which didn’t help.

I saw another thread on the forum with the same exact problem. Needless to say this has been pretty frustrating. At this point I see two options: I can send in my parts to GHI for you to test and potentially replace or I can try to roll back to 4.2. What would your recommendation be?

Thanks -

@ scicco - Have you tried with a different mainboard if you have any and a different wireless access point?

I don’t have a different mainboard nor do I have a different wifi access point. Although your suggestion about the access point triggered a thought of messing with my security settings.

Using the existing code, I do get the following results:

None - Joins and gives an IP
WPA-PSK [TKIP] - Joins and gives an IP
WPA2-PSK [AES] - Joins but IP stays at 0.0.0.0 (this was the setting I had been using and what I would like to continue to use)
WPA-PSK [TKIP] + WPA2-PSK [AES] - Joins but IP stays at 0.0.0.0

So when you said you’ve gotten this to work on the SDK numerous times was it with either of the security settings that aren’t working for me? I am using a Netgear WNR2000 router.

Thanks -

@ scicco - We’ll take a look at some different routers with different security settings to see if we can reproduce and, if so, fix that behavior. In the mean time, the only workaround seems to be using WPA-PSK [TKIP].

Hi John - any progress on this?

@ scicco - Not yet, no. It is still on our list though.

1 Like