Install ACM driver in Jetson nano JP 4.6

Hi I want to install cdc_acm in jetson nano having jetpack 4.6.1 (Ubuntu 18.04). I cannot find cdc_acm.ko I tried the approach mentioned by Jetsonhacks but it is for a different version of kernel and doesn’t work for me. Can you please let me know how to solve this issue thank you.

What do you see from this:
zcat /proc/config.gz | grep -i acm

Also, what do you see from “uname -r”?

Hi @linuxdev for zcat /proc/config.gz | grep -i acm I get the following output

# CONFIG_FB_MACMODES is not set
CONFIG_USB_ACM=m
CONFIG_USB_F_ACM=y
CONFIG_USB_CONFIGFS_ACM=y

For uname -r this is the response
4.9.337-tegra
I have set up a udev rule as SUBSYSTEM=="USB", ATTRS{idVendor} =="2ca3", MODE ="0666" and my lsusb output is

Bus 002 Device 002: ID 0bda:0411 Realtek Semiconductor Corp. 
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 006: ID 7392:a611 Edimax Technology Co., Ltd 
Bus 001 Device 005: ID 413c:2514 Dell Computer Corp. 
Bus 001 Device 004: ID 0403:6001 Future Technology Devices International, Ltd FT232 USB-Serial (UART) IC
Bus 001 Device 003: ID 2ca3:001f  
Bus 001 Device 002: ID 0bda:5411 Realtek Semiconductor Corp. 
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

When I do disconnect the drone,

dmesg --follow

and reconnect I get the following output

[  349.087895] usb 1-2.1: New USB device found, idVendor=2ca3, idProduct=001f
[  349.087901] usb 1-2.1: New USB device strings: Mfr=2, Product=3, SerialNumber=4
[  349.087904] usb 1-2.1: Product: DJI
[  349.087908] usb 1-2.1: Manufacturer: DJI
[  349.087911] usb 1-2.1: SerialNumber: 0123456789ABCDEF
[  349.091439] rndis_host 1-2.1:1.0 usb0: register 'rndis_host' at usb-70090000.xusb-2.1, RNDIS device, 82:46:74:d6:7b:49
[  349.095336] usb-storage 1-2.1:1.2: USB Mass Storage device detected
[  349.108812] scsi host0: usb-storage 1-2.1:1.2
[  349.234816] IPv6: ADDRCONF(NETDEV_UP): usb0: link is not ready
[  350.131502] scsi 0:0:0:0: Direct-Access     DJI      File-CD Gadget   0310 PQ: 0 ANSI: 2
[  350.141519] sd 0:0:0:0: [sda] Attached SCSI removable disk
[  350.147526] scsi 0:0:0:1: Direct-Access     DJI      File-CD Gadget   0310 PQ: 0 ANSI: 2
[  350.149838] scsi 0:0:0:2: Direct-Access     DJI      File-CD Gadget   0310 PQ: 0 ANSI: 2
[  350.151755] sd 0:0:0:1: [sdb] Attached SCSI removable disk
[  350.152363] sd 0:0:0:2: [sdc] 31108096 512-byte logical blocks: (15.9 GB/14.8 GiB)
[  350.152537] sd 0:0:0:2: [sdc] Write Protect is off
[  350.152541] sd 0:0:0:2: [sdc] Mode Sense: 03 00 00 00
[  350.152731] sd 0:0:0:2: [sdc] No Caching mode page found
[  350.152735] sd 0:0:0:2: [sdc] Assuming drive cache: write through
[  350.161176]  sdc:
[  350.170323] sd 0:0:0:2: [sdc] Attached SCSI removable disk
[  350.453000] FAT-fs (sdc): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.

Also for this command sudo lsusb -d 2ca3:001f -vvv I get the following output

