Page 1 of 1

USB3.0 Compatibility in VMWARE

Posted: Wed Nov 27, 2019 2:51 am
by leonana69
I found that if I set the usb compatibility of the vmware to usb 3.0 (for a ubuntu 18.04), the process for close link will too slow (~20 seconds) compared to the usb2.0 compability (~3 seconds). After tracing the execution of the crazyflie-lib-python, I found it is the close() function for class Crazyradio that takes so long. The self.dev.reset() will take tens of seconds to return. I want to know how to solve this problem. :)

Re: USB3.0 Compatibility in VMWARE

Posted: Wed Nov 27, 2019 8:26 am
by arnaud
You can try to remove the div.reset() call. It was mostly done as a precaution and should not be required.

Re: USB3.0 Compatibility in VMWARE

Posted: Wed Nov 27, 2019 5:50 pm
by leonana69
arnaud wrote: Wed Nov 27, 2019 8:26 am You can try to remove the div.reset() call. It was mostly done as a precaution and should not be required.
It doesn't works, if I remove the reset(), the scripts like scan.py or ramp.py will work but I can't flash the firmware. During the flash, it shows the "usb.core ... Resource busy". But I finally find the solution: replace the

Code: Select all

self.dev.reset()
by

Code: Select all

usb.util.dispose_resources(self.dev)
, now it works.

Re: USB3.0 Compatibility in VMWARE

Posted: Thu Nov 28, 2019 9:51 am
by arnaud
That sounds great, thanks for writing back the solution!

I am creating an issue in the lib's github project (https://github.com/bitcraze/crazyflie-l ... issues/130) . If you want to do a pull-request please do! Otherwise, when I have time to look at it I can test and change it myself.