Hi all, I need some help with the RN171 module. I’m using netmf 4.2 and spider mainboard.
Well, I couldn’t find any simple example so i tried to join my home wireless network without success.
ActionResult= wifi_RN171.JoinWirelessNetwork("MySSID", "MyPASS", 0, WiFi_RN171.WirelessEncryptionMode.MixedWPA1_WPA2);
and i even tried looping over the channel number from 0 to infinity but couldn’t get true at ActionResult.
Network details attached below.
Noticed now that
is endless loop,
What am i missing ?
WPA encryption Works only with The latest RN171 firmware. I would try to connect with open network, then update The firmware, then continue with encryption Better use NETMF4.3.
I don’t wish to work with 4.3 right now. How can I check which firmware I use?
It can be seen in the answers of the module to certain commands (if I remember right)
So practically, this module is useless?
Lifted from the product specification page…
This WiFi module is pre-configured to run in access-point mode (Hot Spot). Allowing for direct connections between this module (through any Gadgeteer mainboard) and any WiFi device. Being an access-point, there is no need for connecting to any existing network and it overcomes the issues found in using Ad-Hoc. The built-in DHCP server automatically assigns an IP to the device.
Wy? Updating the firmware is very easy if you have the connection with your router
@ Sprigo - So it’s not designed to connect to router and get ip?
Not according to the product page, unless you modify the driver.
@ bioengproject - it’s designet to connect to an network anf get an IP, but the GHI Driver for the module did not support this feature. I used a extended and modificated driver and utility with which all this can be done. You only need to switch your router to open network for some time, then connect using my utility, then update the Firmware over the internet as described in the utility, then switch back to WPA2 encrytion and all should work. Another thing is the reliability of the RN171 (gets unresponsive after some time for unknown reasons). Many aspects were discussed in this thread:
@ RoSchmi - Your utility is made for netmf 4.3,
is it possible to use it on 4.2 ?
By the way, i havn’t seen even one simple example of using that module.
Can someone provide one?
@ andre.m - Example of “how to connect to your home wifi” would be nice.
I’m use to see example of usages of many modules here on this website,
for this module i found none,
I just don’t know how to start and somehow i have to use a new driver,
I’m kind of lost.
No, the code of the driver has to be changed for 4.2 (esp. code for the serial port). I think, that it would be easyer to change your programming environment to 4.3, get the code working under 4.3 and then make the changes to get it working under 4.2 if you want to stay at 4.2. You will hardly find anybody who will roll back his system to 4.2 if you need help with code for 4.2.
Btw: What do you want to do with the module?
@ RoSchmi - I have an idea, I will install 4.3 env just for to update the firmware and the connect it back to 4.2 env, will it work?
Second, I wish to control the system remotely, if there’s available WiFi around, get up from the router and broadcast it to the world so I would be able to control the system from home for example but if there isn’t a WiFi around, act as a hot spot and so at least I would be able to control the system wireless when I’m near it.
Is it too much to ask for?
Should all be possible by using the included http server, the only problem is when the RN 171 gets unresponsive and you are not nearby to hit the reset button.
The differences in code for 4.2 you can see in Version 1, where the code for 4.2 for the serial port is still there (outcommented)
I suggest to use this constructor as the module is set to Baudrate 38.400 when as it Comes from GHI
wifi_RN171 = new WiFi_RN171(2, 38400, GTI.SerialParity.None, GTI.HardwareFlowControl.NotRequired);
@ RoSchmi - So, this module is unreliable ?
I can only say that I was not able to set up a “FEZ” http Server and PC http Client combination that repeatedly transfered a picture file from server to client. It worked for some hours and some100 transfers, then the server got unresponsive for requests for unknown reasons. The program on the mainboard was still running.
Perhaps some kind of watchdog would help for this issue.
@ RoSchmi - do you think that for my needs, it might be a problem?
Is it possible to use that module and open a server socket with it? whether it’s connected to wifi from my router or as an AP ?
Depends on your needs. If you implement a kind of watchdog which resets your mainboard automatically, lets say every 30 min, and it will evtl. get unresponsive for http requests, after the reboot it will be responsive again. If you can live with that possible delay to send a command, I think it will be o.k. for you.
I think you should try and make your own experience!!
There is another project using sockets, where the RN171 is in the role of the client, but if have no own experience.
I don’t think, that this will fit your needs.