Author Topic: Second HID in dual HID composite not starting  (Read 5500 times)

rallysjd

  • Member
  • ***
  • Posts: 21
    • PiXCL Automation Technologies Inc
Second HID in dual HID composite not starting
« on: May 15, 2015, 11:27:57 am »
Perhaps a reader can offer some advice?
The config descriptor sets two interfaces. In order there's the Interface Descr#0 + HID Descr#0 + Endpoint1 set, then Interface Descr#1 + HID Descr#1 + Endpoint2 set. I have two ReportDescriptors, which testing to date showed necessary. The first ReportDescriptor contains data from a working device. The second ReportDescriptor has a couple of commands for testing only. 

Windows shows HID#0 as the expected HID-Compliant Device/USB Input Device pair, and this works perfectly. HID#1 shows as a USB Input Device that's unable to start. I suspect that the enumeration process is not getting the details for interface#1.

In the HID_Reset() function, there's a pInformation->Current_Interface setting (same struct passes USBwIndex0, USBwIndex1 values). Debugging (with a printf ) shows that interface#1 is never set.

I'm at a loss where to look next. Suggestions anyone?

SD

Jan Axelson

  • Administrator
  • Frequent Contributor
  • *****
  • Posts: 3033
    • Lakeview Research
Re: Second HID in dual HID composite not starting
« Reply #1 on: May 15, 2015, 09:08:26 pm »
Post your descriptors.

Try getting each of the HIDs to work individually, then as a single composite device.

If you change the descriptors and keep the same Product ID and Vendor ID, see:

http://janaxelson.com/forum/index.php?topic=1367.msg6187#msg6187
« Last Edit: May 18, 2015, 09:40:47 am by Jan Axelson »

rallysjd

  • Member
  • ***
  • Posts: 21
    • PiXCL Automation Technologies Inc
Re: Second HID in dual HID composite not starting
« Reply #2 on: May 17, 2015, 05:08:17 pm »
Testing each interface separately is a helpful idea.

Found it ... the second Report_Descriptor array size was off by 1. Both HIDs are now functional.

For readers, it's ideally required that each HID has it's own Receive_Buffer and Send_Buffer.

SD

Jan Axelson

  • Administrator
  • Frequent Contributor
  • *****
  • Posts: 3033
    • Lakeview Research
Re: Second HID in dual HID composite not starting
« Reply #3 on: May 18, 2015, 09:40:22 am »
Excellent, thanks for reporting what you found.