Project - The current .NET Framework Version 4.2 using WiFi RS21 Module

The current .NET Framework Version 4.2 using WiFi RS21 Module

I saw some code posted by Duke Nukem ( TOPIC [Question]Potential IPAddress Bug in Wifi )
http://www.tinyclr.com/forum/topic?id=9411&page=3 and it WORKS!

I thought I would take his code and add some Debug.Print(messages).and post the project code. I have asked permission to do so. Any mistakes found are mine. 99.9% of the code is the original code provided by Duke Nukem. I only put it into a project to share with all.

As a note my GHI WiFi RS21 Module PCB is marked as Version 1.2.

Sample Debug output when running the project:

The thread ‘’ (0x2) has exited with code 0 (0x0).
Using mainboard GHI Electronics FEZSpider version 1.0
Press button to begin
RS9110 firmware version Number is 4.4.5
RS9110 driver version Number is 4.4.5
The thread ‘’ (0x3) has exited with code 0 (0x0).
***Connected to network…
***Waiting for response…
***NetworkDown event!
***NetworkAddressChanged event!
***IP Address : 192.168.2.8
***WirelessConnectivityChanged event!
***RSSI : 54
***IP Address : 192.168.2.8
The thread ‘’ (0x7) has exited with code 0 (0x0).
***Response is received : <meta http-equiv=“Content-Type” content="text/html; charse

Time Server : 11/15/2012 02:03:49

***NetworkAddressChanged event!
***IP Address : 192.168.2.8
***NetworkAddressChanged event!
***IP Address : 192.168.2.8

The codes purpose is to read the date and time. I will be expanding the code for other uses but for now I wanted to keep it as close to the original as possible and still be able to display the program output.

It is nice to know that the WiFi module really can work with the current version framework.

I take no credit for the original code. I am only passing it along for others.

Your code is the first code that I have been able to compile, so major props. When I run the program however it seems to get stuck after the LED and the indicator on the wifi goes green. The LCD will flash a couple times displaying a line of test very briefly at the top but the disappears. After a while of being on, the board seems to reboot. Any ideas?

JuiceBox

Sorry for the delay!

I did not see your question.

Not sure what to say. The code worked well on my spider.

However, I just posted some code for WiFi that was working for about a week. Yesterday it started having problems.
Similar to your question. I am going to try an Auxillary power supply and not power the module ffrom the spider.
I ‘think’ it is because the USB driver disconnects.

View in Device manager the “Debuggable .Net Micro Framework Device” and see if it goes away after you press the button. If it looses the usb driver the Spider goes into a loop resetting… resetting… resetting…

Hi,willgeorge

When I open your project some errors shows.

Error 1 ‘Gadgeteer.Modules.GHIElectronics.WiFi_RS21’ does not contain a definition for ‘NetworkDown’ and no extension method ‘NetworkDown’ accepting a first argument of type ‘Gadgeteer.Modules.GHIElectronics.WiFi_RS21’ could be found (are you missing a using directive or an assembly reference?) J:\工作\中興顧問\程式\NETMF\605_666_WiFi42 (1)\WiFi42\Program.cs 84 23 WiFi42

Error 2 ‘Gadgeteer.Modules.GHIElectronics.WiFi_RS21’ does not contain a definition for ‘NetworkUp’ and no extension method ‘NetworkUp’ accepting a first argument of type ‘Gadgeteer.Modules.GHIElectronics.WiFi_RS21’ could be found (are you missing a using directive or an assembly reference?) J:\工作\中興顧問\程式\NETMF\605_666_WiFi42 (1)\WiFi42\Program.cs 85 23 WiFi42

I am having the same problem.

Error 1 ‘Gadgeteer.Modules.GHIElectronics.WiFi_RS21’ does not contain a definition for ‘NetworkDown’ and no extension method ‘NetworkDown’ accepting a first argument of type ‘Gadgeteer.Modules.GHIElectronics.WiFi_RS21’ could be found (are you missing a using directive or an assembly reference?) C:\Users\Robert\Desktop\DeleteMe\605_666_WiFi42\WiFi42\Program.cs 85 23 WiFi42

Error 2 ‘Gadgeteer.Modules.GHIElectronics.WiFi_RS21’ does not contain a definition for ‘NetworkUp’ and no extension method ‘NetworkUp’ accepting a first argument of type ‘Gadgeteer.Modules.GHIElectronics.WiFi_RS21’ could be found (are you missing a using directive or an assembly reference?) C:\Users\Robert\Desktop\DeleteMe\605_666_WiFi42\WiFi42\Program.cs 86 23 WiFi42

Hi, willgeorge,

Again a big props cause is the only version of code with the actual WiFi NETMF.
For me, I was doing the same thing then you on my side, and I reach the same point of your code. But I got a problem, I dont know if you had it too, but all my connection is open I had an IP address, but when I do WebClient.GetFromWeb("…") … it always trigger me the response receive event, but with no response text and a status 302 instead of 200… so I test your code to see if was me the problem or a “I dont know what problem”… and with your code I had the same result … I really dont know where to search now :slight_smile: … cause in your output debug that you put in exemple you had a response.Text …

So if you can help me in any manner you see, I will appreciate it!
Cheers!

A status of 302 is a redirection

Try a different URL or look at the full data returned.

Yes thanks exactly! I was thinking that he will be manage it like a browser… i was i little dump on that :wink: Thank you !