Introduction: WiFly RN-XV Module - Wireless Arduino Board Tutorial - Intro

Picture of WiFly RN-XV Module - Wireless Arduino Board Tutorial - Intro

Have you ever wanted to make your arduino have wireless ability? Wanted to connect your robot to your wireless router for access via your local network? Follow this little tutorial I've put together and you'll be on your way in no time!

Things you'll need:
- Arduino Board (I use a Mega 2560)
- WiFly RN-XV Module (Purchase here)
- Dupont male to female cables (Purchase here)
- Download Comm Operator (Download here)
- Download Angry IP Scanner (Download here)
- View WiFly RN-XV Datasheet (View or Download here)

Below is information on the LEDs on the module. Each light provides information to you.
LED Info:
Solid Green Light: Connected through TCP.
Slow Blinking Green Light: IP address is assigned.
Fast Blinking Green Light: No IP address assigned.
No Green Light: NA

Solid Yellow Light: NA
Slow Blinking Yellow Light: NA
Fast Blinking Yellow Light: RX/TX Data Transfer
No Yellow Light: No activity.

Solid Red Light: NA
Slow Blinking Red Light: Associated, No internet detected.
Fast Blinking Red Light: Not associated.
No Red Light: Associated, Internet detected.

Step 1: WiFly RN-XV Module - Wireless Arduino Board Tutorial - 1 of 2 Steps

Picture of WiFly RN-XV Module - Wireless Arduino Board Tutorial - 1 of 2 Steps

Steps:
1. Lay all the parts out and download all the items I listed above.
2. The WiFly module will only be using the 3.3V and Ground pins from the arduino for now.
3. View the Datasheet to see where to connect the power and ground to the module using your dupont cables.
4. To start off, we need to put the module in ADHOC mode so we can connect to the module and edit the settings in the module. Connect a temporary cable to Pin 8 on the module from a 3.3V power source. I used a breadboard to split up the 3.3V power source.
5. Connect your arduino board to a power source either USB or DC power.
6. Disconnect the pin 8 jumper cable. Basically this cable force booted the module into ADHOC mode.
7. A new open wireless network will appear with the SSID of WiFly-GS*-**, the last three characters are random on each module to allow for multiple modules if needed.
8. Connect to this network and look at the network properties of the connection to see what the IP is. For me, I'm using Windows 8 and 1.2.3.4 was assigned to the module. All the other tutorials explained that the IP was 169.254.1.1 to connect to but was not true at all in my case.
9. Ok time to open up Comm Operator. It is a trial version so you have 30 days to use it. Just wait the 5 seconds and click Register Later.
10. Make sure that Clear and Add CR are the only check boxes checked.
11. Click on Open Connection, the chain link icon.
12. Click on the TCP Client tab.
13. Input the following settings: IP Address: (Whatever the IP address you got in Step 8) Connection Port: 2000 Click Open.
14. In Log Data, you should receive *Hello* The next commands below, only type what is in BETWEEN the " " marks. You will receive also entries in the data log that should be <4.00> This is the firmware version. This is normal.
15. Type "$$$" and press Enter to initiate the command sequence. You should receive CMD from the WiFly Module.
16. Type "factory Reset" and press Enter to clear any data put in and reset to factory default settings. You should receive Set Factory Defaults.
17. Type "save" to save the settings.
18. Type "reboot" to reset the module. Do Steps 11 through 15 and come back to Step 19.
19. Type "set ip DHCP 1" and you should receive AOK from the module.
20. Type "set wlan join 1" and you should receive AOK from the module.
21. Type "set wlan ssid (your network name)" and you should receive AOK from the module. Without the parenthesis, type your actual network name. If you don't know what it is, look at your computer's wireless list and see what you are connected to. For example, mine is Belkin.42EC
22. IF your connection is open, you'll skip this step. If you use a WPA encryption, type "set wlan phrase (your network password)". If you use a WEP encryption, type "set wlan key (your key here)" The key must be entered ASCII/HEX encoded and it MUST have exactly 26 characters. Use this to convert text to ASCII/HEX. You should receive AOK from the module. Without the parenthesis, type your actual network password. If you do not know what it is, look on your router if it's provided by your internet provider or if you know how to get into your router's settings, look in the security settings to see what the password is.
23. Type "save" to save the settings.
24. Type "join (your network name)" to reset the module. Without the parenthesis, type your actual network name. If you don't know what it is, look at your computer's wireless list and see what you are connected to. For example, mine is Belkin.42EC
25. The module will reset on its own and start connecting to the network. Close out Comm Operator. Use the LEDs as reference on what is going on. This connection process can take up to 10 minutes!!! If it last longer than 10 minutes, then something is wrong. Restart the steps. I will note here as well that you should only have the power and ground connected to the module.

