I had a WiFly working with an Arduino Mega 2560 thanks to the library WiFlySerial from Tom Waldock. But this library use the SoftwareSerial library that is not compatible with Due processor.
For making WiFly work with Due, I use serial communication port Serial1 and I wrote WiflySerial1 library.
It is less complete than (but highly inspirited from) Tom' work.
You can download it at http://code.google.com/p/wiflyserial1/
Comments and feedback are welcome!
First of all thank you for this library, I already used the previous version with the webserver to test the WiFly shield on my Arduino Due. It works very well!
In fact I was just looking how to add client functionality when I saw your update. So I tried it immediatly, unfortunately I got a compilation error:
....Arduino/libraries/WiflySerial1/WiflySerial1.cpp: In member function 'boolean WiflySerial1::openConnection(char*, int, long unsigned int)':
....Arduino/libraries/WiflySerial1/WiflySerial1.cpp:438: error: 'itoa' was not declared in this scope
I did not have time to dig in to it now, but I will try tomorrow , I asume a library (for itoa) has to be added.
....Arduino/libraries/WiflySerial1/WiflySerial1.cpp: In member function 'boolean WiflySerial1::openConnection(char*, int, long unsigned int)':
....Arduino/libraries/WiflySerial1/WiflySerial1.cpp:438: error: 'itoa' was not declared in this scope
This error occurs when compiling for Due.
Not for Mega 2560, and I test the last modifications with a Mega...
A search in the forum and I get the solution: just add
#include <itoa.h>
in file WiflySerial1.h
This line don't hurt when compiling for Mega 2560 so I shall add it to next version