Page 1 of 1

Too many packets lost

Posted: Fri Sep 04, 2020 11:03 am
by cgpenguin
Today when I tried to run get_bs_geometry.py script for LH tracking I got the following error:

Code: Select all

Connecting to radio://00/08/2M
Connection to radio://00/08/2M failed: Too many packets lost
Traceback (most recent call last):
  File "tools/lighthouse/get_bs_geometry.py", line 333, in <module>
    with SyncCrazyflie(uri, cf=cf) as scf:
  File "/home/bitcraze/.local/lib/python3.6/site-packages/cflib/crazyflie/syncCrazyflie.py", line 72, in __enter__
    self.open_link()
  File "/home/bitcraze/.local/lib/python3.6/site-packages/cflib/crazyflie/syncCrazyflie.py", line 69, in open_link
    raise Exception(self._error_message)
Exception: Too many packets lost
It used to work fine. Drone is within a relatively close range to the radio. Any ideas what could cause this?

Re: Too many packets lost

Posted: Mon Sep 07, 2020 6:09 am
by arnaud
The likely cause is that you are not using the same channel in the Crazyflie configuration and in the script. Your address "radio://00/08/2M" looks a bit suspicious (the channel 08 with a leading 0), maybe you meant to use "radio://00/80/2M (channel 80)?

Otherwise, the way to check the Crazyflie radio configuration when you do not know it, is to connect to your Crazyflie using a USB cable to the Crazyflie client and check/configure the radio configuration in the menu "connection/configure 2.x".

Re: Too many packets lost

Posted: Mon Sep 07, 2020 12:11 pm
by cgpenguin
You are right. I had made that typo. What confused me in this is the series of events.

I had made a typo writing

Code: Select all

radio://80/00/2M
which returned that no radio is found. So I realized the error and moved the 80 to the other side, but must have made the typo. However, since the error I got now was different I thought the cause of it must have been different. I am guessing this is because the first segment indicates which radio device to use and second is for the channel of that device?

Re: Too many packets lost

Posted: Mon Sep 07, 2020 1:31 pm
by arnaud
Yes this is right. The format is radio://<radio_dongle_id>/<channel>/<datarate>[/<address>]. radio_dongle_id allows to use more than one radio on the same system to get more bandwidth. For example radio://1/42/2M would open a link on channel 42, 2Mbit/s using a second radio.

Re: Too many packets lost

Posted: Mon Sep 07, 2020 1:57 pm
by cgpenguin
Ah, thanks, it makes much more sense now.