WiFly Shield: can't get it work.

i tried to get the example code and the other library going for about 10 minutes, then totally abandoned them.

Instead, I looked at the schematic and the WiFly module's reference documentation, then pulled the code that actually makes the SPI and UART work out of the libraries and put it in one place, there's not very much of it. It's actually pretty simple. You just have to figure out how the SPI and the UART work.

If you look here:

Find the WiFlyGateway and download the code. The file that contains ALL the SPI and UART initialization and manipulation is CommManager.cpp and .h

If you're looking for a "Black Box" solution for the WiFly, I don't think you're going to find it. And for the simple reason that every system that uses a WiFly is going to be a bit different, look at mine... I also connect to additional SPI UARTS, something none of the libraries seem to support. There is also a WiFlySerial library that someone wrote, but it requires the breakout board version of the WiFly, not the shield.

Once you have the WiFly running and in Command Mode on the serial terminal, program it with the particulars for your WiFi network using the instructions in the Reference manual for the module, then use the "save" command to save the new parameters. Then when the WiFly is power cycled, it will auto-associate with the hub and you're ready to connect it to whatever server it's going to.

Take it one step at a time:

  1. Get the SPI to work.
  2. Get the SPI UART to work.
  3. Get the Serial Monitor to talk to the WiFly.
  4. Program the WiFly to connect to your WiFi. Remember to use the "save" command.
  5. Power cycle the Shield and watch it connect.