Page 2 of 2

Re: Trouble flashing firmware

Posted: Tue Jun 04, 2013 2:53 pm
by marcus
Did you get the same error on Windows 8? Did you manage to install the driver?

Do you have access to a Windows 7/XP or a Linux machine?

Re: Trouble flashing firmware

Posted: Wed Jun 05, 2013 5:01 am
by koolatron
I accidentally bricked my crazyradio by flashing it with the wrong firmware. So sad!

After a few days of hacking, though, I've created a Bus Pirate script that will program a crazyradio (or any NRF24LU1+ device) over SPI. You can use this as an emergency recovery if you don't have the JTAG dongle that our friends at bitcraze use for their development.

https://github.com/koolatron/buspirate_nrf24lu1p

Couple of caveats:
- Tested only on OS X. Should work on Linux without modification, and Windows with very minor changes to use the windows serial module.
- It's very slow (~5 minutes to flash the entire .bin file). I deemed this acceptable as this script is for emergency recovery only. I can make it faster if necessary.

Prerequisites:
- A Bus Pirate (you should know where to get one of these, if you don't already have one).
- perl and either Device::SerialPort (*nix) or Win32::SerialPort (Windows)
- Some jumper wires to connect the SPI lines on the radio to the ones on the Bus Pirate.

Instructions:
- Solder a 2x5 pin header onto the programming port of the crazyradio. There's an unpopulated footprint already there for you.
- Connect the crazyradio to your Bus Pirate using the table in the script. Also in the readme when I get around to sticking it on github.
- Run the script: perl ./flasher.pl -input ./cradio-0.51.bin -device [serial device]
- Wait till you see lots of hex addresses crawling up your screen. Your device is programming.
- Go make a sandwich or have a beer (or both).

I'll whack together some better instructions at some point...

Re: Trouble flashing firmware

Posted: Sun Jun 09, 2013 9:25 am
by arnaud
Thank you for this script, this is very useful! I will test it right away.

Actually I discovered that writing "0x02 0x78 0x00" at the beginning of the flash is enough to unbrick the Crazyradio (it forces it to jump to the USB bootloader), this could solve the speed issue. To generate this 'jump bootloader' firmware run in a console (on linux and OSX):

Code: Select all

echo -ne "\x02\x78\x00" > jmpBootloader.bin