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