[SOLVED]/dev/ttyUSB0 - where is it?

How do I use a USB-Serial adapter with OpenWrt?

It doesn't seem to recognise the device. dmesg doesn't even acknowledge that something has been plugged in.

You need to install support for it. Update the package list and search for kmod-usb-serial.

Unknown package 'kmod-usb-serial'.

  • Did you run opkg update first?
  • If yes, are you running a custom firmware?

I had run opkg update earlier, but forgotten that I had rebooted.

It is installed now but I still don't see a /dev/ttyUSB0 and no msg appears on the console or in dmesg when any serial device is plugged into a USB slot. BTW this is on a ThinkPad.

Did you reboot after install, or run the modprobe???

What is modprobe?

I ran it and got:-

modeprobe [-q] filename

Have you installed the appropriate driver module? For instance kmod-usb-serial-ch341 if that's what you have.

I have now. Apologies for all these questions but I really am new to OpenWrt and don't really know what it comes with and what needs to be added later.

I've installed this module which is for the correct adapter, I think, but it doesn't show up when I run lsusb.

On another system it shows that it has a VID:PID of 1a86:7523 and is actually an HL-340 USB-Serial adapter. Is there also a 340 module available?

There still isn't a /dev/ttyUSB0 when I plug the adapter in.

That should work with kmod-usb-serial-ch341

It doesn't yet. Maybe there is another missing pkg... I am using 18.06 rc1 if that makes any difference.

Any offers as to how to make /dev/ttyUSB0 appear?

did run lsmod to check kmod are installed

For Example

# opkg install kmod-usb-serial-ch341
Installing kmod-usb-serial-ch341 (4.4.140-1) to root...
Downloading http://downloads.lede-project.org/releases/17.01.5/targets/lantiq/xway/packages/kmod-usb-serial-ch341_4.4.140-1_mips_24kc.ipk
Installing kmod-usb-serial (4.4.140-1) to root...
Downloading http://downloads.lede-project.org/releases/17.01.5/targets/lantiq/xway/packages/kmod-usb-serial_4.4.140-1_mips_24kc.ipk
Configuring kmod-usb-serial.
Configuring kmod-usb-serial-ch341.

# lsmod | grep ch341
ch341                   4032  0 
usbserial              18208  1 ch341

Also can you install usbutils and run lsusb to check if the device is detetced.


ch341       12288    0
usbserial   20480   1  ch341 

Also the version numbers are slightly different. 4.14.50-1 here. This is for 18.06-rc1.

The only other thing I can think of but not sure is you may need to install USB Basic Support.


1 Like

Thanks, I think it was kmod-usb-uhci that fixed it.

1 Like

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