-
The read() and write() function of pyusb breaks large data into usb IN and OUT packets behind the scene. But for my application, I would like to have more explicit control. I want to read one packet of unknown length, and get how long the packet was after the trasfer (a.k.a. in the spririt of libusb_bulk_transfer() in libusb1). I see bulk_read() in libusb1 backend, but it is undocumented and I could not get it to work (I got 'Device' object has no attribute 'handle'). What is the proper way to do this? Thanks for the help! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Probably pyusb/libusb are not the right library for you. You may want to take a look at platform specific things, like what Wireshark is doing. Linux: usbmon |
Beta Was this translation helpful? Give feedback.
Probably pyusb/libusb are not the right library for you. You may want to take a look at platform specific things, like what Wireshark is doing.
Linux: usbmon
https://docs.kernel.org/usb/usbmon.html