Another of those rare status updates. Finally found a few evenings to work in detail on nRF24LU1p. Turns out they are more complicated to work with than expected. I will be making a detailed "getting started with nRF24LU1p development" post some time soon in my blog. This notes will just cover a few details, so it you don't understand a thing - skip it and make you read the HELP WANTED part. ;).
Now, if you remember - to flash your boards remotely we need a USB dongle. Up until now I used atmega8-based usb dongles with nRF24L01. Those were good, but alas slow and vusb was the bottleneck. nRF24LU1p is more expensive, but provides the speed with hardware USB and is SMALL. So the idea was to make a firmware for nRF24LU1p to make those a drop-in replacement for my AVR dongles. e.g. librf24pp should not even care, whether the thing you plugged in is an AVR-based dongle or a nRF24LU1p dongle.
At first I started by adapting nrfprog for my uISP. This is basically the tool I use to flash nrf24lu1p over SPI. You can grab the sources here. Not really documented (yet!) https://github.com/nekromant/nrfprog
Anyways, I was first playing with Nordic's bootloader for those chips and *SURPRISE* ended up rewriting it from scratch. The Nordic-provided usb bootloader can only be started from within the application and can't run the application when host pings it. So I decided to rewrite it from scratch. I made use of HID profile, since HID doesn't need any drivers under windows.
Since my old uisp-bootloader (a lousy fork of BootloadHID with added blows and whistles) that I used on AVR was never meant to work on anything but AVR, I quickly ended up in rewriting a bunch of other older code and it now even works!
As a result My HID bootloader for nRF24LU1p eats up 3K of flash (I'll see if I can optimize it to 2KiB, some stuff can be moved to infopage), supports reading of both flash data and infopage data, writing flash data and (the most needed feature) can start the application when the host tells it to!
Since the usb bootloader will have the same usb API for both AVR dongles and nRF24LU1p I will now ship precompiled fimwares with librf24pp and make the library take care that you are always running a compatible firmware on the dongle.
As of another effort - I gave my nrf24l01 library from antares a spin running inside linux kernel. The kernel driver itself is still VERY buggy proof-of-concept and is in early development, but already provides proper interrupt handling and packet buffering within the kernel. It should be way faster and efficient than those spidev implementations. This is something I'm going to work on when I'm done with nRF24LU1p, so it's not a priority for now.
That's all the news for now, I'll post a new status update when there will be something worth writing about.
Despite this project has started as a bootloader and nothing more, I ended up targeting WAY more than just a bootloader for AVRs and others. In other words, I now ended up with:
- A somewhat usable userspace C++ library (librf24pp) to work with these radios.
- A set of tools based on this library
- AVR and nRF24LU1p dongle firmware and hardware design
- A HID bootloader for avr and nRF24LU1p
- Possibly upcoming linux kernel driver for nRF24L01 connected to spidev (e.g. I've shoved my nrf24l01 in linux kernel once in a hacky way, it works, but submitting it to LKML will need some effort)
And I really want to make it an awesome OpenSource nRF24L01 software stack. However I don't have much time for this project, and only commit stuff when I have time. In other words - HELP WANTED. If you think you can help with anything mentioned above, from documentation to hacking - drop me a note. I'll try to help you get started and of-course add your name to AUTHORS. It would be even greater if you are a windows guy who knows WinAPI, DDK and can help out with windows porting. Despite the fact that I really try hard to keep things more or less portable, I'm not really a windows-guy, so any help with windows port is really appreciated!