During connecting device USB logger shows two devices

Thanks for reply,

yes, i resolved that problem. I've corrected some stack functions couse of hwr problems which i found in 'Silicon Anomaly List'. But i've got another problem now (i think there is no neet to start another post ). During conecting device USB logger shows two devices. Fist is Unknown Device(1) and second is (correct) MyDevice(2) (see attachment). After plug, host sends some data to device 1 and then starts enumeration of proper device. Thats happen every time. I think that is related with some time periods of device respond, am i right? but i do not know where to look for errors cause communicationns works correct. Any ideas? Thanks for any help.

Regards,

Sebastian

attachments.zip
Parents
  • Hi,

    I've connected my device through usb analyzer and directly to PC  host and there is no difference, always there are two devices (Composite Device and MyDevice). Device Manager shows two devices  too. Driver instals properly and communication looks good. I should mention that i implement usb CDC class to make virtual com port (using usbser.sys) ;-)

    Here are my descriptors:


    DEVICE_DESCRIPTOR DeviceDescriptor =
    {
         0x12, // bLength 18
         0x01, // type desc
         0x0200,
         0xEF,
         0x02,
         0x01,
         0x40, // bMaxPacketSize0
         USB_VID,
         USB_PID,
         0x0100,
         0x01,
         0x02,
         0x03,
         0x01
    };

    DEVICE_CONFIGURATION_SET ConfigurationSet =
    {
         /* configuration descriptor */
         {
             0x09,
             0x02,
             0x004B, // wTotalLength
             0x02, // bNumInterfaces
             0x01,
             0x00,
             0xC0, // bmAttributes
             50 // 100mA
         },
         /* interface association descriptor */
         {
             0x08, // bLength
             0x0B, // bDescriptorType
             0x00, // bFirstInterface - cdc communication interface
             0x02, // bInterfaceCount
             0x02, // bFunctionClass - cdc communication class code
             0x02, // bFunctionSubClass - cdc abstract control model
             0x02, // bFunctionProtocol
             0x01  // iFunction
         },
         /* interface descriptor (communication) */
         {
             0x09, // bLength
             0x04, // bDescriptorType
             0x00, // bInterfaceNumber - cdc communication interface
             0x00, // bAlternateSetting
             0x01, // bNumEndpoints
             0x02, // bInterfaceClass - cdc communication class code
             0x02, // bInterfaceSubClass - cdc abstract control model
             0x02, // bInterfaceProtocol
             0x00  // iInterface
         },
         /* header functional descriptor */
         {
             0x05, // bFunctionLength
             0x24, // CS_INTERFACE
             0x00, // bDescriptorSubtype, Header Functional Descriptor
             0x0110
         },
         /* ACM functional descriptor */
         {
             0x04, // bFunctionLength
             0x24, // CS_INTERFACE,
             0x02, // bDescriptorSubtype, ACM Functional Descriptor,
             0x02  // bmCapabilities
         },
         /* union functional descriptor */
         {
             0x05, // bFunctionLength,
             0x24, // CS_INTERFACE,
             0x06, // bDescriptorSubtype, Union Functional Descriptor
             0x00, // bMasterInterface, cdc communication interface
             0x01, // bSlaveInterface0, cdc data interface
         },
         /* call management descriptor */
         {
             0x05, // bFunctionLength,
             0x24, // CS_INTERFACE,
             0x01, // bDescriptorSubtype, Call Management Functional Descriptor
             0x01, // bmCapabilities
             0x01  // cdc data interface
         },
         /* endpoint descriptor */
         {
             0x07, // bLength
             0x05, // bDescriptorType
             0x81, // EP 1 IN
             0x03, // interrupt
             0x0008, // size 8
             0x0A  // bInterval
         },
         /* interface descriptor (data) */
         {
             0x09, // bLength
             0x04, // bDescriptorType
             0x01  // bInterfaceNumber - cdc data interface
             0x00, // bAlternateSetting
             0x02, // two bulk endpoints IN and OUT
             0x0A, // bInterfaceClass - cdc data interface class code
             0x00, // bInterfaceSubClass
             0x00, // bInterfaceProtocol
             0x00  // iInterface
         },
         /* endpoint descriptor */
         {
             0x07, // bLength
             0x05, // bDescriptorType
             0x82, // EP 2 IN,
             0x02, // bulk
             0x0080, // size 128
             0x00
         },
         /* endpoint descriptor */
         {
             0x07, // bLength
             0x05, // bDescriptorType
             0x03, // EP 3 OUT
             0x02, // bulk
             0x0080, // size 128
             0x00
         }
    };

    Regards,