Continue to the next step page to finish the process!

Step 2: WiFly RN-XV Module - Wireless Arduino Board Tutorial - 2 of 2 Steps

Picture of WiFly RN-XV Module - Wireless Arduino Board Tutorial - 2 of 2 Steps

26. Once the green LED is flashing slowly, it has an IP address assigned.
27. Pull up Angry IP scanner to check to see if you notice any new IPs assigned to your router. You can also check your router's DHCP client list and you should see the WiFly listed. Look and see what the new IP that is assigned to the module. You'll need it. Your module is now connected! We are now going to setup the communication between Arduino GUI and the module.
28. Open up Comm Operator, click Open Connection, and change the IP to the new IP assigned to your module. The port stays the same. Click Open.
29. You should again receive *Hello*.
30. Type "$$$" and press Enter. You'll receive CMD from the module.
31. Type "set comm close 0" and press Enter. You'll receive AOK from the module.
32. Type "set comm open 0" and press Enter. You'll receive AOK from the module.
33. Type "set comm remote 0" and press Enter. You'll receive AOK from the module.
34. Type "set comm size 1460" and press Enter. You'll receive AOK from the module.
35. Type "set comm time 1000" and press Enter. You'll receive AOK from the module.
36. Type "set uart baudrate 115200" and press Enter. You'll receive AOK from the module.
37. Type "save" to save the settings.
38. Type "exit" and press Enter.
39. Close Comm Operator.
40. Connect Pin 2 UART_TX to a RX pin on your arduino board. Do not connect to Pin 0 or Pin 1. These are reserved pins. Can't really explain why but I just know it doesn't work properly.
41. Connect Pin 3 UART_RX to a TX pin on your board. If you forgot about the pins on the module, refer to the datasheet up top.
42. THAT IS IT!

In your Arduino Sketch, you'll use "Serial.begin(115200);" to communicate with your board now!

If you have any problems, feel free to comment below.

Comments

jacem.guezguez (author)2017-07-26

Hi evreybodey ... Please avoid using Factory RESET .... the wifi connection of your WiFly module will be disabled ... I am working on this issue since three days without solving it ... If someone find a solution to activate it again, please inform me

mchow11 (author)2014-04-15

I met a trouble when I was doing the step 18 -->

18. Type "reboot" to reset the module. Do Steps 11 through 15 and come back to Step 19.

My Comm Operator paused after I entered "reboot". I checked my Wifi connection and found that the original "WiFly-GS*-**" was missing. I waited for about 10 minutes but the situation was the same. Where did I do wrongly? Please kindly let me know. :D

P.S. My WiFly module was RN-XV but the WiFly name was not "WiFly-GS*-**" instead of "WiFly-EZX-47".

jacem.guezguez (author)mchow112017-07-21

Hi did you find the solution of this problem ...

LuisO34 (author)mchow112017-01-06

Excuse me, I was doing this example and I got the same mistake and situation as you, I had problems with the step 18, and the Wifly GSX is missing right now, I can´t see it in my computer either in my cellphone. How did u fix it? I hope u can help me buddy

jacem.guezguez (author)2017-07-21

Hi, thanks for this tutorial

