Client cannot connect to the Crazyflie

Post here to get support
alduinxx
Beginner
Posts: 6
Joined: Wed Jun 16, 2021 2:06 pm

Client cannot connect to the Crazyflie

Post by alduinxx »

Hi. My Cfclient can detect the drone but can't connect with it.

I got a Crazyflie 2.1 a few days ago. I follow the official documentation and a paper (Flying Multiple UAVs Using ROS by Hönig and Ayanian).

I had no problem connecting to the drone at first and tried to fly it with the basic code at the ''Getting started with the STEM drone bundle'' section of the document. However, the drone was floundering on the ground and some propellers started flying. I tried to fix this a few times but failed.

Coming to my main problem, I don't know what I did wrong but now I cannot even connect the drone with the client. The client can detect the drone but when I click the scan, it waits forever with no response.

Here's the status of my LED's: M2 and M3 steady blue light, M4 steady green light, M1 red light blinking 3 times per second. Also one steady green light on the Crazyradio PA.

Please help. Thanks.
kimberly
Bitcraze
Posts: 1050
Joined: Fri Jul 06, 2018 11:13 am

Re: Client cannot connect to the Crazyflie

Post by kimberly »

Hi!

This is indeed strange... does this happen with the flowdeck attached? Are you able to connect to the crazyflie without this deck?

Are you able to perhaps reflash the crazyflie in recovery mode? You can find the instructions for that here.

What you can also do, is to try to connect the crazyflie by USB to the CFclient (just make sure that you have the right udev rules for that too). Then you can double check in 'connect' - 'configure 2.X' if it has the right address.
alduinxx
Beginner
Posts: 6
Joined: Wed Jun 16, 2021 2:06 pm

Re: Client cannot connect to the Crazyflie

Post by alduinxx »

Thank you for your kind answer.

Flowdeck was attached, so after your answer, I try the same thing without it but nothing changed. I plug the USB cable and open the client but again, cannot connect. Finally, I followed the instructions and tried to reflash the Crazyflie but I have got an error on the Cold Boot tab after I click to 'Initiate bootloader cold boot'.
Error : start bootloader() got an unexpected keyword argument cf

I don't know what I am missing but I need to fix this problem in a few days. I entered a contest to use Crazyflie and I need to fly the drone at a basic level in a day or two.

Please help. Thanks.
alduinxx
Beginner
Posts: 6
Joined: Wed Jun 16, 2021 2:06 pm

Re: Client cannot connect to the Crazyflie

Post by alduinxx »

Additionally, I remembered that when I try to use that basic code on the document and had the problem of not being able to fly, I tried to change the code a little bit. I just add velocity values to some commands and delete the other ones (such as circling). I then tried to run the unchanged one. Now, when I run the basic code, it's just stuck at the 'connecting to radio' part. Maybe this can help you to analyze my problem. Thanks again.
kimberly
Bitcraze
Posts: 1050
Joined: Fri Jul 06, 2018 11:13 am

Re: Client cannot connect to the Crazyflie

Post by kimberly »

For the bootloader error you are getting in the cfclient, this is due to a misalignment of the python libraries on the latest master. You need to get the release of the cfclient which is more stable.

Do the following in a terminal:

Code: Select all

pip3 uninstall cflib cfclient
pip3 install cfclient
Try if you can do the recovery bootloading again.
alduinxx
Beginner
Posts: 6
Joined: Wed Jun 16, 2021 2:06 pm

Re: Client cannot connect to the Crazyflie

Post by alduinxx »

Yes, it worked for that part! I am now able to initiate bootloader cold boot and program the Crazyflie but then 'Restart in firmware mode' option is unclickable. So, I restart the drone in bootloader mode one more time and then click initiate bootloader cold boot. Now Restart in firmware mode is clickable.

I clicked that, Crazyflie restarts itself (2 steady blue light + red light blinking 3 times per sec) and there is "Status: Not connected" on the Cold Boot tab. Am I doing well so far?

Now, the client can't scan the drone. I restart the client, it can scan it now but still can't connect. What should I do now? Thanks a lot.
kimberly
Bitcraze
Posts: 1050
Joined: Fri Jul 06, 2018 11:13 am

Re: Client cannot connect to the Crazyflie

Post by kimberly »

great!

Now you have to carefully follow the instructions I given earlier for the recovery flashing mode. The part that you missed from the instructions is that the crazyflie needs to be in bootloader mode, for which you have to press the button for 3 seconds until the blue LED M2 starts blinking.
alduinxx
Beginner
Posts: 6
Joined: Wed Jun 16, 2021 2:06 pm

Re: Client cannot connect to the Crazyflie

Post by alduinxx »

First of all, thank you for helping me in such a kind way.

I tried many times but the problem still persists. Maybe I didn't explain myself fully. Following the instructions you mentioned, I came to the cold boot (recovery) tab with the drone turned off. I turn on the Crazyflie in bootloader mod and started the "Initiate bootloader cold boot" option. There are two things I can do at this point

-- I can select and install the latest firmware version (notice that I already did).

-- or I can click the "restart in firmware mode" option (this option is not clickable if I do the first option).

No matter which option I choose the Crazyflie has a steady blue light on M2. The instructions that you gave finish at this point. What should I do? Thanks.
kimberly
Bitcraze
Posts: 1050
Joined: Fri Jul 06, 2018 11:13 am

Re: Client cannot connect to the Crazyflie

Post by kimberly »

ah sorry, i think the misunderstanding was from my part!

The steps that you describe seems to be correct. If you flash the crazyflie in coldboot, and it restarts, you can not click the restart in firmware mode because the crazyflie is no longer connected to the crazyflie.

The post before last one, you mentioned this:
I clicked that, Crazyflie restarts itself (2 steady blue light + red light blinking 3 times per sec)
So I'm not exactly sure in which state you are in now, so here are the suggestion of those assumptions (let us know which applies to you)

1- These LEDS you were describing now, that is normal behavior. However, if you are seeing only the M2 steady LED, that is a problem. If this state is not fixable with the coldboot flashing, then let us know.

2- If the LEDS are still showing the normal behavior, then you can try to connect your crazyflie with a micro usb kabel as I mentioned a few posts ago. Have you tried that yet?
alduinxx
Beginner
Posts: 6
Joined: Wed Jun 16, 2021 2:06 pm

Re: Client cannot connect to the Crazyflie

Post by alduinxx »

Hello Kimberly. Sorry for the huge delay. I had too many exams last week so I couldn't answer.

Yes, LEDs are normal, no I can't connect the drone with a USB. Same thing happening when I try to connect it, its just waits forever.

But, I notice something. In the console tab of the client, there is a fail: IMU: BMP388 I2C connection [FAIL]. Note that this happens without a flow deck. I found this: viewtopic.php?f=5&t=3218&p=15667#p15667. I have the flow deck v2. Can this be my problem?

However, I could not understand the fixing steps. Btw, I need to find the problem in 2 days due to the deadline.

Also, I know that before my connection problem, there was an error in the horizontal axis. And I don't know if it's related but Crazyflie is hot while it's open
Thanks.
Post Reply