Reply
  • Hi,

    I've connected my device through usb analyzer and directly to PC  host and there is no difference, always there are two devices (Composite Device and MyDevice). Device Manager shows two devices  too. Driver instals properly and communication looks good. I should mention that i implement usb CDC class to make virtual com port (using usbser.sys) ;-)

    Here are my descriptors:


    DEVICE_DESCRIPTOR DeviceDescriptor =
    {
         0x12, // bLength 18
         0x01, // type desc
         0x0200,
         0xEF,
         0x02,
         0x01,
         0x40, // bMaxPacketSize0
         USB_VID,
         USB_PID,
         0x0100,
         0x01,
         0x02,
         0x03,
         0x01
    };

    DEVICE_CONFIGURATION_SET ConfigurationSet =
    {
         /* configuration descriptor */
         {
             0x09,
             0x02,
             0x004B, // wTotalLength
             0x02, // bNumInterfaces
             0x01,
             0x00,
             0xC0, // bmAttributes
             50 // 100mA
         },
         /* interface association descriptor */
         {
             0x08, // bLength
             0x0B, // bDescriptorType
             0x00, // bFirstInterface - cdc communication interface
             0x02, // bInterfaceCount
             0x02, // bFunctionClass - cdc communication class code
             0x02, // bFunctionSubClass - cdc abstract control model
             0x02, // bFunctionProtocol
             0x01  // iFunction
         },
         /* interface descriptor (communication) */
         {
             0x09, // bLength
             0x04, // bDescriptorType
             0x00, // bInterfaceNumber - cdc communication interface
             0x00, // bAlternateSetting
             0x01, // bNumEndpoints
             0x02, // bInterfaceClass - cdc communication class code
             0x02, // bInterfaceSubClass - cdc abstract control model
             0x02, // bInterfaceProtocol
             0x00  // iInterface
         },
         /* header functional descriptor */
         {
             0x05, // bFunctionLength
             0x24, // CS_INTERFACE
             0x00, // bDescriptorSubtype, Header Functional Descriptor
             0x0110
         },
         /* ACM functional descriptor */
         {
             0x04, // bFunctionLength
             0x24, // CS_INTERFACE,
             0x02, // bDescriptorSubtype, ACM Functional Descriptor,
             0x02  // bmCapabilities
         },
         /* union functional descriptor */
         {
             0x05, // bFunctionLength,
             0x24, // CS_INTERFACE,
             0x06, // bDescriptorSubtype, Union Functional Descriptor
             0x00, // bMasterInterface, cdc communication interface
             0x01, // bSlaveInterface0, cdc data interface
         },
         /* call management descriptor */
         {
             0x05, // bFunctionLength,
             0x24, // CS_INTERFACE,
             0x01, // bDescriptorSubtype, Call Management Functional Descriptor
             0x01, // bmCapabilities
             0x01  // cdc data interface
         },
         /* endpoint descriptor */
         {
             0x07, // bLength
             0x05, // bDescriptorType
             0x81, // EP 1 IN
             0x03, // interrupt
             0x0008, // size 8
             0x0A  // bInterval
         },
         /* interface descriptor (data) */
         {
             0x09, // bLength
             0x04, // bDescriptorType
             0x01  // bInterfaceNumber - cdc data interface
             0x00, // bAlternateSetting
             0x02, // two bulk endpoints IN and OUT
             0x0A, // bInterfaceClass - cdc data interface class code
             0x00, // bInterfaceSubClass
             0x00, // bInterfaceProtocol
             0x00  // iInterface
         },
         /* endpoint descriptor */
         {
             0x07, // bLength
             0x05, // bDescriptorType
             0x82, // EP 2 IN,
             0x02, // bulk
             0x0080, // size 128
             0x00
         },
         /* endpoint descriptor */
         {
             0x07, // bLength
             0x05, // bDescriptorType
             0x03, // EP 3 OUT
             0x02, // bulk
             0x0080, // size 128
             0x00
         }
    };

    Regards,

Children
No Data