WiFly-shield with arduino setup instructions

wifly-shield
We had a hell of a time setting up the Wifly Sheild to our Arduino Uno. After hours of trying different libraries we realized the problem was our router wireless security settings.

Linksys settings

We recommend turning off all security first, testing the arduino to make sure it’s not defective.

Connect to your Linksys router by typing in 192.168.0.1 to your browser. Default settings are username:admin and an empty password.

Wireless Settings -> Manual Wireless Connection Setup

Wireless Network Name : no spaces or special characters

Wireless Security Mode: WPA-Personal

WPA Mode: WPA2 Only

Cipher Type: AES (Apperently the shield doesn’t work with WPA2 and TKIP)

Group Key Update Interval: 3600 seconds

Pre-Shared Key: no spaces or special characters

You can find your channel on the status page. We didn’t need this to set up the Wifly.

Testing your wireless network with Wifly shield

Add https://github.com/sparkfun/WiFly-Shield/tree/master/Libraries to your Arduino Library (unzip the Library, go to Arduino application, Sketch->Import Library->Add Library and go to where you unzipped the library, open the main parent folder, restart your Adruino application)

Open the SpiUartTerminal sketch (File->Examples->Wi_Fly-Shield->SpiUartTerminal)

Upload the sketch and open Serial Monitor (Tools->Serial Monitor)

type $$$ (make sure no line ending is selected)

select carriage return

type get wlan (these are the current settings)

type set wlan ssid wireless$network$name ($ is used instead of spaces, your wireless network shouldn’t have spaces anyway)

type set wlan phrase wirless$password

type join (it will either give you an error or tell you it’s successfully connected)

type save if everything worked properly

Congrats! You have wireless capabilities.

Now add the wireless settings to the appropriate Credentials.h

We had to comment out skipRemainderOfResponse(); in the boolean WiFlyDevice::join(const char *ssid) of WiFly_Shield/WiFlyDevice.cpp because it was hanging (it couldn’t find a new line to know when the response had ended).