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.

Modify usb cdc acm device example for multiple ACM devices

Hello All,

I am working on ti starterkit, and starterware version: AM335X_StarterWare_02_00_01_01

OS: ubuntu 14.04, kernel version 3.13.0-24-generic.

I was playing around with the usb_dev_serial example. By default the example after execution creates a single ttyACM0 entry in linux. We have a requirement to create multiple ACM devices in linux. 

For example after execution of the code, devices like ACM0 and ACM1 should be created.

I did change the driver a bit, changed the descriptors in usbdcdc.c file(attached), but I am not able to create two devices, /dev/ttyACM*

First of all, is it possible to create multiple devices in this version of starterware? If yes than can anyone please guide me to as what I am missing?

4745.usbdcdc.c

Thanks and Regards

Sujan

  • Hello,

    One more point I failed to mention, after execution of the above code, I can check the descriptors in my PC using lsusb -v command. I am able to see the descriptors as expected, but no entry in /dev/

    Here are the descriptors:

    Bus 002 Device 008: ID 1cbe:0002 Luminary Micro Inc.


    Couldn't open device, some information will be missing
    Device Descriptor:
    bLength 18
    bDescriptorType 1
    bcdUSB 2.00
    bDeviceClass 2 Communications
    bDeviceSubClass 0
    bDeviceProtocol 0
    bMaxPacketSize0 64
    idVendor 0x1cbe Luminary Micro Inc.
    idProduct 0x0002
    bcdDevice 1.00
    iManufacturer 1
    iProduct 2
    iSerial 3
    bNumConfigurations 1


    Configuration Descriptor:
    bLength 9
    bDescriptorType 2
    wTotalLength 125
    bNumInterfaces 4
    bConfigurationValue 1
    iConfiguration 5
    bmAttributes 0xc0
    Self Powered
    MaxPower 250mA
    Interface Descriptor:
    bLength 9
    bDescriptorType 4
    bInterfaceNumber 0
    bAlternateSetting 0
    bNumEndpoints 1
    bInterfaceClass 2 Communications
    bInterfaceSubClass 2 Abstract (modem)
    bInterfaceProtocol 1 AT-commands (v.25ter)
    iInterface 4
    CDC Header:
    bcdCDC 1.10
    CDC ACM:
    bmCapabilities 0x06
    sends break
    line coding and serial state
    CDC Union:
    bMasterInterface 0
    bSlaveInterface 1
    CDC Call Management:
    bmCapabilities 0x01
    call management
    bDataInterface 1
    Endpoint Descriptor:
    bLength 7
    bDescriptorType 5
    bEndpointAddress 0x81 EP 1 IN
    bmAttributes 3
    Transfer Type Interrupt
    Synch Type None
    Usage Type Data
    wMaxPacketSize 0x0010 1x 16 bytes
    bInterval 10
    Interface Descriptor:
    bLength 9
    bDescriptorType 4
    bInterfaceNumber 1
    bAlternateSetting 0
    bNumEndpoints 2
    bInterfaceClass 10 CDC 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 0x0100 1x 256 bytes
    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 0x0100 1x 256 bytes
    bInterval 0
    Interface Descriptor:
    bLength 9
    bDescriptorType 4
    bInterfaceNumber 0
    bAlternateSetting 0
    bNumEndpoints 1
    bInterfaceClass 2 Communications
    bInterfaceSubClass 2 Abstract (modem)
    bInterfaceProtocol 1 AT-commands (v.25ter)
    iInterface 4
    CDC Header:
    bcdCDC 1.10
    CDC ACM:
    bmCapabilities 0x06
    sends break
    line coding and serial state
    CDC Union:
    bMasterInterface 0
    bSlaveInterface 1
    CDC Call Management:
    bmCapabilities 0x01
    call management
    bDataInterface 1
    Endpoint Descriptor:
    bLength 7
    bDescriptorType 5
    bEndpointAddress 0x83 EP 3 IN
    bmAttributes 3
    Transfer Type Interrupt
    Synch Type None
    Usage Type Data
    wMaxPacketSize 0x0010 1x 16 bytes
    bInterval 10
    Interface Descriptor:
    bLength 9
    bDescriptorType 4
    bInterfaceNumber 1
    bAlternateSetting 0
    bNumEndpoints 2
    bInterfaceClass 10 CDC Data
    bInterfaceSubClass 0 Unused
    bInterfaceProtocol 0
    iInterface 0
    Endpoint Descriptor:
    bLength 7
    bDescriptorType 5
    bEndpointAddress 0x84 EP 4 IN
    bmAttributes 2
    Transfer Type Bulk
    Synch Type None
    Usage Type Data
    wMaxPacketSize 0x0100 1x 256 bytes
    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 0x0100 1x 256 bytes
    bInterval 0