Hi, i currently work with an Arm Controller from ST and i try to create a CDC + HID usb interface device.
The configuration is working under XP but on Win7 only the Com Port is visible, the keyboard is not detected. While sniffing the usb communication i found out that the device descriptor is read correct (like on XP) but the HID report descriptor is not read by win7. Does anybody have an idea what is the problem?
Here is the driver i used:
; ; STMicroelectronics Comunication Device Class driver instalation file ; (C)2006 Copyright STMicroelectronics ; [Version] Signature="$Windows NT$" Class=Ports ClassGuid={4D36E978-E325-11CE-BFC1-08002BE10318} Provider=%STM% LayoutFile=layout.inf DriverVer=10/02/06 [Manufacturer] %STM%=DeviceList [DestinationDirs] DefaultDestDir=12 [SourceDisksFiles] [SourceDisksNames] [DeviceList] %DESCRIPTION%=STMUSB, USB\VID_0483&PID_A097&MI_00 ;------------------------------------------------------------------------------ ; Windows 2000/XP Sections ;------------------------------------------------------------------------------ [STMUSB.nt] include=mdmcpq.inf CopyFiles=DriverCopyFiles AddReg=STMUSB.nt.AddReg [DriverCopyFiles] usbser.sys,,,0x20 [STMUSB.nt.AddReg] HKR,,DevLoader,,*ntkern HKR,,NTMPDriver,,usbser.sys HKR,,EnumPropPages32,,"MsPorts.dll,SerialPortPropPageProvider" [STMUSB.nt.Services] AddService=usbser, 0x00000002, DriverService [STMUSB.nt.HW] include=mdmcpq.inf [DriverService] DisplayName=%DESCRIPTION% ServiceType=1 StartType=3 ErrorControl=1 ServiceBinary=%12%\usbser.sys ;------------------------------------------------------------------------------ ; String Definitions ;------------------------------------------------------------------------------ [Strings] STM="STMicroelectronics" DESCRIPTION="Datafox Virtual COM Port"
_ALIGN_BEGIN uint8_t usbd_cdc_CfgDesc[USB_CDC_CONFIG_DESC_SIZ] __ALIGN_END = { /*------------------------------------------------------------------------*/ /*Configuration Descriptor*/ /*------------------------------------------------------------------------*/ 0x09,0x02,0x4B,0x00,0x03,0x01,0x00,0xC0,0x32, //--------------------------------------------------------------------------- // Interface Association Descriptor //--------------------------------------------------------------------------- 0x08,0x0B,0x00,0x02,0x02,0x02,0x01,0x04, /*---------------------------------------------------------------------------*/ /*Interface Descriptor 1 */ //--------------------------------------------------------------------------- 0x09,0x04,0x00,0x00,0x01,0x02,0x02,0x01,0x04, //--------------------------------------------------------------------------- /*Header Functional Descriptor*/ //--------------------------------------------------------------------------- 0x05,0x24,0x00,0x10,0x01, //--------------------------------------------------------------------------- /*Call Management Functional Descriptor*/ //--------------------------------------------------------------------------- 0x05,0x24,0x01,0x00,0x03, //--------------------------------------------------------------------------- /*ACM Functional Descriptor*/ //--------------------------------------------------------------------------- 0x04,0x24,0x02,0x06, //--------------------------------------------------------------------------- /*Union Functional Descriptor*/ //--------------------------------------------------------------------------- 0x05,0x24,0x06, 0x00,0x01, //--------------------------------------------------------------------------- /*Endpoint 2 Descriptor*/ //--------------------------------------------------------------------------- 0x07,0x05,0x83, 0x03,LOBYTE(CDC_CMD_PACKET_SZE1),HIBYTE(CDC_CMD_PACKET_SZE1), 0xFF, /*---------------------------------------------------------------------------*/ /*Data class interface descriptor 1*/ //--------------------------------------------------------------------------- 0x09,0x04,0x01,0x00,0x02,0x0A,0x00,0x00,0x04, //--------------------------------------------------------------------------------- /*Endpoint OUT Descriptor*/ //--------------------------------------------------------------------------------- 0x07,0x05,0x01, 0x02,LOBYTE(CDC_DATA_MAX_PACKET_SIZE1), HIBYTE(CDC_DATA_MAX_PACKET_SIZE1), /* 065 */ 0x00, //--------------------------------------------------------------------------------- /*Endpoint IN Descriptor*/ //--------------------------------------------------------------------------------- 0x07,0x05,0x81, 0x02,LOBYTE(CDC_DATA_MAX_PACKET_SIZE1), HIBYTE(CDC_DATA_MAX_PACKET_SIZE1), 0x00, ////------------------------------------------------------------- ///************** Interface Descriptor Keyboard ****************/ ////------------------------------------------------------------- 0x09, USB_INTERFACE_DESCRIPTOR_TYPE, 0x02, 0x00, 0x01, 0x03, 0x01, 0x01, 0x00, ////---------------------------------------------------------------- ///**************** HID Descriptor Keyboard ********************/ ////---------------------------------------------------------------- 0x09,0x21,0x11,0x01,0x00,0x01,0x22,0x3F,0x00, ////------------------------------------------------------------------------- ///******************** Descriptor of Keyboard endpoint ********************/ ////------------------------------------------------------------------------- 0x07,0x05,0x82,0x03,0x08,0x00,0x0A, //---------------------------------------------------------------------------
continue...
Best regards,
Matthew
////------------------------------------------------------------- ///************** Interface Descriptor Keyboard ****************/ ////------------------------------------------------------------- 0x09, /* bLength: Interface Descriptor size */ USB_INTERFACE_DESCRIPTOR_TYPE (0x04), /* bDescriptorType: Interface descriptor type */ 0x02, /* bInterfaceNumber: Number of Interface*/ 0x00, /* bAlternateSetting: Alternate setting ## fix */ 0x01, /* bNumEndpoints */ 0x03, /* bInterfaceClass: HID fix */ 0x01, /* bInterfaceSubClass : 1=BOOT, 0=no boot ## fix */ 0x01, /* nInterfaceProtocol : 0=none, 1=keyboard, 2=mouse*/ 0x00, /* iInterface: Index of string descriptor*/ ////---------------------------------------------------------------- ///**************** HID Descriptor Keyboard ********************/ ////---------------------------------------------------------------- 0x09, /* bLength: HID Descriptor size ## fix - no change*/ 0x21, /* bDescriptorType: HID ## fix - no change*/ 0x11, /* bcdHID: HID Class Spec release number ##fix no change */ 0x01, /* High Byte of HID Class Spec number */ 0x00, /* bCountryCode: Hardware target country*/ 0x01, /* bNumDescriptors: Number of HID class descriptors to follow*/ 0x22, /* bDescriptorType fix -no change*/ 0x3F, /* wItemLength: Total length of Report descriptor*/ 0x00, /* High Byte of wItemLength */ ////------------------------------------------------------------------------- ///******************** Descriptor of Keyboard endpoint ********************/ ////------------------------------------------------------------------------- 0x07, /* bLength: Endpoint Descriptor size*/ 0x05, /* bDescriptorType: ## fix 0x05 */ HID_IN_EP (0x82), /* bEndpointAddress: Endpoint Address (IN)*/ 0x03, /* bmAttributes: Interrupt endpoint*/ 0x08, /* wMaxPacketSize: 8 Byte for keyboard transfer */ 0x00, /* High Byte of wMaxPacketSize */ 0x0A