Using Android to Communicate with a USB HID Device

前端 未结 3 843
长情又很酷
长情又很酷 2020-12-08 08:19

I am new to USB and to Android so please forgive me if I don\'t explain myself clearly.

I have a USB HID device that I can communicate with in Windows. I am trying

3条回答
  •  无人及你
    2020-12-08 09:26

    So, I have been researching similar things. I cannot confirm, but what I believe is happening is:

    1. Android does not list the control endpoint when it enumerates it's endpoints. It only lists other endpoints.
    2. A connection to any endpoint can send control transfers to endpoint 0, through the controlTransfer method, which (quoting from the api) "Performs a control transaction on endpoint zero for this device."
    3. So, in your above code, I would use the 0th endpoint as an interrupt input endpoint, but it will still allow for control transfers.
    4. An example of someone using a HID device is the Missle Launcher demo, the device it uses is a HID device with an interrupt endpoint.

提交回复
热议问题