Bus Pirate script to recover bricked radio
Posted: Wed Jun 05, 2013 5:09 am
Hi guys,
I posted about this over at http://forum.bitcraze.se/viewtopic.php? ... t=10#p2010, but figured I'd make a topic just for this in case there's anyone in need who's missed it. I've knocked together a perl script to reflash a busted crazyradio over SPI using a Bus Pirate. This saved me from a firmware upgrade gone bad.
I'll put together some more coherent documentation in a bit, but at the moment I have a crazyflie to pilot...
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 posted about this over at http://forum.bitcraze.se/viewtopic.php? ... t=10#p2010, but figured I'd make a topic just for this in case there's anyone in need who's missed it. I've knocked together a perl script to reflash a busted crazyradio over SPI using a Bus Pirate. This saved me from a firmware upgrade gone bad.
I'll put together some more coherent documentation in a bit, but at the moment I have a crazyflie to pilot...
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).