Project - Fez.Spider, Two XBee's and a Sparkfun WiFly RN131-C breakout

Fez.Spider, Two XBee’s and a Sparkfun WiFly RN131-C breakout.

I want to add three zip files so I have to do this in stages. Uploading a zip containing others zips does not allow browsing the code.

The primary reason I started is because I wanted to program my WiFly remotely from a windows form and receive
my changes for verification. One I got that working, I got carried away and added code to save files on the PC
and the SDCard. I added the camera ‘On A Whim’ just to see it working. Files can be saved from the camera.
There is no reading of images but this feature could be easily added.

Flipbookmaker has some cool code to do this with a pot.
See http://blogs.msdn.com/b/net_gadgeteer/archive/tags/flipbookmaker/

File read/write on the Spider to the SDCard is by using GT.StorageDevice SDStorage. I began by using StreamReader and
StreamWriter. I had several issues using StreamWriter. The most severe was receiving Assert on the T35 display.
Write would save my file but the LCD would ‘go to black’ with the Assert message during the write. The LCD would return
to ‘normal’ after the write was finished. I could not solve that so I tried SDStorage and that worked well.

The Fex.Spider is using two serial ports. One port for read/write to the PC application and the other serial port
for read/write the WiFly commands. I am using only the AT command mode. Not API mode. I used AT mode for this
sample code because it is much easier to understand if you are just beginning. At least that is my opinion.

I have used some sample code I found by Marco Minerva. See his Copyright in the GadgeteerSpiderServer application.
I use no copyright for my code. Use as you like.

I know of nothing in my application that will harm your XBee or your WiFly device.
My WiFly module is powered by an auxiliary power source. Not by the Fez.Spider power.

Along with the code I have supplied the WiFly configuration I am using with the applications.
See file testEFile.txt. You must change the Passphrase=****** to your Passphrase.

There is code to switch the WiFly in/out of Ad Hoc mode but do code to support it.

Frankly… I am not smart enough to develop code to communicate over Ad hoc from a windows form. I have not
been able to find any sample code to get me started with the basics.

Anybody reading this have some sample code or can steer me to a link? I would really like to be able to do this.
I do not need security because the WiFly only supports Open mode as far as I know.

I hope someone can use at least part of the code…

I am including a small console application that uses a socket to talk to the GadgeteerSpiderServer application.
The Spider app. only supports two commands. Time and close or just have a string returned to you.
To add commands you will need to modify the code in the application GadgeteerSpiderServer.

See #region DataReceived Event For Ethernet method
private void Etherserver_DataReceived(object sender, DataReceivedEventArgs e) { }

You can add your own commands in the Etherserver_DataReceived method to process.
Send a command and return string data as you wish.

Usage is the Windows form or the Console application.