Page 1 of 1

Can I update the Crazyflie firmware from Raspberry Pi?

Posted: Mon Feb 24, 2014 4:27 am
by Mike6158
Is there a way to update firmaware for the crazyflie and crazyradio from a Raspberry Pi?

My very first application with the RPI was for the Crazyflie. I got it to work about 30 minutes ago (total time spent was nearly 2 days. This was a good way to learn RPI that's for sure). The final key to success was logging in as crazyflie and not pi. Once I did that the radio started working and life was good.

I have a Mac that I can use to update firmware or a the Raspberry Pi. Will either of those work?

Re: Can I update the Crazyflie firmware from Raspberry Pi?

Posted: Tue Feb 25, 2014 10:48 am
by doddz
Yes you can update the firmware via Mac and I can't see why the Pi shouldn't either by using the cfclient bootloader.

For a minimal amount of setup you can install VirtualBox on your Mac and use the CrazyFlie Virtual Machine. Inside the virtual machine a lot of the software has been already configured, you just really need to ensure that VirtualBox passes control over your CrazyRadio and controller devices to the virtual machine.

Re: Can I update the Crazyflie firmware from Raspberry Pi?

Posted: Tue Feb 25, 2014 7:45 pm
by Mike6158
Thanks for replying. I've spent the better part of the day installing VirtualBox. I've been on the Mac platform since 09 but it's all been Mac software only. I've used the Terminal program more in the last week than I have in the entire time that I've had my Mac's. I haven't dealt with command line instructions since the late 80's and DOS 1.0. So... I've got it loaded. The .ova file is downloading. But when it's through I have no idea what to do with it.

XUbuntu wasn't an option in Virtual Box. Seems like a lot of trouble to go to just to flash a little program to a microcontroller...

Re: Can I update the Crazyflie firmware from Raspberry Pi?

Posted: Tue Mar 04, 2014 7:11 am
by marcus
Hi,

Sure, you can upgrade the Crazyflie and Crazyradio firmware from the Raspberry Pi image. We are working on an updated version of the image (0.3) now, and these are the updated instructions that will be in there. Just switch out crazyflie-clients-python for crazyflie-pc-client and it should work.

Flashing the Crazyradio
The Crazyradio firmware can be updated using the Raspberry Pi and doing the following steps:
* Connect the Raspberry Pi to your local network
* Power it on and SSH to it (user=bitcraze and password=crazyflie)
* Make sure that no controller is connected
* Insert the Crazyradio into a USB port on the Raspberry Pi
* Go into the crazyradio-firmware directory and download a firmware update

Code: Select all

cd projects/crazyradio-firmware
wget https://bitbucket.org/bitcraze/crazyradio-firmware/downloads/cradio-0.52.bin
* Launch the Crazyradio bootloader and flash the firmware

Code: Select all

python usbtools/launchBootloader.py
python usbtools/nrfbootload.py flash cradio-0.52.bin
* Make sure that the flashing is successful, otherwise retry again!
* Unplug the Crazyradio and re-insert it again. It's now running the new firmware.

Flashing the Crazyflie
The Crazyflie firmware can be updated using the Raspberry Pi and doing the following steps:
* Connect the Raspberry Pi to your local network
* Power it on and SSH to it (user=bitcraze and password=crazyflie)
* Make sure that no controller is connected
* Insert the Crazyradio into a USB port on the Raspberry Pi
* Go into the crazyflie-clients-python directory and download a firmware update

Code: Select all

cd projects/crazyflie-clients-python
wget https://bitbucket.org/bitcraze/crazyflie-firmware/downloads/Crazyflie_2014.01.0.bin
* Power off the Crazyflie and launch the bootloader

Code: Select all

bin/cfloader flash Crazyflie_2014.01.0.bin
* Power on the Crazyflie within 10s and wait while the firmware is flashing
* The Crazyflie will automatically resetart and run the new firmware once the flashing is done

Re: Can I update the Crazyflie firmware from Raspberry Pi?

Posted: Tue Mar 04, 2014 9:48 pm
by Mike6158
Thanks Marcus. I've really been enjoying the Crazyflie but being able to make it more portable is going to make it that much more fun