I have lock dead lock problem in PC windows xp service pack III (tested also in windows 7)
I already use hid generic single hid with success. Now I am trying to use LPC17xx composite Hid Hid generic + hid generic I use 2 interfaces Interface 0 for Hid 0 use endpoint 1 output 0x81 input (same endpoint) Interface 1 for Hid 1 use endpoint 0x84 input ----------------------------------------------------------- I use logical endpoint 4 because from table 185-fixed endpoint configuration in lpc17xx manual, that endpoint is one interrupt endpoint.
I already modify in Hid example NUM_INTERFACES 1 <---2 and modify in usb_core.c with 2 case the subbranches case HID_HID_DESCRIPTOR_TYPE case HID_HID_REPORT_DESCRIPTOR_TYPE ( see later in post) Enumeration seems successfull and endpoint 1 is working but when in PC I open second interfaces _mi01 from PC is possible to open stream but readfile lock in pc like that endpoint 4 is not working At the end of post output of usbview PC program has been modified from keil example and we already work successfully with single hid. \\?\hid#vid_17xx&pid_062a&mi_00#7&104386fe&....... \\?\hid#vid_17xx&pid_062a&mi_01#7&341ac4c0&.......
Descriptor used are:
#define HID_DESC_OFFSET 0x0012 #define HID2_DESC_OFFSET HID_DESC_OFFSET+HID_DESC_SIZE+USB_ENDPOINT_DESC_SIZE*2
#define HID_INPUT_REPORT_BYTES USB_PACKET_SIZE /* size of report in Bytes */ #define HID_OUTPUT_REPORT_BYTES USB_PACKET_SIZE /* size of report in Bytes */ #define USB_PACKET_SIZE 8 #define USB_MAX_PACKET0 8 ----------------------------------------------------------------- From Usbview Device Descriptor: bcdUSB: 0x0110 bDeviceClass: 0x00 bDeviceSubClass: 0x00 bDeviceProtocol: 0x00 bMaxPacketSize0: 0x08 (8) idVendor: 0x1722 idProduct: 0x062A bcdDevice: 0x0100 iManufacturer: 0x01 0x0409: "Elad " iProduct: 0x02 0x0409: "Composite TEST" iSerialNumber: 0x00 bNumConfigurations: 0x01
ConnectionStatus: DeviceConnected Current Config Value: 0x01 Device Bus Speed: Full Device Address: 0x01 Open Pipes: 3
Endpoint Descriptor: bEndpointAddress: 0x81 IN Transfer Type: Interrupt wMaxPacketSize: 0x0008 (8) bInterval: 0x20
Endpoint Descriptor: bEndpointAddress: 0x01 OUT Transfer Type: Interrupt wMaxPacketSize: 0x0008 (8) bInterval: 0x20
Endpoint Descriptor: bEndpointAddress: 0x84 IN Transfer Type: Interrupt wMaxPacketSize: 0x0008 (8) bInterval: 0x0A
Configuration Descriptor: wTotalLength: 0x0042 bNumInterfaces: 0x02 bConfigurationValue: 0x01 iConfiguration: 0x00 bmAttributes: 0xE0 (Bus Powered Self Powered Remote Wakeup) MaxPower: 0x32 (100 Ma)
Interface Descriptor: bInterfaceNumber: 0x00 bAlternateSetting: 0x00 bNumEndpoints: 0x02 bInterfaceClass: 0x03 (HID) bInterfaceSubClass: 0x00 bInterfaceProtocol: 0x00 iInterface: 0x00
HID Descriptor: bcdHID: 0x0111 bCountryCode: 0x00 bNumDescriptors: 0x01 bDescriptorType: 0x22 wDescriptorLength: 0x0019
Interface Descriptor: bInterfaceNumber: 0x01 bAlternateSetting: 0x00 bNumEndpoints: 0x01 bInterfaceClass: 0x03 (HID) bInterfaceSubClass: 0x00 bInterfaceProtocol: 0x00 iInterface: 0x00