trezor / cython-hidapi

:snake: Python wrapper for the HIDAPI
Other
287 stars 110 forks source link

Is it possible to know the HIDAPI version being used #183

Closed Guillaume-RF closed 1 month ago

Guillaume-RF commented 1 month ago

Hi,

I'm running this packing on Ubuntu 20.04 with Python 3.8.10 to talk to an FTDI FT260 device and was facing an issue where a write with a particular report ID was causing my system to hang indefinitely. Reverting to release 0.11.0.post1 solved my issue, perhaps other releases would too, but I haven't tried.

I was curious about what might be the underlying cause of the crash might be. My first thought was that since 0.11.0.post1 uses libusb by default (if I'm not mistaken), that would be the culprit. But after a fresh install, building from source with the appropriate build argument, the issue persists. I'm wondering if perhaps the version of libusb/hidapi that is packaged with prior releases is more to relevant.

prusnak commented 1 month ago

What is the issue exactly? What am I supposed to answer here?

Guillaume-RF commented 1 month ago

The issue: a certain call to device.write() causes an unbuntu 20.04 system to hang indefinitely, with the only method of recovery being pulling the plug.

The relevance to cython-hidapi: release 0.11.0.post1 does not have this issue. But the cause in my mind is related to libusb/hidapi or the Linux kernel.

My question: What version of libusb/hidapi is packaged with the 0.11.0.post1 release. Or how I can tell which version each release uses, to help determine the root cause of the hang.

prusnak commented 1 month ago

Or how I can tell which version each release uses, to help determine the root cause of the hang.

I always stick to the upstream versions, so 0.11.0.whatever of cython-hidapi release uses hidapi 0.11.0