In step 18 et after entering "reboot" command . My Comm Operator paused and the Wifi connection "WiFly-GS*-**" was missing.

Could you please tell me if you faced this problem

oriondiver (author)2015-06-02

Hello, I have a problem about this module. When I use Cisco modem, my module connected it. Now I have NetMaster Modem and when I try to connect, it gets an error. My iPhone, iPad and MacBook Pro can connect it easily but I couldn't get managed to connect the module.

When I had Cisco modem I was using ADSL, now I have cable tv + internet. (Docsis 3.0) This is the error I get:

Auto-Assoc Nautilus chan=11 mode=MIXED SCAN OK
Joining Nautilus now..
Disconn from Nautilus,AUTH-ERR

How can I fix this issue? Thanks for your help.

MarcioV (author)2015-05-10

Ive managed to configure the tiny sine wifishield to connect to my router and get its ip and everything. I can even ping it from terminal. But when I run the connect over wifi sketch (commenting out the shield_present, firmware and attempting to connect if-tests out), I get this:

Youss: 0:0:0:0:0:0

D:

BSSID: 0:0:0:0:0:0

signal strength (RSSI):0

Encryption Type:0

IP Address: 0.0.0.0

0.0.0.0

MAC address: 0:0:0:0:0:0

You're connected to the networkSSID:

BSSID: 0:0:0:0:0:0

signal strength (RSSI):0

Encryption Type:0

IP Address: 0.0.0.0

0.0.0.0

MAC address: 0:0:0:0:0:0

SSID:

BSSID: 0:0:0:0:0:0

signal strength (RSSI):0

Encryption Type:0

Why?

edr2.cat made it! (author)2015-02-04

That was a nice project, and easy.

I found some troubles but nothing too hard to solve ...

- I had to keep the adhoc pin connected until step 19.

- Every instruction has to be written in lower case ( except the name of the ssid )

- If ssid contains spaces " " they have to be written as "$"

- You can use Putty also to set the connection instead of CommOperator. It is free at www.putty.org and it has to be set as RAW , with the IP adress and the port ( 169.254.1.1 and 2000 in my case)

Congrats!

Now it's time to play!

peter.kula.9 (author)2014-11-14

THANKYOU very very much, i finally got it to connect to my belkin. Am not sure about connecting to arduino because am using UNO, which doesn't have multiple RX and TX pins, it only has 0 and 1

tahanig (author)2014-10-21

thank you for sherd information. I want to ask you, when i used rn-rx module can I send message from the wireless module to access point? And can I use run-Rx without Arduino

troy.rogers.56 (author)2014-08-08

how do I enter my ssid If it has a space in it?

Nathy N (author)2014-02-27

thanks for the tutorial.

Perform all the steps and my router to my card I assign an ip address, but please help me as I can work with arduino commands to control some LEDs.

Freeman02 (author)2014-01-10

Thank you for helpful tutorial,
Sorry if my question sounds dumb to you, I ma not an expert about internet protocols. I am using the RN-171 for my project, I have no problem connecting the module either in ad-hoc or Wi-Fly mode. While connected in ad-hoc mode, I am able to connect to the device and communicate remotely with any computer on the network through the command window (I am using Windows 7) connecting through telnet. However, I have no idea on how to communicate remotely with the module in Wi-Fi mode. Do I need to have a web server of my own to communicate? Do I need to set a web page, how do I communicate exactly with the RN-171 module in Wi-Fi.

To make it clear, I do not have any issue communicating between MCU and WiFly RN-171, my problem is how do I access the data that is broadcast through Wi-Fi by the RN-171 module.

Thank you for your help.

boerni (author)2013-12-29

Hello,
I made everything like you told, but at step 15 I don't become an answer.
When I send a command, I never become an answer.
What could be the reason?

Thanks for this tutorial :)
My englisch isn't very good, I'm not from America :(

About This Instructable

38,798views

19favorites

License:

More by dmillsap06:WiFly RN-XV Module - Wireless Arduino Board Tutorial - Intro
Add instructable to: