nRF24L01+ wireless transceiver on the mini2440!

Posted by Doug on Mon 16 January 2012

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:

  1. Configure SPI and enable a pullup for the IRQ pin in the mini2440 kernel.
  2. Modify the spidev module to expose the IRQ using the userspace I/O system.
  3. Write new SPI functions to interface between the radio and Neil's driver.
  4. Write a threaded interrupt handler to deal with the IRQ from the radio.
  1. Port the driver to an ATmega16 development board and configure this as a receiver for testing.
  1. 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:

image1

..and here are the modules on the dev boards:

image2

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.