1

I would like to read a serial input (as for example here) in linux command line but I am not able to find out the attached device (Arduino) path.

I can identify the device:

# lsusb
Bus 005 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 003: ID 2341:0043 Arduino SA Uno R3 (CDC ACM)  <- this one
Bus 004 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

but dmesg is showing only this message related

# dmesg | grep usb
[15026545.556311] usb 4-1: new full-speed USB device number 3 using xhci-hcd
[15026545.697929] usb 4-1: ep 0x82 - rounding interval to 1024 microframes, ep desc says 2040 microframes

what also confuses me, is that lspci is not showing this device:

# lspci
00:01.0 PCI bridge: Marvell Technology Group Ltd. Device 6820 (rev 04)
00:02.0 PCI bridge: Marvell Technology Group Ltd. Device 6820 (rev 04)
00:03.0 PCI bridge: Marvell Technology Group Ltd. Device 6820 (rev 04)
01:00.0 Network controller: Qualcomm Atheros AR9287 Wireless Network Adapter (PCI-Express) (rev 01)
02:00.0 Network controller: Qualcomm Atheros QCA986x/988x 802.11ac Wireless Network Adapter

looking through /dev directory:

# ls /dev/
autofs              kmsg                network_latency     ram4                ttyS12
btrfs-control       log                 network_throughput  ram5                ttyS13
bus                 mapper              null                ram6                ttyS14
console             mem                 port                ram7                ttyS15
cpu_dma_latency     memory_bandwidth    ppp                 ram8                ttyS2
full                mmcblk0             ptmx                ram9                ttyS3
fuse                mmcblk0boot0        pts                 random              ttyS4
hwrng               mmcblk0boot1        ram0                root                ttyS5
i2c-0               mmcblk0p1           ram1                rtc0                ttyS6
i2c-1               mmcblk0rpmb         ram10               shm                 ttyS7
i2c-2               mtd0                ram11               snd                 ttyS8
i2c-3               mtd0ro              ram12               spidev0.2           ttyS9
i2c-4               mtd1                ram13               tty                 ubi_ctrl
i2c-5               mtd1ro              ram14               ttyS0               urandom
i2c-6               mtdblock0           ram15               ttyS1               watchdog
i2c-7               mtdblock1           ram2                ttyS10              watchdog0
i2c-8               net                 ram3                ttyS11              zero

I am able to find out these things:

  1. no ttyUSB*/ttyACM* path created
  2. the path to the device is /dev/bus/usb/004/003
  3. it is USB 3.0 that should use xhci-hcd

There is one more output, that confuses me even more (the iProduct line that says 2(error)):

# lsusb -v -s 004:003

Bus 004 Device 003: ID 2341:0043 Arduino SA Uno R3 (CDC ACM)
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               1.10
  bDeviceClass            2 Communications
  bDeviceSubClass         0
  bDeviceProtocol         0
  bMaxPacketSize0         8
  idVendor           0x2341 Arduino SA
  idProduct          0x0043 Uno R3 (CDC ACM)
  bcdDevice            0.01
  iManufacturer           1 Arduino (www.arduino.cc)
  iProduct                2 (error)
  iSerial               220 8553130343135121F1A0
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           62
    bNumInterfaces          2
    bConfigurationValue     1
    iConfiguration          0
    bmAttributes         0xc0
      Self Powered
    MaxPower              100mA
    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              0
      CDC Header:
        bcdCDC               10.01
      CDC ACM:
        bmCapabilities       0x06
          sends break
          line coding and serial state
      CDC Union:
        bMasterInterface        0
        bSlaveInterface         1
      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             255
    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     0x04  EP 4 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               1
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x83  EP 3 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               1
Device Status:     0x0000
  (Bus Powered)

Is it a sign that device malfunctions in this environment? Can you help me to find out, how can I find attached address for this device?

Background info: the system I am running here is TurrisOS (OpenWrt based). Tested also Debian/Mint/Ubuntu/Manjaro and all of these are attaching the USB without any problem (the device itself is not corrupted).

EDIT: this is dmesg related output when usbserial drivers installed:

[15707335.904584] usbserial: USB Serial support registered for carelink
[15707335.904622] usbserial: USB Serial support registered for zio
[15707335.904657] usbserial: USB Serial support registered for funsoft
[15707335.904686] usbserial: USB Serial support registered for flashloader
[15707335.904714] usbserial: USB Serial support registered for google
[15707335.904743] usbserial: USB Serial support registered for libtransistor
[15707335.904771] usbserial: USB Serial support registered for vivopay
[15707335.904802] usbserial: USB Serial support registered for moto_modem
[15707335.904832] usbserial: USB Serial support registered for motorola_tetra
[15707335.904863] usbserial: USB Serial support registered for novatel_gps
[15707335.904891] usbserial: USB Serial support registered for hp4x
[15707335.904917] usbserial: USB Serial support registered for suunto
[15707335.904944] usbserial: USB Serial support registered for siemens_mpi
[15707336.867539] usbcore: registered new interface driver ti_usb_3410_5052
[15707336.867582] usbserial: USB Serial support registered for TI USB 3410 1 port adapter
[15707336.867611] usbserial: USB Serial support registered for TI USB 5052 2 port adapter
[15721145.188760] usb 4-1: new full-speed USB device number 4 using xhci-hcd
[15721145.330360] usb 4-1: ep 0x82 - rounding interval to 1024 microframes, ep desc says 2040 microframes

EDIT 2: When I googled around, I found this script which clearly claims, that I need to:

opkg install kmod-usb-acm

in order to attach these devices.

1 Answer 1

1

You need the kernel modules that will recognize the Arduino and automatically create the serial port device.

According to OpenWrt's documentation: Connect an Arduino to OpenWrt:

Please install the following packages (with “opkg install” if you are with terminal or with LuCi Software page)

kmod-usb-serial kmod-usb-serial-ark3116 kmod-usb-serial-belkin kmod-usb-serial-ch341 kmod-usb-serial-cp210x kmod-usb-serial-ftdi kmod-usb-serial-mct kmod-usb-serial-mos7720 kmod-usb-serial-oti6858 kmod-usb-serial-pl2303 kmod-usb-serial-simple kmod-usb-serial-ti-usb

In practice you will probably need only one of these if you can identify what is the usb-to-serial chip used in your arduino (or clone). They don't need much space anyway, so if you are unsure or lazy you can just install all.

As stated in the comments, to that list you might need to also add kmod-usb-acm.

3
  • Being lazy installed it all, but dmesg still not showing message "assigned device to /dev/ttyUSB0". I can see there a bunch of messages related to various (usbserial) devices I installed and the new one recognized as ti_usb_3410_5052 but finally ending up with same messages I discovered in my question.
    – Kube Kubow
    May 31, 2021 at 17:21
  • What finally helped me was opkg install kmod-usb-acm but I will accept your answer as this was also a part of a problem.
    – Kube Kubow
    Jun 1, 2021 at 0:29
  • Thanks! I will add this it to the question, so that the information is available right away. Maybe it's because it's not Openwrt but a derivative. Jun 1, 2021 at 1:14

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .