USB serial device does not appear as /dev/ttyUSB*

ArtHome

New Member
Joined
Apr 21, 2019
Messages
1
Reaction score
0
Credits
0
Hi!

I have one device that works fine in Linux Mint and does not work in Docker host from Hass.io (from Alpine) inside OracleVM.

On Linux Mint
My USB modem after inserting appears as mass storage device. Then I switch it to modem using usb_modeswitch and it appears in /dev/ttyUSB0, /dev/ttyUSB1, etc.All is fine - it is picked up by the ModemManage and go on.

Inside Docker host
It successfully switched from mass storage to the same state is in Linux Mint as I can see using lsusb. But nothing new appears in /dev/*.

I can switch device in Linux Mint and transfer it to Docker host (due to OracleVM without unplug) - no results. Or vise versa - virgin device switch inside Docker and transfer from OracleVM to Linux Mint and Linux Mint immediately recognizes it as a modem.

If I connect other USB serial device (Arduino) to OracleVM, the ttyUSB0 is being created properly and disappears after disconnect. Therefore, there are no problems with access rights.

Obviously, the problem is not hardware, f-word piece of iron works well. I spent two days to make sure of it.

Please, advise how to diagnose the problem?
 


This is an old post but I had the same or possibly a similar issue and it took a while to find the answer hence my post.

It sounds like you are using two different OSs. It works fine in Mint but not on an Oracle based VM. In my case the issue was that the kernel module was missing for the device in the VM (Fedora 33).

I found this by using lsusb to find the ID xxxx:yyyy of the device. Here is partial output
Code:
Bus 003 Device 007: ID xxxx:yyyy Silicon Labs Device

Then lsusb -t -v to see the driver in use for the device which is zzzz in this example.
Code:
/:  Bus 03.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/6p, 480M
    ID 1d6b:0002 Linux Foundation 2.0 root hub
    |__ Port 1: Dev 7, If 0, Class=Vendor Specific Class, Driver=zzzz, 12M
        ID xxxx:yyyy Silicon Labs
    |__ Port 1: Dev 7, If 1, Class=Vendor Specific Class, Driver=zzzz, 12M
        ID xxxx:yyyy Silicon Labs

You can use lsmod verify if the driver is loaded.

When in my VM with the device passed through I see the device using lsusb but lsusb -t -v shows the driver is empty:
Code:
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/4p, 480M
    ID 1d6b:0002 Linux Foundation 2.0 root hub
    |__ Port 2: Dev 2, If 0, Class=Vendor Specific Class, Driver=, 12M
        ID xxxx:yyyy Silicon Labs
    |__ Port 2: Dev 2, If 1, Class=Vendor Specific Class, Driver=, 12M
        ID xxxx:yyyy Silicon Labs

running modprobe zzzz shows:
Code:
modprobe: FATAL: Module zzzz not found in directory /lib/modules/5.9.13-200.fc33.x86_64

installing dnf install kernel-modules, updating my kernel and rebooting the box fixed the problem for me. After the reboot I found /dev/ttyUSB0 and /dev/ttyUSB1
 

Members online


Latest posts

Top