Main Site Documentation

WiFi RS21 Join exceptions


#1

With the WiFi RS21 module and NETMF 4.3 SDK 2014 R2 I have to join Multi-Access-Point-WLAN-networks which have the same SSID on different channnels (by using the one w/ the strongest RSSI).

With SDK 4.3 R2 and GHI.Networking namespace the NetworkInterface.Join() method provides 3 overloads (as shown by IntelliSense):

  1. Join(string ssid)
  2. Join(NetworkParameters network)
  3. Join(string ssid; string key)

Using 3. for conneting to an above mentioned network type throws an exception as expected and as pointed out in the method’s summary.

Using 2. at a first glance seemed to solve my problem, but when calling the method, the following exception is thrown:

#### Exception System.ArgumentException - 0x00000000 (1) ####
#### Message: network.Key must not be null, empty, or more than 32 characters ...
#### GHI.Networking.WiFiRS9110::Join [IP: 007d] ####

The same exception is thrown when using 1.

Shouldn’t there be a second string paramter for the password in the 1. and 3. overloads or am I doing something wrong? If not, is there maybe a related improvement in the SDKs newer than “NETMF and Gadgeteer Package 2014 R2” ? And is there a more detailed change log than the rough overwiew in “Release Notes and Known Issues” following links on the https://www.ghielectronics.com/support/netmf/sdks site ?

With SDK 4.2 and GHI.Premium.Net namespace WiFiRS21.NetworkInterface.Join() method was provided with the the overloaded parameter combination (WiFiNetworkInfo[], string password), which, I think, would allow successful connection in this scenario,
because by the WiFiNetworkInfo[]-parameter networks with same SSID but different channels can be distinguished, but I have to use 4.3.


#2

@ Harald - You set the key in the specific NetworkParameters you want to connect to that is returned from Scan. NetworkParameters is essentially the same as WiFiNetworkInfo from 4.2.


#3

@ John - Once you do it right, you will see it works :wink:
That does the “trick”. Many thanks again for your quick and helpful reply.


#4

@ Harald - Happy to help.