Failed to scan and flash the Crazyflie 2.0

Firmware/software/electronics/mechanics
Post Reply
twh
Beginner
Posts: 21
Joined: Tue Dec 06, 2016 7:34 am

Failed to scan and flash the Crazyflie 2.0

Post by twh »

Hi all,

I just bought and received the Crazyradio PA.

I followed the instruction given in the https://www.bitcraze.io/getting-started ... velopment/ to flash the firmware. However, when I selected "flash using radio" under crazyflie-firmware, it showed the following message in the console. At the same time, the red LED from the Crazyradio PA lit for a few seconds. May I know whether I have missed any important steps?

make cload
python3 -m cfloader flash cf2.bin stm32-fw
Restart the Crazyflie you want to bootload in the next
10 seconds ...
Cannot connect the bootloader!
make: *** [cload] Error 255


Another case is about PC client.
I was trying to scan for Crazyflie 2.0 using the scan button. but it seemed like it failed to locate the Crazyflie. the following message were from the console

(python3:24333): Gtk-CRITICAL **: IA__gtk_widget_get_direction: assertion 'GTK_IS_WIDGET (widget)' failed

(python3:24333): Gtk-CRITICAL **: IA__gtk_widget_get_direction: assertion 'GTK_IS_WIDGET (widget)' failed
INFO:cflib.drivers.cfusb:Looking for devices....
INFO:cflib.crtp.radiodriver:v0.51 dongle with serial N/A found
INFO:cflib.drivers.cfusb:Looking for devices....

(python3:24333): Gtk-CRITICAL **: IA__gtk_widget_get_direction: assertion 'GTK_IS_WIDGET (widget)' failed

(python3:24333): Gtk-CRITICAL **: IA__gtk_widget_get_direction: assertion 'GTK_IS_WIDGET (widget)' failed
INFO:cflib.crtp.radiodriver:v0.51 dongle with serial N/A found
INFO:cflib.drivers.cfusb:Looking for devices....

Could anyone help me on this issue? Did I miss any important step while flashing and scanning the Crazyflie.

Thank you :)
twh
Beginner
Posts: 21
Joined: Tue Dec 06, 2016 7:34 am

Re: Failed to scan and flash the Crazyflie 2.0

Post by twh »

What I have bought is RioRand Crazyradio 2.4GHz nRF24LU1+ USB radio dongle with antenna for Crazyflie Nano Quadcopter Aircraft Helicopter Parrot AR Drone.
arnaud
Bitcraze
Posts: 2538
Joined: Tue Feb 06, 2007 12:36 pm

Re: Failed to scan and flash the Crazyflie 2.0

Post by arnaud »

Hi,

What you brought is copy of Crazyradio so we cannot guarantee that it works properly.

Though from the log, the behavior seems correct. Is you Crazyflie started in bootloader mode when you try to 'make cload'? If so the two blue LEDs should blink.

/Arnaud
twh
Beginner
Posts: 21
Joined: Tue Dec 06, 2016 7:34 am

Re: Failed to scan and flash the Crazyflie 2.0

Post by twh »

Yes. both of the blue LED blinks.

the background is that
I flash the firmware by using the eclipse from the VM provided. It shows the same message as above. Do I need to install any USB driver or dependencies for the VM or Windows/Mac (As I tried to use the VM installed in both Windows and Mac.. and still cant flash it)?

The Crazyflie itself seems working by just using the smartphone w/ ble. I am not sure whether which part went wrong, could you provide me with some guidelines to troubleshoot?
arnaud
Bitcraze
Posts: 2538
Joined: Tue Feb 06, 2007 12:36 pm

Re: Failed to scan and flash the Crazyflie 2.0

Post by arnaud »

Hi,

On windows you can try installing the windows driver: https://wiki.bitcraze.io/doc:crazyradio ... dows_zadig. On mac nothing is needed.

If you have an Android smartphone you can try to fly using an OTG cable to connect your Crazyradio to the phone, this will allow to test if the radio is working at all.
twh
Beginner
Posts: 21
Joined: Tue Dec 06, 2016 7:34 am

Re: Failed to scan and flash the Crazyflie 2.0

Post by twh »

Hi,

I tried to connect to the Crazyflie 2.0 using android phone w/crazyradio + otg cable. It shows a message which is "too many packets lost". I also tried to flash the firmware from the app and a message " no Crazyflie is found" printed on the console.
But I am still able to connect the Crazyflie 2.0 using the BLE.

I also flash it with the latest v0.53 firmware... It is still not working. Is it because the crazyradio is not working or something else? If it is because of the Crazyradio, may I know if there is any other way to flash the firmware without the crazyradio?
arnaud
Bitcraze
Posts: 2538
Joined: Tue Feb 06, 2007 12:36 pm

Re: Failed to scan and flash the Crazyflie 2.0

Post by arnaud »

It would look like the radio has a problem, it may help to have the Crazyflie very close to the radio (in case it is a problem with the radio traces on the PCB).

The bootloader works with BLE but so far we only have an implementation for iOS, there is no implementation of the BLE bootloader for Android yet. Similarly it should be technically possible to bootload with BLE from a PC but there is no implementation for it.
twh
Beginner
Posts: 21
Joined: Tue Dec 06, 2016 7:34 am

Re: Failed to scan and flash the Crazyflie 2.0

Post by twh »

It seems that I still couldn't flash the firmware using Crazyradio. Does it have any diagnostic tool to check which part went wrong?

Based on your method, I am able to flash it using iOS app, but it is still the default build and I couldn't use my own one to flash it. Is there any other way to flash it using my own build for firmware development? I saw a wiki page which mentions about [DFU update of the STM32F405]. Is it the same way as flashing using Crazyradio?

Thank you. :)
arnaud
Bitcraze
Posts: 2538
Joined: Tue Feb 06, 2007 12:36 pm

Re: Failed to scan and flash the Crazyflie 2.0

Post by arnaud »

DFU and SWD are the two other way to program the Crazyflie.

DFU only requires USB and works fine (just type "make flash_dfu"), however it is designed as a last ressort method and is not so practical to use.

It seems that the problem comes from your Crazyradio not working. If you have radio debug tools like rf-explorer there is ways to debug it but it is uncertain if it is fixable at all.
twh
Beginner
Posts: 21
Joined: Tue Dec 06, 2016 7:34 am

Re: Failed to scan and flash the Crazyflie 2.0

Post by twh »

arnaud wrote:DFU and SWD are the two other way to program the Crazyflie.

DFU only requires USB and works fine (just type "make flash_dfu"), however it is designed as a last ressort method and is not so practical to use.

It seems that the problem comes from your Crazyradio not working. If you have radio debug tools like rf-explorer there is ways to debug it but it is uncertain if it is fixable at all.
Hi,

We have placed a new order for Crazyradio PA. Hopefully it will resolve the issue.

Thanks for your help. :)
Post Reply