Connection problem after flashing the firmware

Post here to get support
Post Reply
kihdo
Beginner
Posts: 4
Joined: Wed Feb 20, 2013 8:55 pm

Connection problem after flashing the firmware

Post by kihdo »

I've just tried to update crazyflie firmware ( https://bitbucket.org/bitcraze/crazyfli ... 2013.4.bin):
1. Checked "Verify flashing", clicked "program" button (near the "verify button") and got the error "Verification failed"
2. Clicked "Program" button under the "Configuration block" and noticed the status something like "Writting firmware. done"
3. Repeated steps 1 and 2.
4. Clicked "Restart in firmware mode" and it hasn't come back.
Now when powering on green and red leds blink and go out, blue led lights ok. Can not connect neither with pc client nor with bootloader.
Previously everything worked well.

System info:
ubuntu 13.04
python 2.7
Cfclient 2013.4.2

Here is some debug info from the console at the moment, when problem appeared:
INFO:cflib.crazyflie:Callback->Disconnected from [radio://0/10/250K]
INFO:cfclient.ui.dialogs.bootloader:Connected in coldboot mode failed
INFO:root:Bootloader set to radio address [188, 51, 177, 9, 138]
INFO:cfclient.ui.dialogs.bootloader:Connected in coldboot mode ok
INFO:cfclient.ui.dialogs.bootloader:Flashing file [/home/bob/projects/cfclient-2013.4.2/cflie-2013.4.bin]
INFO:cfclient.ui.dialogs.bootloader:Flashing file [/home/bob/projects/cfclient-2013.4.2/cflie-2013.4.bin]
INFO:cfclient.ui.dialogs.bootloader:Connected in coldboot mode failed
INFO:cfclient.ui.dialogs.bootloader:Connected in coldboot mode failed
INFO:cflib.crazyflie:Callback->Connection initialized[radio://0/10/250K]
INFO:cflib.crazyflie:We are connected[radio://0/10/250K], request connection setup
WARNING:cflib.crazyflie:ExpectAnswer: ERROR! Older timer whas running while scheduling new one on [5]
WARNING:cflib.crazyflie:Got link error callback [Too many packets lost] in state [1]
INFO:cflib.crazyflie:Callback->Connected failed to [radio://0/10/250K]: Too many packets lost

Could anyone help please?
tobias
Bitcraze
Posts: 2339
Joined: Mon Jan 28, 2013 7:17 pm
Location: Sweden

Re: Connection problem after flashing the firmware

Post by tobias »

It is not possible to overwrite the bootloader so you should be able to flash it again. It seams there is a corrupt FW in the crazyflie that's why the leds go out.
Can you try:
* Restart the cf-client. Sometimes it seem to help.
* Make sure to run the Crazyflie from the battery when you power it up and connect to the bootloader.
kihdo
Beginner
Posts: 4
Joined: Wed Feb 20, 2013 8:55 pm

Re: Connection problem after flashing the firmware

Post by kihdo »

Hi. Thank for the reply.
I've tried restarting cf-client, unplugged/plugged crazyradio, even rebooted my laptop, but it didn't help.
Am I correct that bootloader can flash the FW over the radio crazyradio only?
It doesn't allow me to connect to the device via the cable and says "dongle could not be found".

One more question. Green led indicates the connection.
If firmware is broken and it doesn't lights, should it be possible to connect to the quadcopter via:
1. crazyradio;
2. usb cable?
tobias
Bitcraze
Posts: 2339
Joined: Mon Jan 28, 2013 7:17 pm
Location: Sweden

Re: Connection problem after flashing the firmware

Post by tobias »

It is possible to flash it with a JTAG dongle but that is the only "wired" flashing supported now and I guess you don't have one?
Can you try to connect to the bootloader again and print the output from the command prompt here?
marcus
Bitcraze
Posts: 659
Joined: Mon Jan 28, 2013 7:02 pm
Location: Sweden
Contact:

Re: Connection problem after flashing the firmware

Post by marcus »

Hi,

Could you try to upgrade the firmware again using the bootloader, but this time don't enable the Verify option. Does the flashing complete? Do you get any errors?

/Marcus
kihdo
Beginner
Posts: 4
Joined: Wed Feb 20, 2013 8:55 pm

Re: Connection problem after flashing the firmware

Post by kihdo »

tobias> It is possible to flash it with a JTAG dongle but that is the only "wired" flashing supported now and I guess you don't have one?
right, I don't have one, but it looks like it is the only option if I'm not able to connect via radio (getting connection timeout error) :(
tobias> Can you try to connect to the bootloader again and print the output from the command prompt here?
yep, will do that later today. Now I'm not near the cf.
marcus> Could you try to upgrade the firmware again using the bootloader, but this time don't enable the Verify option. Does the flashing complete? Do you get any errors?
As soon as I'm able to connect to the cf I'll do that, but now I'm not able.
tobias
Bitcraze
Posts: 2339
Joined: Mon Jan 28, 2013 7:17 pm
Location: Sweden

Re: Connection problem after flashing the firmware

Post by tobias »

right, I don't have one, but it looks like it is the only option if I'm not able to connect via radio (getting connection timeout error) :(
Well it shouldn't be possible to break the bootloader so let's try to solve that first. It could be some HW problem but let's assume there isn't right now.
marcus
Bitcraze
Posts: 659
Joined: Mon Jan 28, 2013 7:02 pm
Location: Sweden
Contact:

Re: Connection problem after flashing the firmware

Post by marcus »

kihdo wrote:Now when powering on green and red leds blink and go out, blue led lights ok. Can not connect neither with pc client nor with bootloader.
Previously everything worked well.
The blinking of the red/green LEDs is the bootloader.

Could you try this?
1. Un-plut and insert the Crazyradio again
2. Power off the Crazyflie
3. Start the cfclient
4. Take up the bootloader dialog and initate the coldboot
5. Power on the Crazyflie (not using USB, only battery) within 1-5 seconds after initiating the bootloader
6. Flash new firmware without the Verify option enabled

If this doesn't succeed then cut and paste the text from the terminal here.

/Marcus
kihdo
Beginner
Posts: 4
Joined: Wed Feb 20, 2013 8:55 pm

Re: Connection problem after flashing the firmware

Post by kihdo »

Thanks guys for you asistance. Really appreciate it.
Everything now works. Marcus actually gave proper instructions.
The most important moment is to wait up to 5 seconds after initiating the bootloader.
Recently I've found topic with probably the same problem http://forum.bitcraze.se/viewtopic.php?f=5&t=183, so yes,
wrong led signals mean problem with the FW and I've tried to flash https://bitbucket.org/bitcraze/crazyfli ... 2013.4.bin several times and
it definitely causes this issue and quadcopter didn't work. https://bitbucket.org/bitcraze/crazyfli ... tionV2.bin works pretty well.
marcus
Bitcraze
Posts: 659
Joined: Mon Jan 28, 2013 7:02 pm
Location: Sweden
Contact:

Re: Connection problem after flashing the firmware

Post by marcus »

Glad to hear that it's working again. The 2013.4 firmware should work, what error are you getting? The different LED clinks are documented here.
Post Reply