This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Query Related to USB HID

Date : 18th Feb 2008

Hello frnds, In my developing I am using USBHID code (available on keil.com) for lpc236x series for USB HID communication.
Now any PC have more than 2 USB port. and I want to communicate same two USB hardware(our own hardware ) to same pc on different USB port. Than what change I have to do in this USBHID Example(or USB descriptor file.)

Awaiting for favorable your reply.

Thank you
Regard ,
Suprit patel

  • Assign unique serial number to each device, which shares the same VID/PID.
    The serial number is defined in this string descriptor.

    usbdesc.c
    /* USB String Descriptor (optional) */
    const BYTE USB_StringDescriptor[] = {
       ...
    /* Index 0x42: Serial Number */
      0x1A,                              /* bLength */
      USB_STRING_DESCRIPTOR_TYPE,        /* bDescriptorType */
      'D',0,
      'E',0,
      'M',0,
      'O',0,
      '0',0,
      '0',0,
      '0',0,
      '0',0,
      '0',0,
      '0',0,
      '0',0,
      '0',0,
      ...
    

    On the Windows host app,
    HID devices are listed up by SetupDiEnumDeviceInterfaces( HID_GUID )
    Loop through the list and check these items.
    - VID/PID using HidD_GetAttributes()
    - Serial Number using HidD_GetSerialNumberString()
    Then you'll find all of your devices, and also you can distinguish them each other.

    In this USB-IF topic, we discussed on counting up all HID composite interfaces on single devices. The procedure is almost same.

    "multi-interface device" on USB-IF
    www.usb.org/.../viewtopic.php

    Tsuneo