Search This Blog

Saturday, 5 February 2011

Sparkfun WiFly shield with FEZ Domino

After getting the Motor Controller interfacing completed I decided to join the few others that were developing an interface between the FEZ Domino and the Sparkfun WiFly shield.

The class libraries and firmware from GHI and Microsoft are limited in what devices they support. Unfortunately the WiFly shield is not catered for yet. So we need to create Managed code to drive this shield on the FEZ Domino.

It's a different story with the FEZ Panda and the ability to add Native code to custom firmware (at the expense of GHI Native code assemblies). I'm curious as to whether the Panda can have a TinyCLR build reflashed via JTAG and OpenOCD considering Code Read Protection is enabled in the LPC2388. You can bypass this procedure and purchase a CRP disabled board straight from GHI.

The first step was to make the WiFly shield pin compatible with the FEZ Domino. Others on the forum had found a number of ways to do this. I opted for adding a diode between the 5V and Vin pins. This would allow me to use USB to power the Domino and Wifly shield, plus the option of running the Domino from an external power source.

The next step was to sort out the code to handle the SPI to UART bridge. Getting the signal and startup sequence nailed others had managed to deal with. So it was fairly quick to get the WiFly-GSX chip into it's command mode.

Once in command mode the lengthier task was then getting the UART to talk properly, and deciding what state to get to with the WiFly-GSX initialisation and WLAN connection configurations.

I created a custom class library for all of this. This source code, and example usage code, can be found over at (Sparkfun WiFly shield with FEZ Domino).

1 comment:

Laese said...

Sketch Arduino and PIC firmware for Wifly RN-XV modem configuration without Wifly library and
with front-end:
Type in browser address bar: to toggle Led and open a HTML page.
The microcontroller can be, with this firmware, server (switching the led signal through in adress bar)
or also client (the AD converter value is inserted in google databank).