Error when using WiFi_RS21 on FEZ spider

Hello all,

I’m trying to setup a wifi connectiong with a WiFi_RR21 module on a FEZ spider based on some simple example codes online.

However I qucikly get an error:
I the programStarted() I have the following:

wifi.UseDHCP();

        wifi.NetworkDown += new GTM.Module.NetworkModule.NetworkEventHandler(wifi_NetworkDown);
        wifi.NetworkUp += new GTM.Module.NetworkModule.NetworkEventHandler(wifi_NetworkUp);
        button.ButtonPressed += new Button.ButtonEventHandler(button_ButtonPressed);


        Debug.Print("scan for wireless networks");
     WiFi_RS21.WiFiNetworkInfo[] scanResult = wifi.Scan();

unfortunatl he says WiFiNetworkInfo ans Scan both don’t exist in the type.

I am using the following:
using System;
using System.Collections;
using System.Threading;
using Microsoft.SPOT;
using Microsoft.SPOT.Presentation;
using Microsoft.SPOT.Presentation.Controls;
using Microsoft.SPOT.Presentation.Media;
using Microsoft.SPOT.Touch;

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

Can anyone tell me what causes this?

@ EhvIne - What’s the exact error message you are getting?

The call stack would be very helpful.

Or are you saying Visual Studio lists this as an Error when it’s compiling?

I’d also ask what SDK and firmware version do you have installed? This is an area that has changed in some of the SDKs, and you may just be using an old SDK and need to upgrade, or you may be targeting a 4.1 app instead of a 4.2 app…

Thanks for your replies,

When debugging, the first error is:

"The type name “WiFiNetworkInfo” does not exist in the type “Gadgeteer.Modules.GHIElectronics.Wifi_RS21”

the second is:
“Gadgeteer.Modules.GHIElectronics.WiFi_RS21” does not contain a definition for “scan” and no extension method “scan” accepting a frist argument of type “Gadgeteer.Modules.GHIElectronisc.Wifi_RS21” could be found (are you missing a using directive or an assembly reference"

I am using the GHI NETMF v4.2 (dated 04-30-2013)

If you need any more info just say so!

@ EhvIne -

Why not try the code used as a test for DHCP… Good sample to get you started using 4.2

https://www.ghielectronics.com/community/forum/topic?id=10855

@ willgeorge Thanks for the tip.

I choose to use this code, because it uses the same hardware as I do, which I thought was easier.

https://www.ghielectronics.com/community/codeshare/entry/361

However I keep having the same issue, also I have use the other example codes. It seems like I’m missing an assembly or something, but can’t find what.
(sorry for my ignorant questions, I’m new with gadgeteering)

@ EhvIne -

I’m trying to setup a wifi connectiong with a WiFi_RR21 module on a FEZ spider based on some simple example codes online.

However I qucikly get an error:
I the programStarted() I have the following:

wifi.UseDHCP();

wifi.NetworkDown += new GTM.Module.NetworkModule.NetworkEventHandler(wifi_NetworkDown);
wifi.NetworkUp += new GTM.Module.NetworkModule.NetworkEventHandler(wifi_NetworkUp);
button.ButtonPressed += new Button.ButtonEventHandler(button_ButtonPressed);

Debug.Print(“scan for wireless networks”);
WiFi_RS21.WiFiNetworkInfo[] scanResult = wifi.Scan();

unfortunatl he says WiFiNetworkInfo ans Scan both don’t exist in the type.

I am using the GHI NETMF v4.2 (dated 04-30-2013)

Are you using 4.2 firmware on your Spider and NOT 4.1?

////

The link I gave works with version 4.2. I and many others have used it. I used it with a Fez Spider running 4.2.9 firmware.

As far as I know, wifi.NetworkDown and wifi.NetworkUp only are used with version 4.1. and not for version 4.2.

@ EhvIne - Check the GHI Premium documentation for the WifFi Scan Method. It shows a clickable link to the WifiNetworkInformation class. Click it. You will then see the necessary workspace and and reference info.

Namespace: GHI.Premium.Net
Assembly: GHI.Premium.Net (in GHI.Premium.Net.dll) Version: 4.2.10.0 (4.2.10.0)

To add to previous question, the Debug displays:

Using mainboard GHI Electronics FEZSpider version 1.0
RS9110 firmware version Number is 4.4.5
RS9110 driver version Number is 4.4.5

Is the problem in the RS9110 firmware? Where can I find the approriate firmware?

@ EhvIne -

Using mainboard GHI Electronics FEZSpider version 1.0

Then you are using version 4.1 firmware on your spider

You need to use the 4.1 SDK and build a 4.1 project.

See the following link.

•(Optional) GHI NETMF v4.1 SDK Sep. 14, 2012
Needed for 4.1 devices (ChipworkX, USBizi).

I am not sure why Spider (EMX) is not shown with ChipworkX, USBizi.

http://www.ghielectronics.com/support/.net-micro-framework

I ‘think’ this is correct. If not… I’m sure someone will correct me!

I added a image that shows references I used in a old 4.1 WiFi RS21 application
(Ignore the yellow warning symbols. They show because I do not have the 4.1 SDK available. The references are valid)

Thanks willgeorge, one of the codes (on https://www.ghielectronics.com/community/forum/topic?id=10855&page=4) in that thread did help me further!