WiFly tips
From Banglab
General Tips
- Unlike Xbee, the WiFly doesn't drop out of command mode in 10 seconds. In fact, you need to type
exitfor it to go back to data mode. It will respond withEXIT. - The WiFly has trouble with network SSIDs involving spaces. Although it tells you to use a $ instead of a space (and it seems to work), I was unable to connect, even unsecured. The easiest way is to make the SSID something simple, with just letters.
- Encryption is possible, but still frustrating. To remove another layer of annoyance, change your network to be unsecured. Make sure to
set wlan auth 0on the WiFly. - Check out the SparkFun Reference Guide for the WiFly for all the command codes. If you've got encryption or need to set an IP manually, it has all the commands you'll need.
getis a good way to check that the settings are being stored properly.get wlanandget ipare especially helpful.- The WiFly should give you an AOK if it accepts. Before turning it off, remember to type
saveso it saves all the settings.
Mac-Specific instructions
This website (linked on the main page) is a great resource to get started, but it's made for PC. Here's a few tips for the mac users.
You have to first install the Spi library on Arduino.
- On a Mac, you have to control-click (right click) on the arduino application itself, select "Show Package Contents", and put the library in the Contents/Resources/Java/hardware/libraries/ directory inside of there.
In order to talk to the WiFly module, you have to use a terminal application. Although the arduino's serial monitor was tempting, I found it gave me problems.
- On a Mac, you can open up the Terminal application and use the
screenfunction:
screen /dev/tty.usbserial-*****
The port which you use is dependent on your Arduino board. To find out which port to use, you can either type ls /dev/tty.* into the Terminal, or go to the Arduino application and look under Serial Port for the one you would upload code to. Once you've found out which port to use, just replace the **** with your port and run screen.
Some tips for the screen function:
- $$$ still gets the WiFly into command mode. You won't be able to see the $$$; instead you'll see CMD after you've typed it. If you see the dollar signs, you're not getting through.
- The constant updates about status might chop your command in half. This doesn't matter. Just type the whole command out and hit enter, and it should work.
- Delete doesn't seem to work, so if you mistype, just press enter and start over. The WiFly should give you
ERR -? cmd, or similar.

