Main Site Documentation

Wifi not working with EMX Dev System v 1.3 and a GHI Wifi Module ZG2100


#1

Hello,

I have a EMX Dev System v 1.3 with a GHI Wifi Module ZG2100. All this was working fine on a previous version of the GHI SDK and NETMF.
I restarted my project yesterday and I made all the necessary updates to my DevKit. I updated the TinyBooter and EMX Firmware according to the the GHI Electronics, LLC Premium SDK for NETMF v4.2 Release Notes.
• EMX v4.2.10.1, TinyBooter v4.2.10.0

I cannot seem to put my WiFi module working. I have tried several ways but with no success. I cannot reuse my previous code like this:
WiFi.Enable(SPI.SPI_module.SPI2, EMX.Pin.IO33, EMX.Pin.IO19);// EMX DevSys
NetworkInterface[] netif = NetworkInterface.GetAllNetworkInterfaces();
bool useDhcp = false;
Wireless80211 WiFiSettings = null;
for (int index = 0; index < netif.Length; ++index)
if (netif[index] is Wireless80211)
WiFiSettings = (Wireless80211)netif[index];
WiFiSettings.Ssid = ssid;
WiFiSettings.PassPhrase = passphrase;
WiFiSettings.Encryption = encriptionType;
if (ipAddres != String.Empty && subnetMask != String.Empty && gatewayAddress != String.Empty
&& dns != String.Empty)
{
WiFiSettings.EnableStaticIP(ipAddres, subnetMask, gatewayAddress);
WiFiSettings.EnableStaticDns(new String[] { dns });
}
else
useDhcp = true;

I have tried the recent API but nothing seems to work.
wifi = new GHINET.WiFiRS9110(Microsoft.SPOT.Hardware.SPI.SPI_module.SPI2, G120.Pin.P1_10, G120.Pin.P2_11, G120.Pin.P1_9, 4000);

        if (!wifi.IsOpen)
            wifi.Open();

        if (!wifi.NetworkInterface.IsDhcpEnabled)
            wifi.NetworkInterface.EnableDhcp();

        wifi.NetworkAddressChanged += new GHINET.NetworkInterfaceExtension.NetworkAddressChangedEventHandler(wifi_NetworkAddressChanged);
        wifi.WirelessConnectivityChanged += new GHINET.WiFiRS9110.WirelessConnectivityChangedEventHandler(wifi_WirelessConnectivityChanged);

        GHINET.NetworkInterfaceExtension.AssignNetworkingStackTo(wifi);

        GHINET.WiFiNetworkInfo[] scanResult = wifi.Scan();

        for (int i = 0; i < scanResult.Length; i++)
        {
            if (scanResult[i].SSID == "Access Point Name")
            {
                wifi.Join(scanResult[i], "Access Point Password");
                break;
            }
        }

        Thread.Sleep(-1);            
    }

My question is, do the EMX Dev System 1.3 + WiFi module ZG2100 is supported with the new GHI 4.2 SDK and NETMF >=4.2? If so, can you give me an example on how to setup wifi module. It was working before.

Thanks, Herlander


#2

When you upgraded, what firmware version did you originally have? There are a lot of changes in 4.2, so if you were on a 4.1 firmware before you may have one of the dhcp servers that netmf’s IP stack doesn’t like.


#3

Hello,

I was using the 4.1 GHI SDK with the appropriate firmware and tinybooter, can’t remeber now which versions I had.

Anyway, i think the problem happens before the DHCP stack takes action. I can’t even do the “wifi.Open()”, it throws an exception.

I just want to know from the support team if my WiFi module is still compatible with this new SDK 4.2 and NETMF 4.2/3.

BR Herlander


#4

@ Herlander - Looking in the 4.2 documentation, for the GHI.Premium.Net namespace, I do not see a class for the ZG2100 module.

At the present time, there is no GHI support of any kind for MF 4.3,