I am using OpenWRT on a Raspberry Pi 3B+ with OpenWRT firmware: openwrt-23.05.5-bcm27xx-bcm2710-rpi-3-ext4-factory.img. I am using the popular Silicon Labs CP2102 USB-to-UART bridge. So on the USB-side I have the Pi (running OpenWRT) and on the UART side there is another MCU. The Pi and the MCU need to communicate but I cannot do that because the device file is not being created.
My understanding is that necessary USB-to-Serial drivers are installed and working properly, because lsusb is recognizing the device when plugged in. But the device file (like /dev/ttyUSB0 for example) is not being generated. Without this file, I cannot read or write to the serial device connected at the other end.
Here are the outputs of some commands. Serial drivers are installed:
root@OpenWrt:~# opkg list-installed *usb*
brcmfmac-firmware-usb - 20230804-1
kmod-usb-core - 5.15.167-1
kmod-usb-hid - 5.15.167-1
kmod-usb-net - 5.15.167-1
kmod-usb-net-asix-ax88179 - 5.15.167-1
kmod-usb-serial - 5.15.167-1
kmod-usb-storage - 5.15.167-1
libusb-1.0-0 - 1.0.26-3
usbutils - 014-1
USB to Serial device is being recognized:
root@OpenWrt:~# lsusb
Bus 001 Device 008: ID 10c4:ea60 Silicon Labs CP2102 USB to UART Bridge Controller
Bus 001 Device 003: ID 0424:ec00
Bus 001 Device 002: ID 0424:9514
Bus 001 Device 001: ID 1d6b:0002 Linux 5.15.167 dwc_otg_hcd DWC OTG Controller
root@OpenWrt:~# dmesg
[ 0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd034]
...
[ 600.329229] usb 1-1.4: new full-speed USB device number 8 using dwc_otg
[ 600.505809] usb 1-1.4: New USB device found, idVendor=10c4, idProduct=ea60, bcdDevice= 1.00
[ 600.518700] usb 1-1.4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 600.528410] usb 1-1.4: Product: CP2102 USB to UART Bridge Controller
[ 600.537141] usb 1-1.4: Manufacturer: Silicon Labs
[ 600.544168] usb 1-1.4: SerialNumber: 0001
No USB-to-Serial device files:
root@OpenWrt:~# ls /dev/tty*
/dev/tty /dev/tty14 /dev/tty20 /dev/tty27 /dev/tty33 /dev/tty4 /dev/tty46 /dev/tty52 /dev/tty59 /dev/tty8
/dev/tty0 /dev/tty15 /dev/tty21 /dev/tty28 /dev/tty34 /dev/tty40 /dev/tty47 /dev/tty53 /dev/tty6 /dev/tty9
/dev/tty1 /dev/tty16 /dev/tty22 /dev/tty29 /dev/tty35 /dev/tty41 /dev/tty48 /dev/tty54 /dev/tty60 /dev/ttyAMA0
/dev/tty10 /dev/tty17 /dev/tty23 /dev/tty3 /dev/tty36 /dev/tty42 /dev/tty49 /dev/tty55 /dev/tty61 /dev/ttyS0
/dev/tty11 /dev/tty18 /dev/tty24 /dev/tty30 /dev/tty37 /dev/tty43 /dev/tty5 /dev/tty56 /dev/tty62
/dev/tty12 /dev/tty19 /dev/tty25 /dev/tty31 /dev/tty38 /dev/tty44 /dev/tty50 /dev/tty57 /dev/tty63
/dev/tty13 /dev/tty2 /dev/tty26 /dev/tty32 /dev/tty39 /dev/tty45 /dev/tty51 /dev/tty58 /dev/tty7