Author Topic: HID Feature Report Size longer than 64 bytes  (Read 19532 times)

aung

  • Member
  • ***
  • Posts: 4
HID Feature Report Size longer than 64 bytes
« on: October 03, 2012, 12:26:02 am »
Hi All,

I would like to ask usb hid report size for my application. There are some data communication between PC and USB Hid device via feature report. I can send the data from PC to device 64 bytes only. If I send more than 64 bytes from PC,  the device receive just the first 64 bytes only.

I have set the feature report size to 512 bytes in hid report descriptor.

Can I send more than 64 bytes of data via hid feature report which use end point 0 Output?

Thanks
Aung

Jan Axelson

  • Administrator
  • Frequent Contributor
  • *****
  • Posts: 3033
    • Lakeview Research
Re: HID Feature Report Size longer than 64 bytes
« Reply #1 on: October 03, 2012, 09:53:36 am »
Yes, if your device firmware supports it.

aung

  • Member
  • ***
  • Posts: 4
Re: HID Feature Report Size longer than 64 bytes
« Reply #2 on: October 04, 2012, 12:10:07 am »
Hi Jan, Thanks for the answer.

That means HID driver on PC split the data transfer into the multiple transactions if the data size is more than packet size(64 bytes) for Control pipe(end point 0 output).

Jan Axelson

  • Administrator
  • Frequent Contributor
  • *****
  • Posts: 3033
    • Lakeview Research
Re: HID Feature Report Size longer than 64 bytes
« Reply #3 on: October 04, 2012, 12:11:01 am »
Yes, for OUT (host to device) reports.

aung

  • Member
  • ***
  • Posts: 4
Re: HID Feature Report Size longer than 64 bytes
« Reply #4 on: October 04, 2012, 07:03:48 am »
Hi Jan, Thank you very much.

I have another problem regarding HID data transfer.
I sent 512 bytes of data from PC to Device via setfeature report. Then PC split into multiple packets (8) and each has 64 bytes. From the firmware side  I receive 4 packets only ( Packet 1,3,5,7) and even number packets(2,4,6,8) are missing. I don't know why these packets are missing.

USB sniffer does not show the packet transactions. Please let me know which side(PC or Device) causing the issude?

Jan Axelson

  • Administrator
  • Frequent Contributor
  • *****
  • Posts: 3033
    • Lakeview Research
Re: HID Feature Report Size longer than 64 bytes
« Reply #5 on: October 04, 2012, 09:13:38 am »
A hardware protocol analyzer will show what is happening on the bus.

If you don't have a hardware analyzer, use whatever debugging tools you have to determine how the device firmware is responding to received data.

On receiving data, the endpoint should NAK new data until firmware has retrieved the received data.

aung

  • Member
  • ***
  • Posts: 4
Re: HID Feature Report Size longer than 64 bytes
« Reply #6 on: October 08, 2012, 12:47:14 am »
I know the error. The data0/1 toggling is not correct.

Jan Axelson

  • Administrator
  • Frequent Contributor
  • *****
  • Posts: 3033
    • Lakeview Research
Re: HID Feature Report Size longer than 64 bytes
« Reply #7 on: October 08, 2012, 10:41:09 am »
Glad to hear you found the problem. Thanks for posting it.