Ethernut Home Hardware Firmware Tools Download Community
 
 
Search | Legals | Deutsch

WLAN Internet Radio


The hardware is based on an Ethernut and a Medianut board plus Michael Fischer's PCMCIA Interface, which is stuffed with a Xilinx XC95108 and an ELSA AirLancer MC-11 WLAN card.

The latest information is available at www.usbdip.de

The main problem with driving PCMCIA and CompactFlash cards from an AVR microcontroller is the IORDY line. If the card activates this signal, then the microcontroller should extend its access cycle. There are three possible solutions:

  1. Using port I/O instead of memory mapped access.
    Occupies a lot of port bits and is typically slow.
  2. Inserting delay loops in the software at certain points.
    Requires some trial and error and may fail when changing cards. Also slower.
  3. Building a hardware to emulate cycle extension.
    As one can imagine, this is not trivial. But with today's programmable logic chips it can be done.

Michael uses solution three by implementing a state machine into a CPLD. Here are the first photos of the prototype.

WLAN MP3 Radio
WLAN Stack
PCMCIA Interface


Previous WLAN Project


This version used a simple CPLD layout and suffered severe performance issues.

mfwifipre.zip
This archive contains the 802.11b wireless LAN driver for Ethernut including a HTTP server sample.

mfwificad.zip
The Eagle CAD files of the PCMCIA adapter, which fits on top of the Ethernut Board. In Germany most parts are available from Segor electronics.

mfwifipld.zip
The Xilinx project files for the PCMCIA adapter.

wlan8800.jed
The prepared JEDEC file, which can be directly used with the Xilinx Impact programming tool. The pin layout of the CPLD is available here


Software

The source code had been tested with Imagecraft ICCAVR 6.30 and Nut/OS 3.4.1. It may not work or even compile with AVRGCC.

Please note, that this software had been created to get the task done as soon as possible. The driver parts in wlandrv.c wlandrv.h and wlandef.h are based on the FreeBSD sources.

At several places you'll find

      #if 0 //@@MF later
      ...
      #endif
      
blocks. These parts are not done yet.

Some modules use MS style type definitions, which will be replaced later. Nut/OS is currently using old BSD style types and will move to inttypes.h, btw.

Due to the simple hardware implementation, the software has to work hard to transfer data from and to the WLAN card. Thus performance is still very low, about 8 kByte per second.


Hardware

This driver has been tested on Ethernut 1.3 with a PCMCIA add-on board. The PCMCIA interface uses a Xilinx XC9572-PC84 CPLD. All the lines like CE1, CE2, WE, OE and so on are controlled by a latch inside the CPLD at address 8800 hex. A more advanced control may be implemented into the CPLD later, which may use a state machine to perform complete read/write cycles.

For the WLAN hardware the Netgear MA401 PCMCIA card and the Netgear MA701 CompactFlash card has been used. Both connected to an access point equipped with the Lucent ELSA MC-11. In a second environment the Netgear MR314 had been used.


Additional Hints

The WLAN network name used is "EGNITE", you may change it to fit your access point settings. For WEP, the key "12345" is used.

After Michael Fischer got the first success, he immediately passed the sources to me. It didn't work on my Ethernut 2.0, so I switched to Ethernut 1.3. Still no success. The packets were received, but they did look really weird. Michael blamed my Netgear AP sending out "Wurstbrot Frames" (German term for bread with sausage, as you may guess, one of the favourite everyday meals here). The solution finally was, that his Elsa AP is too smart. If it receives an 802.3 frame first, it automatically switches to 802.3. If it doesn't get a response to a SNAP frame, it tries 802.3. The Netgear AP insists on SNAP frames. After implementing SNAP, the whole thing worked with Elsa and Netgear.