libusb0-dll:err error with Crazyradio

Firmware/software/electronics/mechanics
Post Reply
jayanthyk192
Beginner
Posts: 2
Joined: Mon Sep 16, 2019 12:48 pm

libusb0-dll:err error with Crazyradio

Post by jayanthyk192 »

Hi all,

I'm having some issues with using the Crazyradio.

I have a crazyflie 2.0. I need to transfer some data between the PC and the drone using the wireless Crazyradio link. I was able to run the transmit example from this link:
https://www.bitcraze.io/docs/crazyflie ... adio_lib/

But I'm unable to run the ptx.p and prx.py from the crazyflie-firmware:

https://github.com/bitcraze/crazyradio- ... r/examples
I get this error:

Code: Select all

Traceback (most recent call last):
  File "C:\Users\jyelandu\Desktop\crazyradio-firmware-master\crazyradio-firmware-master\examples\prx.py", line 8, in <module>
    radio.set_mode(Crazyradio.MODE_PRX)
  File "../lib\crazyradio.py", line 221, in set_mode
    _send_vendor_setup(self.handle, SET_MODE, mode, 0, ())
  File "../lib\crazyradio.py", line 309, in _send_vendor_setup
    wIndex=index, timeout=1000, data_or_wLength=data)
  File "C:\Users\jyelandu\AppData\Roaming\Python\Python37\site-packages\usb\core.py", line 702, in ctrl_transfer
    self.__get_timeout(timeout)
  File "C:\Users\jyelandu\AppData\Roaming\Python\Python37\site-packages\usb\backend\libusb0.py", line 526, in ctrl_transfer
    timeout
  File "C:\Users\jyelandu\AppData\Roaming\Python\Python37\site-packages\usb\backend\libusb0.py", line 387, in _check
    raise USBError(errmsg, ret)
usb.core.USBError: [Errno None] b'libusb0-dll:err [control_msg] sending control message failed, win error: A device attached to the system is not functioning.\r\n\n'

I'm actually working with a PX4 stack and not the Crazyflie stack, but regardless of the state of the drone(On/Off). I get the above error. My requirement is is to use the crazyradio as a wireless COMPort. I also tried using the libusbK drivers, but got the same error. Please help me out.

The radio interface works well with the Crazyflie client though.
Here's some info.
OS: windows 10
Crazyflie 2.0
Crazyradio PA

Please help me out with the issue...Thank you!
arnaud
Bitcraze
Posts: 2538
Joined: Tue Feb 06, 2007 12:36 pm

Re: libusb0-dll:err error with Crazyradio

Post by arnaud »

These scripts needs a firmware more recent than the one shipped in Crazyradio. To use these scripts, you need to compile and flash the firmware from the Crazyradio firmware repos: https://github.com/bitcraze/crazyradio- ... e-firmware
jayanthyk192
Beginner
Posts: 2
Joined: Mon Sep 16, 2019 12:48 pm

Re: libusb0-dll:err error with Crazyradio

Post by jayanthyk192 »

Hi arnaud,

It partly worked! Thank you for the quick help.
On the Crazyflie, I was continuously sending data to the wireless by opening the serial port(I'm running PX4). But I wasn't able to receive anything using the prx.py. This was printing 'None'. THen I ran the ptx.py. During this I was able to get the data from the drone! Why is this happening? Also whatever data I sent during the ptx.py was not received on the drone. I set the baud to 1000000. Please help...


Thanks,
Jayanth
Post Reply