Author Topic: HIDAPI protocol question with 65byte report ID  (Read 6383 times)

Lider Wang

  • Member
  • ***
  • Posts: 4
HIDAPI protocol question with 65byte report ID
« on: March 09, 2014, 02:40:41 pm »


I have a question when using HIDAPI (visual stdio) about report ID.

When I try to use the hidapi and connect to microchip Custom Demo
I am confusing about some aspect:

  **65 byte report is not make sense to me.

    Even if I don't wanna set report ID
    I need to set the first byte to 0 and sent the 65 byte buffer to device,
    but only receive 64 byte data in the microchip device (because report is 64 byte)
   
    It look like :

    Host                         Device

     write_hid
               65 byte  --------->

      read_hid
                <-----------   64byte

 
    It's wired for me.



    Isn't  the report  send or receive always should be 64 byte Maximum?
    Because the spec say the report should be 64 byte Maximum and send 1 ms each.
    And the report ID is defined in report descriptor, so I think report ID is belong into report.

    If the answer is yes, why the api can maintain 65 byte for 1byte report ID
    Does the report ID is contain in the 64byte?
    send the 65 byte data is not make sense to me.

Jan Axelson

  • Administrator
  • Frequent Contributor
  • *****
  • Posts: 3033
    • Lakeview Research
Re: HIDAPI protocol question with 65byte report ID
« Reply #1 on: March 10, 2014, 08:10:43 pm »
Longer reports are ok. They use multiple transactions. The report id transmits on the bus only if the HID uses report ids greater than zero.