WiFly Radio Installation

WiFly Radio Installation Instructions

(Note that the original WiFly radio system is no more recommended, mostly because of the disconnection problems in polluted WiFi environments. The new XBee S6B WiFi radio is a much better radio, and the new installation instructions are here)

The WiFly RN-XV is available from Sparkfun:

https://www.sparkfun.com/products/11047

The WiFly disconnects easily, so use the following high gain antenna to prevent this:

https://www.sparkfun.com/products/558

You will need a breakout board to connect your XBee radio to the MarcDuino:

https://www.sparkfun.com/products/11373

You will also need another board called an XBee dongle, this one with a USB plug, in order to program the radio from your computer:

https://www.sparkfun.com/products/9819

Download a terminal program

I use the TeraTerm the terminal program on Windows to send the configuration messages to the WiFly

Teraterm Web Site

Download current tera-term version (4.78)


On the Mac you can use the built-in command line "screen" if you are hard core, or the much easier to use app CoolTerm:

http://freeware.the-meiers.org/

Programming the radio

Plug the XBee S6B in the USB XBee dongle and the into your computer

Configure your terminal program to connect at 9600 bauds, 8bits, no parity, one stop bit (known as 8N1) on whatever serial/COM port number your USB adapter connected to.

Follow the programming procedure below:

Read in the current config in the XCTU tool. Make 4 modifications:
- Change Infrastructure Mode to SoftAP (default was STA)
- Change SSID to whatever you like. (default was Blank)
- Change IP Protocol to TCP (default was UDP)
- Setup WPA2 password encryption.
Write the changes back to the S6B device. 

Next in the R2 Touch app under the wrench menu, make 2 changes:
- change Receiver IP address to 192.168.1.10
- change Receiver Port Number to 9750

Connecting to your WiFi radio from the iPhone

Plug the programmed S6B radio to the XBee breakout board connected to your MarcDuino (see here for the MarcDuino v1 connections), and power the system up.

On your iPhone go to Settings. In the Wifi section, you should see your R2 network, under the SSID name you gave it above. Connect to it by selecting it like below.

Connecting from the R2 Touch app for the first time

Before the R2 app can connect for the first time, you have to change the settings within the app (that's because the defaults are for the former WiFly radio and won't work with the new S6B).

Open the R2 Touch App, press the wrench menu, and make 2 following changes:

- change Receiver IP address to 192.168.1.10

- change Receiver Port Number to 9750

Now go back to the main R2 Touch screen. If your radio is connected to a working MarcDuino, the WiFi indicator should turn green. You have connected successfully.

Note: testing the radio connection without a functioning MarcDuino

It you have not yet connected your WiFi radio to a MarcDuino, or if the MarcDuino is not working properly, the indicator will not turn green because it does not receive an answer from the MarcDuino. However, it is still possible to check that the radio connection is working by using the XBee dongle and the XCTU app and check if something is received when you press a key on the R2 Touch app. You will just see a fleeting message with a couple letters, as the R2 App keeps sending blank lines every 1/2 seconds, but that is enough to prove that the radio connection is OK.

A few things to check if things don't work

If it doesn't, check that

1- your iPhone is connected to your S6B network (quit the app and go to the iPhone Wifi settings), and has not inadvertently reconnected to your home Wifi network.

2- you are using the TCP connection method (in the R2 Touch wrench menu)

3- you have entered the correct Receiver IP on R2 Touch (see above)

4 -you have entered the correct Receiver port on R2 Touch (see above)

5-Connect your WiFi radio back to your computer using the USB dongle, and use the XCTU tool to see if it is receiving traffic from R2 Touch. The data received is going to be mostly garbage, because the receiver is not connected to the MarcDuino yet, and the indicator in R2 Touch is not going to turn green either. However if you see any traffic, it's enough to confirm that you WiFi connection is established properly, and that the fault probably resides with the Wifi radio connection to the MarcDuino, or the MarcDuino board itself. See here on how to test the MarcDuino board by itself without a radio attached.