Too many packets lost

Post here to get support
Post Reply
cgpenguin
Member
Posts: 35
Joined: Wed Aug 05, 2020 3:49 pm

Too many packets lost

Post 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?
arnaud
Bitcraze
Posts: 2538
Joined: Tue Feb 06, 2007 12:36 pm

Re: Too many packets lost

Post 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".
cgpenguin
Member
Posts: 35
Joined: Wed Aug 05, 2020 3:49 pm

Re: Too many packets lost

Post 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?
arnaud
Bitcraze
Posts: 2538
Joined: Tue Feb 06, 2007 12:36 pm

Re: Too many packets lost

Post 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.
cgpenguin
Member
Posts: 35
Joined: Wed Aug 05, 2020 3:49 pm

Re: Too many packets lost

Post by cgpenguin »

Ah, thanks, it makes much more sense now.
Post Reply