Over the festive period Will and I ported Neil MacMillan's nRF24l01 driver for the Atmel AT90 to the mini2440. Neil has an excellent description of the radio and his driver on his website. The exact series of events are hazy, but they went something like this:
- Configure SPI and enable a pullup for the IRQ pin in the mini2440 kernel.
- Modify the spidev module to expose the IRQ using the userspace I/O system.
- Write new SPI functions to interface between the radio and Neil's driver.
- Write a threaded interrupt handler to deal with the IRQ from the radio.
- Port the driver to an ATmega16 development board and configure this as a receiver for testing.
- Write a user space program to configure the radio as a transmitter and transmit a test message to the ATmega16 dev board.
We used the following development environment:
..and here are the modules on the dev boards:
The code for all of this (alpha at best) is available here:
https://github.com/dougszumski/nRF24L01
The next stage is to improve the speed of the driver. We currently estimate a maximum bandwidth of ~10B/s with jiffies set to 1000 which is a fraction of the true potential. One of the ideas so far is to move the SPI routines, the chip enable toggling and the interrupt handling back into the kernel, and then interface with something like a netlink socket. If anyone has any helpful advice we'd be pleased to hear from you.
More details will be posted on our forthcoming website which is TBA.