Author Topic: Question about usbhidio_V2.3.cs  (Read 10197 times)

Declan Smith

  • Member
  • ***
  • Posts: 2
Question about usbhidio_V2.3.cs
« on: October 29, 2012, 03:43:12 am »
Hi Jan and all,
I build Device Firmware using LUFA GenericHID demo and then tested it using usbhidio_V2.3.cs from lvr website example.

Questions:

1. What is Input Report Buffer Size and Change Buffer Size button for? As it always had value '2' even I changed it.
I guessed it shows the length of the report that the HID device can provide, but I didn't have any clue for now.

2. When I unmark "Use ControlTransfer only" (means using Interrupt transfer as I knew, correct me if I'm wrong), the read data byte result displayed in the listbox didn't start from byte 1, but start from last 8 byte of all data read then after that the byte 1 to byte length - 8.
I didn't understand it as the inputbuffer read start from byte 1.

Please light me up...

Jan Axelson

  • Administrator
  • Frequent Contributor
  • *****
  • Posts: 3033
    • Lakeview Research
Re: Question about usbhidio_V2.3.cs
« Reply #1 on: October 29, 2012, 09:46:51 am »
See Hidd_setnuminputbuffers api function.

Values returned on report read are what is in the input buffer.

Declan Smith

  • Member
  • ***
  • Posts: 2
Re: Question about usbhidio_V2.3.cs
« Reply #2 on: October 29, 2012, 10:51:05 pm »
Hi Jan, sorry to waste your time...

Question 1 answered: change to -> if (MyEnvironment.Version <= Version98SE)

Question 2 still no clue:

I read out the buffer sent into the device (sent using control or interrupt) via terminal and the result is ok (in the right order up to 64 bytes).
When I read using control transfer the result was the same, but when reading using interrupt (and the report was more than 8 ), it happened.

Jan Axelson

  • Administrator
  • Frequent Contributor
  • *****
  • Posts: 3033
    • Lakeview Research
Re: Question about usbhidio_V2.3.cs
« Reply #3 on: October 31, 2012, 08:11:58 pm »
The device firmware is out of sync. Use whatever debugging tools you have to find out what the endpoint is sending.