WiFly RN-134 Breadboard Testing

I’ve mentioned before that I bought one of these RN-134 “SuRF” boards from coolcomponents.co.uk. My aim is to write some code for AVR microprocessors that will be able to POST data to a service on the web. Maybe I could even get it to send ebMS 3.0 messages. I reckon it would be cool to be able to send an ebMS 3.0 message without needing a computer. Anyway, I digress...

But ... before I jump in and start writing AVR code, I wanted to test my WiFly board. It has taken me some effort to get this procedure working, so I thought that I had better blog it – before I forget. Then, when I buy another WiFly, I can come back to this page.

To send commands and data to the WiFly I’m using TeraTerm (Windows Hyperterminal has problems with the WiFly, apparently, so don’t use it). Oh, and I’ve done all this on Windows 7.

To connect to my PC, I’m using one of these - mainly because I had one lying around. It gives me a virtual com port on my computer and exposes TTL serial signals to my breadboard. Since I’m just testing, I don’t want to solder anything to the WiFly board, so I’m going to use the WiFly’s RS232 interface, the board already has header pins for it, like this:

Wifly RS232 port

Pins 5 and 9 of this RS232 interface can go directly to the GND and 5v pins exposed by my USB-to-serial adapter; this will supply power to the WiFly. But the RX and TX pins expect RS232 voltages (not the TTL signals coming from the USB adapter). Enter the MAX232 chip which will convert the signals for us:
WiFly MAX232 connections
Pins R1IN and R2IN are connected to my USB adapter, whilst R1OUT and R2OUT are connected to the RS232 headers on the WiFly board. Now we have all this in place, we should be able to fire up the WiFly and connect to it via the virtual com port on the PC.

Open TeraTerm and make a serial connection to COMx. The serial settings should be 9600 baud, 8 data bits, no parity, no flow control, 1 stop bit. You should get a connection.

Type ‘$$$’ and we should get the ‘CMD’ message returned from the WiFly. Tip: type three $ signs in quick succession, don’t do what I did and pause between each key press. The WiFly expects this string to be entered in a short space of time.

OK, we’re in. You can see all the default settings by typing:

get everything<enter>

...and the WiFly should list back all the settings to you. They should match these default settings.

So... what would you need to change, to join your wifi network? Enter these commands:

set wlan ssid [your ssid]<enter>
set wlan key [your 128 bit wep key]<enter>

Tip: when you change something, don’t forget to type ‘save’. Your changes will not be written to the configuration unless you use the save command!

Now, the WiFly should restart and you should see it connected, assuming your wifi has DHCP. NOTE: I’m assuming 128-bit WEP, you’ll have to adapt this procedure if you have other security settings on your wifi.

You should now be able to find out the ip address of the module on your network. Type ‘$$$’ again to get back into command mode, since we’ve rebooted the WiFly. Now enter:

get ip<enter>

The device should list back the details of its ip address. Now you can ping it from a PC on your network. Hopefully you’ll get responses back and know that the device is connected!

I’ll try and make another post describing how to get the WiFly to return the html source of a webpage over the serial port, but for now I’ve done enough documenting...

NOTE: I did not find the documentation for the WiFly to be the best, I would have liked to see a test procedure like this included. However, before I bought the WiFly I asked Roving Networks some questions via e-mail and they came straight back to me with responses. This is amongst the best support I have ever received from any manufacturer. Encouraged by this I went ahead and bought the device. I’m pleased that I did – this board is a great product. People at Roving Networks: you have my thanks.