Page 1 of 1

Too many packets lost

Posted: Tue May 12, 2020 7:36 pm
by Ersijo

I am new to the crazyflie and I am currently trying to connect it to the lighthouse. To do this I've been following this guide: ... _overview/

However, I haven't managed to get the base station position using When I run the script it says "connecting to radio://0/80/2M" for about 20 min. Then the CF starts blinking, alternating between the lighthouse deck LED and the green LEDs. In cmd the following text is displayed:
Connecting to radio://0/80/2M
Connection to radio://0/80/2M failed: Too many packets lost
Traceback (most recent call last):
File "D:\Studa\Thesis\crazyflie-firmware-master\tools\lighthouse\get_bs_geomet", line 333, in <module>
with SyncCrazyflie(uri, cf=cf) as scf:
File "C:\Users\Simon\AppData\Local\Programs\Python\Python38-32\lib\site-packag
es\cflib\crazyflie\", line 67, in __enter__
File "C:\Users\Simon\AppData\Local\Programs\Python\Python38-32\lib\site-packag
es\cflib\crazyflie\", line 64, in open_link
raise Exception(self._error_message)
Exception: Too many packets lost

Many thanks in advance!

Re: Too many packets lost

Posted: Wed May 13, 2020 8:25 am
by kristoffer

"Too many packets lost" means that the script could not connect to the Crazyflie. Most likely your crazyflie is on a different channel.
The script uses the uri radio://0/80/2M as a default, and if your Crazyfle is configured to use another channel you have to pass that to the script

For instance something like this for a CF on channel 30/2M:

Code: Select all

./tools/lighthouse/ --uri radio://0/30/2M
You can read about how to configure the channel in the Crazyflie ... figuration

Re: Too many packets lost

Posted: Wed May 13, 2020 4:15 pm
by Ersijo
Thank you for the quick answer. I've made sure that the channel is the same as the one I can connect to in the CF client. I've realized the "too many packets lost" error came as a result of the CF turning itself off. If I run the script as the CF is connected to the client, the cmd gets locked in "connecting to radio...". If I run the script when the CF is turned on but not connecting, it says that "lighthouse.angle0x_1 is not in TOC". What does this mean?

Re: Too many packets lost

Posted: Thu May 14, 2020 11:03 am
by kimberly
  • You are not supposed to be able to connect to the crazyflie while its connecting to the cfclient by USB
  • The fact that you do not have that log in the toc, means that the lighthouse driver is not initialized as it was explained in the documentation. Especially the part where it says that you have to put

    Code: Select all

The latter you can check, since the lighthouse deck should have a blue led on only after a few seconds (other LEDS are one after a while if the lighthousedriver is not correctly flashed).