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

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 was assigned to the module. All the other tutorials explained that the IP was 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

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.

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.
<p>I met a trouble when I was doing the step 18 --&gt;</p><p>18. Type &quot;reboot&quot; to reset the module. Do Steps 11 through 15 and come back to Step 19.</p><p>My Comm Operator paused after I entered &quot;reboot&quot;. I checked my Wifi connection and found that the original &quot;WiFly-GS*-**&quot; 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><p>P.S. My WiFly module was RN-XV but the WiFly name was not &quot;WiFly-GS*-**&quot; instead of &quot;WiFly-EZX-47&quot;.</p>
<p>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&acute;t see it in my computer either in my cellphone. How did u fix it? I hope u can help me buddy</p>
<p>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. <br><br>When I had Cisco modem I was using ADSL, now I have cable tv + internet. (Docsis 3.0) This is the error I get: <br><br>Auto-Assoc Nautilus chan=11 mode=MIXED SCAN OK<br>Joining Nautilus now..<br>Disconn from Nautilus,AUTH-ERR<br><br></p><p>How can I fix this issue? Thanks for your help. </p>
<p>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:</p><p>Youss: 0:0:0:0:0:0</p><p>D: </p><p>BSSID: 0:0:0:0:0:0</p><p>signal strength (RSSI):0</p><p>Encryption Type:0</p><p>IP Address:</p><p></p><p>MAC address: 0:0:0:0:0:0</p><p>You're connected to the networkSSID: </p><p>BSSID: 0:0:0:0:0:0</p><p>signal strength (RSSI):0</p><p>Encryption Type:0</p><p>IP Address:</p><p></p><p>MAC address: 0:0:0:0:0:0</p><p>SSID: </p><p>BSSID: 0:0:0:0:0:0</p><p>signal strength (RSSI):0</p><p>Encryption Type:0</p><p>Why?</p>
<p>That was a nice project, and easy.</p><p>I found some troubles but nothing too hard to solve ...</p><p>- I had to keep the adhoc pin connected until step 19.</p><p>- Every instruction has to be written in lower case ( except the name of the ssid )</p><p>- If ssid contains spaces &quot; &quot; they have to be written as &quot;$&quot;</p><p>- You can use Putty also to set the connection instead of CommOperator. It is free at <a href="http://www.putty.org" rel="nofollow"> www.putty.org</a> and it has to be set as RAW , with the IP adress and the port ( and 2000 in my case)</p><p>Congrats!</p><p>Now it's time to play!</p>
<p>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</p>
<p>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</p>
<p>how do I enter my ssid If it has a space in it? </p>
<p>thanks for the tutorial.</p><p>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.</p>
<p>Thank you for helpful tutorial,<br>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.</p><p>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.</p><p>Thank you for your help. </p>
Hello,<br>I made everything like you told, but at step 15 I don't become an answer.<br>When I send a command, I never become an answer.<br>What could be the reason?<br><br>Thanks for this tutorial :)<br>My englisch isn't very good, I'm not from America :(

About This Instructable




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