This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

USB RNDIS Bad CDC Descriptors?

I am trying to connect using DVSDK 2.10 LSP 2.10.00.14 to an composite RNDIS device.  I am getting the following errors logged with DMESG

<3>[    6.050000] usb 1-1: device v19a5 p0004 is not supported
<7>[    6.070000] usb 1-1: uevent
<6>[    6.070000] usb 1-1: configuration #1 chosen from 1 choice
<7>[    6.370000] usb 1-1: adding 1-1:1.0 (config #1, interface 0)
<7>[    6.370000] usb 1-1:1.0: uevent
<7>[    6.370000] rndis_host 1-1:1.0: usb_probe_interface
<7>[    6.370000] rndis_host 1-1:1.0: usb_probe_interface - got id
<7>[    6.370000] rndis_host 1-1:1.0: missing cdc union ether descriptor
<6>[    6.370000] usb 1-1: bad CDC descriptors
<7>[    6.370000] usbserial_generic 1-1:1.0: usb_probe_interface
<7>[    6.370000] usbserial_generic 1-1:1.0: usb_probe_interface - got id

Can someone help me understand what this composite device may/may not be providing?

  • Scott,

    There are two setup related query.

    a) Is this device follows RNDIS protocol only ? RNDIS protocol is required by devices to work with Windows OS. and CDC is required for devices to work on Linux/MacOS systems.

    You need to make sure that appropriate host driver is enabled in menuconfig which can talk to the device.

    b) Is this RNDIS device ceritifed product or you are currently developing/programming it ?

    I think the device is sending RNDIS descriptors only and EVM host is expecting CDC descriptors.

    Regards,
    ajay

  • The device presents itself as a composite device with a combination of RNDIS networ interface, serial connections, and some internal mass storage devices.  This device has been tested with other Linux systems Ubuntu, etc without issue.  I am concerned about the vintage of the 2.6.18 kernel (LSP 2.10) for the DM365.  Is there a tool I can use or other means to further see the descriptor information that is being sent?

  • Scott,

    YOu can get the descriptors reported using below command,

    $ cat  /proc/bus/usb/devices

    CONFIG_USBFS needs to be enabled.

    Regards,

    Ajay

     

  • Ajay,

    Using the cat command did not show anything.  But here is the info I got from running lsusb -vvvv

     

    NOTE: This device does not have a CDC union descriptor, and I think that is why it is not installed. There is a comment in cdc_ether.c about it, as well as some debug messages.  I need to find away to get this device to install.  Any ideas?

    Bus 001 Device 002: ID 19a5:0004
    Device Descriptor:
      bLength                18
      bDescriptorType         1
      bcdUSB               2.00
      bDeviceClass            0 (Defined at Interface level)
      bDeviceSubClass         0
      bDeviceProtocol         0
      bMaxPacketSize0        64
      idVendor           0x19a5
      idProduct          0x0004
      bcdDevice            0.00
      iManufacturer           1 Harris RF Communications
      iProduct                2 Falcon III Radio
      iSerial                 0
      bNumConfigurations      1
      Configuration Descriptor:
        bLength                 9
        bDescriptorType         2
        wTotalLength          299
        bNumInterfaces          9
        bConfigurationValue     1
        iConfiguration          8 Main Configuration
        bmAttributes         0xc0
          Self Powered
        MaxPower                0mA
        Interface Descriptor:
          bLength                 9
          bDescriptorType         4
          bInterfaceNumber        0
          bAlternateSetting       0
          bNumEndpoints           1
          bInterfaceClass         2 Communications
          bInterfaceSubClass      2 Abstract (modem)
          bInterfaceProtocol    255 Vendor Specific (MSFT RNDIS?)
          iInterface              0
          Endpoint Descriptor:
            bLength                 7
            bDescriptorType         5
            bEndpointAddress     0x81  EP 1 IN
            bmAttributes            3
              Transfer Type            Interrupt
              Synch Type               None
              Usage Type               Data
            wMaxPacketSize     0x0008  bytes 8 once
            bInterval               1
            CDC Header:
              bcdCDC               10.01
            CDC Call Management:
              bmCapabilities       0x00
              bDataInterface        0
            CDC ACM:
              bmCapabilities       00
        Interface Descriptor:
          bLength                 9
          bDescriptorType         4
          bInterfaceNumber        1
          bAlternateSetting       0
          bNumEndpoints           2
          bInterfaceClass        10 Data
          bInterfaceSubClass      0 Unused
          bInterfaceProtocol      0
          iInterface              0
          Endpoint Descriptor:
            bLength                 7
            bDescriptorType         5
            bEndpointAddress     0x82  EP 2 IN
            bmAttributes            2
              Transfer Type            Bulk
              Synch Type               None
              Usage Type               Data
            wMaxPacketSize     0x0040  bytes 64 once
            bInterval               0
          Endpoint Descriptor:
            bLength                 7
            bDescriptorType         5
            bEndpointAddress     0x01  EP 1 OUT
            bmAttributes            2
              Transfer Type            Bulk
              Synch Type               None
              Usage Type               Data
            wMaxPacketSize     0x0040  bytes 64 once
            bInterval               0
        Interface Descriptor:
          bLength                 9
          bDescriptorType         4
          bInterfaceNumber        2
          bAlternateSetting       0
          bNumEndpoints           2
          bInterfaceClass         8 Mass Storage
          bInterfaceSubClass      6 SCSI
          bInterfaceProtocol     80 Bulk (Zip)
          iInterface              0
          Endpoint Descriptor:
            bLength                 7
            bDescriptorType         5
            bEndpointAddress     0x83  EP 3 IN
            bmAttributes            2
              Transfer Type            Bulk
              Synch Type               None
              Usage Type               Data
            wMaxPacketSize     0x0040  bytes 64 once
            bInterval               0
          Endpoint Descriptor:
            bLength                 7
            bDescriptorType         5
            bEndpointAddress     0x02  EP 2 OUT
            bmAttributes            2
              Transfer Type            Bulk
              Synch Type               None
              Usage Type               Data
            wMaxPacketSize     0x0040  bytes 64 once
            bInterval               0
        Interface Descriptor:
          bLength                 9
          bDescriptorType         4
          bInterfaceNumber        3
          bAlternateSetting       0
          bNumEndpoints           1
          bInterfaceClass         2 Communications
          bInterfaceSubClass      2 Abstract (modem)
          bInterfaceProtocol    255 Vendor Specific (MSFT RNDIS?)
          iInterface              0
          Endpoint Descriptor:
            bLength                 7
            bDescriptorType         5
            bEndpointAddress     0x84  EP 4 IN
            bmAttributes            3
              Transfer Type            Interrupt
              Synch Type               None
              Usage Type               Data
            wMaxPacketSize     0x0008  bytes 8 once
            bInterval               1
            CDC Header:
              bcdCDC               1.10
            CDC Call Management:
              bmCapabilities       0x00
              bDataInterface        1
            CDC ACM:
              bmCapabilities       02
                line coding and serial state
            CDC Union:
              bMasterInterface        3
              bSlaveInterface         4
        Interface Descriptor:
          bLength                 9
          bDescriptorType         4
          bInterfaceNumber        4
          bAlternateSetting       0
          bNumEndpoints           2
          bInterfaceClass        10 Data
          bInterfaceSubClass      0 Unused
          bInterfaceProtocol      0
          iInterface              0
          Endpoint Descriptor:
            bLength                 7
            bDescriptorType         5
            bEndpointAddress     0x85  EP 5 IN
            bmAttributes            2
              Transfer Type            Bulk
              Synch Type               None
              Usage Type               Data
            wMaxPacketSize     0x0040  bytes 64 once
            bInterval               0
          Endpoint Descriptor:
            bLength                 7
            bDescriptorType         5
            bEndpointAddress     0x03  EP 3 OUT
            bmAttributes            2
              Transfer Type            Bulk
              Synch Type               None
              Usage Type               Data
            wMaxPacketSize     0x0040  bytes 64 once
            bInterval               0
        Interface Descriptor:
          bLength                 9
          bDescriptorType         4
          bInterfaceNumber        5
          bAlternateSetting       0
          bNumEndpoints           1
          bInterfaceClass         2 Communications
          bInterfaceSubClass      2 Abstract (modem)
          bInterfaceProtocol    255 Vendor Specific (MSFT RNDIS?)
          iInterface              0
          Endpoint Descriptor:
            bLength                 7
            bDescriptorType         5
            bEndpointAddress     0x84  EP 4 IN
            bmAttributes            3
              Transfer Type            Interrupt
              Synch Type               None
              Usage Type               Data
            wMaxPacketSize     0x0008  bytes 8 once
            bInterval               1
            CDC Header:
              bcdCDC               1.10
            CDC Call Management:
              bmCapabilities       0x00
              bDataInterface        1
            CDC ACM:
              bmCapabilities       02
                line coding and serial state
            CDC Union:
              bMasterInterface        5
              bSlaveInterface         6
        Interface Descriptor:
          bLength                 9
          bDescriptorType         4
          bInterfaceNumber        6
          bAlternateSetting       0
          bNumEndpoints           2
          bInterfaceClass        10 Data
          bInterfaceSubClass      0 Unused
          bInterfaceProtocol      0
          iInterface              0
          Endpoint Descriptor:
            bLength                 7
            bDescriptorType         5
            bEndpointAddress     0x86  EP 6 IN
            bmAttributes            2
              Transfer Type            Bulk
              Synch Type               None
              Usage Type               Data
            wMaxPacketSize     0x0040  bytes 64 once
            bInterval               0
          Endpoint Descriptor:
            bLength                 7
            bDescriptorType         5
            bEndpointAddress     0x04  EP 4 OUT
            bmAttributes            2
              Transfer Type            Bulk
              Synch Type               None
              Usage Type               Data
            wMaxPacketSize     0x0040  bytes 64 once
            bInterval               0
        Interface Descriptor:
          bLength                 9
          bDescriptorType         4
          bInterfaceNumber        7
          bAlternateSetting       0
          bNumEndpoints           1
          bInterfaceClass         2 Communications
          bInterfaceSubClass      2 Abstract (modem)
          bInterfaceProtocol    255 Vendor Specific (MSFT RNDIS?)
          iInterface              0
          Endpoint Descriptor:
            bLength                 7
            bDescriptorType         5
            bEndpointAddress     0x84  EP 4 IN
            bmAttributes            3
              Transfer Type            Interrupt
              Synch Type               None
              Usage Type               Data
            wMaxPacketSize     0x0008  bytes 8 once
            bInterval               1
            CDC Header:
              bcdCDC               1.10
            CDC Call Management:
              bmCapabilities       0x00
              bDataInterface        1
            CDC ACM:
              bmCapabilities       02
                line coding and serial state
            CDC Union:
              bMasterInterface        7
              bSlaveInterface         8
        Interface Descriptor:
          bLength                 9
          bDescriptorType         4
          bInterfaceNumber        8
          bAlternateSetting       0
          bNumEndpoints           2
          bInterfaceClass        10 Data
          bInterfaceSubClass      0 Unused
          bInterfaceProtocol      0
          iInterface              0
          Endpoint Descriptor:
            bLength                 7
            bDescriptorType         5
            bEndpointAddress     0x87  EP 7 IN
            bmAttributes            2
              Transfer Type            Bulk
              Synch Type               None
              Usage Type               Data
            wMaxPacketSize     0x0040  bytes 64 once
            bInterval               0
          Endpoint Descriptor:
            bLength                 7
            bDescriptorType         5
            bEndpointAddress     0x05  EP 5 OUT
            bmAttributes            2
              Transfer Type            Bulk
              Synch Type               None
              Usage Type               Data
            wMaxPacketSize     0x0040  bytes 64 once
            bInterval               0

    Bus 001 Device 001: ID 0000:0000
    Device Descriptor:
      bLength                18
      bDescriptorType         1
      bcdUSB               2.00
      bDeviceClass            9 Hub
      bDeviceSubClass         0 Unused
      bDeviceProtocol         1 Single TT
      bMaxPacketSize0        64
      idVendor           0x0000
      idProduct          0x0000
      bcdDevice            2.06
      iManufacturer           3 Linux 2.6.18_pro500-TVP musb-hcd
      iProduct                2 MUSB HDRC host driver
      iSerial                 1 musb_hdrc
      bNumConfigurations      1
      Configuration Descriptor:
        bLength                 9
        bDescriptorType         2
        wTotalLength           25
        bNumInterfaces          1
        bConfigurationValue     1
        iConfiguration          0
        bmAttributes         0xe0
          Self Powered
          Remote Wakeup
        MaxPower                0mA
        Interface Descriptor:
          bLength                 9
          bDescriptorType         4
          bInterfaceNumber        0
          bAlternateSetting       0
          bNumEndpoints           1
          bInterfaceClass         9 Hub
          bInterfaceSubClass      0 Unused
          bInterfaceProtocol      0
          iInterface              0
          Endpoint Descriptor:
            bLength                 7
            bDescriptorType         5
            bEndpointAddress     0x81  EP 1 IN
            bmAttributes            3
              Transfer Type            Interrupt
              Synch Type               None
              Usage Type               Data
            wMaxPacketSize     0x0002  bytes 2 twice
            bInterval              12
    #

  • I'll throw in my 2 cents. I don't know anything about CDC and RNDIS other than RNDIS Gadgets don't compile in DVSDK. I took a quick look at 2.6.18 kernel vs the 2.6.33 kernel. Kernels newer than 2007-05-23 have additional lines of code to deal with CDC descriptors in the endpoint descriptor.

    drivers/usb/net/cdc_ether.c
    ...
    int usbnet_generic_cdc_bind(struct usbnet *dev, struct usb_interface *intf)
    {
    ...
                    "CDC descriptors on config\n");
        }

        /* Maybe CDC descriptors are after the endpoint?  This bug has
         * been seen on some 2Wire Inc RNDIS-ish products.
         */
        if (len == 0) {
            struct usb_host_endpoint    *hep;

            hep = intf->cur_altsetting->endpoint;
            if (hep) {
                buf = hep->extra;
                len = hep->extralen;
            }
            if (len)
                dev_dbg(&intf->dev,
                    "CDC descriptors on endpoint\n");
        }

        /* this assumes that if there's a non-RNDIS vendor variant
    ...

    Just guessing.

     

     

  • Hi Scott,

    I am facing similar issue. Did you solved it ?