Send HID report with PyUSB

后端 未结 2 2012
醉话见心
醉话见心 2021-01-06 12:25

UPDATE


I managed to send the data properly. For anyone who ran into the same problem, I used the following code:

data=[0x00, 0x04, 0x04,          


        
2条回答
  •  無奈伤痛
    2021-01-06 12:47

    Don't use PyUSB (unless you need other protocols too). Managing HID isn't difficult, but there is a much easier solution.

    HIDAPI is a C-library which manages the protocol, and there is a Python wrapper available too.

    Also, it hides the necessity to take control back from the operating system, which recognizes the HID protocol on connection, and install its own driver.

提交回复
热议问题