Bus 001 Device 003: ID 2ca3:001f  
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0        64
  idVendor           0x2ca3 
  idProduct          0x001f 
  bcdDevice           ff.ff
  iManufacturer           2 DJI
  iProduct                3 DJI
  iSerial                 4 0123456789ABCDEF
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength          187
    bNumInterfaces          6
    bConfigurationValue     1
    iConfiguration          0 
    bmAttributes         0xc0
      Self Powered
    MaxPower                0mA
    Interface Association:
      bLength                 8
      bDescriptorType        11
      bFirstInterface         0
      bInterfaceCount         2
      bFunctionClass        224 Wireless
      bFunctionSubClass       1 Radio Frequency
      bFunctionProtocol       3 RNDIS
      iFunction               7 RNDIS
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass       224 Wireless
      bInterfaceSubClass      1 Radio Frequency
      bInterfaceProtocol      3 RNDIS
      iInterface              5 RNDIS Communications Control
      ** UNRECOGNIZED:  05 24 00 10 01
      ** UNRECOGNIZED:  05 24 01 00 01
      ** UNRECOGNIZED:  04 24 02 00
      ** UNRECOGNIZED:  05 24 06 00 01
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x82  EP 2 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0008  1x 8 bytes
        bInterval               9
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass        10 CDC Data
      bInterfaceSubClass      0 Unused
      bInterfaceProtocol      0 
      iInterface              6 RNDIS Ethernet Data
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x08  EP 8 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        2
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass         8 Mass Storage
      bInterfaceSubClass      6 SCSI
      bInterfaceProtocol     80 Bulk-Only
      iInterface              1 Mass Storage
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x83  EP 3 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x09  EP 9 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               1
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        3
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass     67 
      bInterfaceProtocol      1 
      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     0x0200  1x 512 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x0a  EP 10 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
    Interface Association:
      bLength                 8
      bDescriptorType        11
      bFirstInterface         4
      bInterfaceCount         2
      bFunctionClass          2 Communications
      bFunctionSubClass       2 Abstract (modem)
      bFunctionProtocol       1 AT-commands (v.25ter)
      iFunction              10 CDC Serial
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        4
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         2 Communications
      bInterfaceSubClass      2 Abstract (modem)
      bInterfaceProtocol      1 AT-commands (v.25ter)
      iInterface              8 CDC Abstract Control Model (ACM)
      CDC Header:
        bcdCDC               1.10
      CDC Call Management:
        bmCapabilities       0x00
        bDataInterface          5
      CDC ACM:
        bmCapabilities       0x02
          line coding and serial state
      CDC Union:
        bMasterInterface        4
        bSlaveInterface         5 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x86  EP 6 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x000a  1x 10 bytes
        bInterval               9
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        5
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass        10 CDC Data
      bInterfaceSubClass      0 Unused
      bInterfaceProtocol      0 
      iInterface              9 CDC ACM Data
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x85  EP 5 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x0b  EP 11 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
Device Qualifier (for other device speed):
  bLength                10
  bDescriptorType         6
  bcdUSB               2.00
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0        64
  bNumConfigurations      1
Device Status:     0x0003
  Self Powered
  Remote Wakeup Enabled

I am not sure if the rule is being used properly and the device is getting mapped to any tty* .
For usb-devices it outputs
T: Bus=01 Lev=02 Prnt=02 Port=00 Cnt=01 Dev#= 3 Spd=480 MxCh= 0
D: Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1
P: Vendor=2ca3 ProdID=001f Rev=ff.ff
S: Manufacturer=DJI
S: Product=DJI
S: SerialNumber=0123456789ABCDEF
C: #Ifs= 6 Cfg#= 1 Atr=c0 MxPwr=0mA
I: If#= 0 Alt= 0 #EPs= 1 Cls=e0(wlcon) Sub=01 Prot=03 Driver=rndis_host
I: If#= 1 Alt= 0 #EPs= 2 Cls=0a(data ) Sub=00 Prot=00 Driver=rndis_host
I: If#= 2 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage
I: If#= 3 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=43 Prot=01 Driver=(none)
I: If#= 4 Alt= 0 #EPs= 1 Cls=02(commc) Sub=02 Prot=01 Driver=(none)
I: If#= 5 Alt= 0 #EPs= 2 Cls=0a(data ) Sub=00 Prot=00 Driver=(none)
I am not sure why If#=3, 4 and 5 are not loaded.

This means you already have the ACM driver:

CONFIG_USB_ACM=m
CONFIG_USB_F_ACM=y
CONFIG_USB_CONFIGFS_ACM=y

The two which are “=y” are directly compiled into the kernel, so they always exist, cannot be unloaded, and will never have a module to find. The “=m” one will have a module. What do you see from:

cd /lib/modules/$(uname -r)/kernel
find . -iname '*acm*'

What do you see from:

modprobe cdc-acm
lsmod | grep -i 'acm'

Also, what do you see from:
dmesg | grep -i 'acm'

Now I have this question for you: What was the purpose of the udev rule, and have you created this or edited this? What is the history of working on udev triggers? Does some software you have require renaming the serial port?

Hi @linuxdev I was able to make the cdc_acm.ko based on your earlier suggestion for another question and the repo by JetsonHacks GitHub - jetsonhacks/jetson-linux-build: Tools to build the Linux kernel and modules on board Jetson Developer Kits. I changed their getKernelSources.sh to download the right source files for 4.6.5 and their example build-module.sh to build cdc_acm.ko. After that it is working now.
Udev rule is actually given by the drone manufacturer DJI. I am using it as per their instruction.

Glad it worked out. udev itself is quite useful for manufacturers; it allows them to use standard generic drivers, but still rename their USB device to something just for them after they identify their specific device.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.