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
  • Hi Sebastian,

    Thanks for letting us know that you solved your original problem. As it is unrelated to the original post I have branched your latest issue to a new discussion.

    Regards,

    Colin.

    •  Analog Employees 
    on Aug 31, 2011 12:52 AM over 9 years ago

    Communication can not start until host completely enumerates the device. Are you connecting the device directly to the host or via USB hub  or USB hardware analyzer ? Are you seeing multiple devices in the windows device manager as well? can you give us more information on the device (descriptor information)

  • 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,

    •  Analog Employees 
    on Sep 1, 2011 7:07 PM over 9 years ago

    Thanks for sharing the descriptor information.

    This appears like problem is at windows end. Can you try disabling the offending device. In the device manager Right click on the Unknown entry and in the drop down menu click Disable. It might be that windows is trying to load generic driver first before the correct dirver is installed. If it does not work you may look into the inf directory in your windows instllaton  folder ( Windows\inf) and check for the associated .inf file for your device. Remove all associated (using VID and PID)  .inf and .PNF files for your device and reinstall the correct USB driver. Double check the entries in the .inf before removing the files.

    If you still have problems contact support by sending your device class driver and associated windows driver.