[SOLVED] Cannot find a Crazyradio Dongle
Posted: Fri Mar 11, 2016 9:29 pm
Hi!
I got a new laptop so I copied all my crazyflie projects from my old system (Ubuntu 14.10) to my new system (Ubuntu 15.10). I managed that everything is working but the crazyradio to update the firmware on the crazyflie.
I'm using the libcflie library. This library works and I'm able to access the radio dongle and I'm able to connect to the crazyflie. But libcflie does not contain a bootloader. So I still have the python-client. On my old system everything worked but now I get (almost every time) the error "Cannot find a Crazyradio Dongle" when I want to flash a new firmware to the crazyflie. Two times the error didn't occur and it seemed like the program was waiting for me to start the crazyflie. Then I started the crazyflie but nothing happend (well, the crazyflie was on...)
That's what I found out (btw: when I started with my work there was no crazyflie 2.0. so all my code is from before)
in crazyflie-clients-python / bin / cfloader:
in crazyflie-clients-python / lib / cflib / crtp / __init__.py:
So according to my "debug-outputs" the error occurs in instance.connect I think!? Do you know how I can fix this? Do I miss any packages? I've already installed python-usb for example.
I got a new laptop so I copied all my crazyflie projects from my old system (Ubuntu 14.10) to my new system (Ubuntu 15.10). I managed that everything is working but the crazyradio to update the firmware on the crazyflie.
I'm using the libcflie library. This library works and I'm able to access the radio dongle and I'm able to connect to the crazyflie. But libcflie does not contain a bootloader. So I still have the python-client. On my old system everything worked but now I get (almost every time) the error "Cannot find a Crazyradio Dongle" when I want to flash a new firmware to the crazyflie. Two times the error didn't occur and it seemed like the program was waiting for me to start the crazyflie. Then I started the crazyflie but nothing happend (well, the crazyflie was on...)
That's what I found out (btw: when I started with my work there was no crazyflie 2.0. so all my code is from before)
in crazyflie-clients-python / bin / cfloader:
Code: Select all
try:
cflib.crtp.init_drivers() #seems to work
link = cflib.crtp.get_link_driver("radio://0") #raises the exception
except Exception as e:
print "Error: {}".format(str(e)) # gets printed
if link:
link.close()
sys.exit(-1)
in crazyflie-clients-python / lib / cflib / crtp / __init__.py:
Code: Select all
def get_link_driver(uri, link_quality_callback=None, link_error_callback=None):
"""Return the link driver for the given URI. Returns None if no driver
was found for the URI or the URI was not well formatted for the matching
driver."""
for instance in INSTANCES:
print instance # output is: <cflib.crtp.radiodriver.RadioDriver instance at 0x{"random" number}>
try:
print "No. 1" # gets printed
instance.connect(uri, link_quality_callback, link_error_callback)
print "No. 2" # does not get printed
return instance
except WrongUriType:
print "No. 3" # does not get printed
continue
print "No. 4" # does not get printed
return None