2

Previously my device could be communicated with via the device file /dev/ttyUSB0, which I could connect to via my terminal emulator. I do not know why, but recently /dev/ttyUSB0 stopped being created when the device is detected, despite enumeration still being logged by dmesg and the device being detected by lsusb. How do I get /dev/ttyUSB0 to be created again?

The device under question is the Freescale device enumerated below as usb-1-3, the exact same device is called "Google Inc. Nexus 7" under the lsusb output (Bus 001 Device 028). The names differ because the hardware is running an Android port which presents itself as the "Nexus 7". It is a NXP i.MX 6 SoM connected via micro-USB.

$ dmesg
[ 1074.879020] usb 1-3: new high-speed USB device number 24 using xhci_hcd
[ 1075.083989] usb 1-3: no configurations
[ 1075.083998] usb 1-3: can't read configurations, error -22
[ 1075.195166] usb 1-3: new high-speed USB device number 25 using xhci_hcd
[ 1075.387420] usb 1-3: no configurations
[ 1075.387428] usb 1-3: can't read configurations, error -22
[ 1075.499143] usb 1-3: new high-speed USB device number 26 using xhci_hcd
[ 1075.521617] usb 1-3: no configurations
[ 1075.521625] usb 1-3: can't read configurations, error -22
[ 1075.687121] usb 1-3: new high-speed USB device number 27 using xhci_hcd
[ 1075.704437] usb 1-3: no configurations
[ 1075.704446] usb 1-3: can't read configurations, error -22
[ 1075.704482] usb usb1-port3: unable to enumerate USB device
[ 1076.275060] usb 1-3: new high-speed USB device number 28 using xhci_hcd
[ 1076.413277] usb 1-3: New USB device found, idVendor=18d1, idProduct=4e42
[ 1076.413285] usb 1-3: New USB device strings: Mfr=2, Product=3, SerialNumber=4
[ 1076.413289] usb 1-3: Product: SABRESD-MX6DQ
[ 1076.413293] usb 1-3: Manufacturer: Freescale
[ 1076.413296] usb 1-3: SerialNumber: 0123456789ABCDEF

$ lsusb
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 004: ID 0bda:0153 Realtek Semiconductor Corp. Mass Storage Device
Bus 001 Device 003: ID 046d:c52b Logitech, Inc. Unifying Receiver
Bus 001 Device 028: ID 18d1:4e42 Google Inc. Nexus 7 (debug)
Bus 001 Device 005: ID 8087:0a2a Intel Corp. 
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub


$ ls /dev/ttyUSB*
ls: cannot access /dev/ttyUSB*: No such file or directory

I have tried different USB cables and different ports, resetting the device in the two different modes, using a hub and not using a hub.

In order to find which device file my USB device was using, I tried the command from https://unix.stackexchange.com/questions/144029/command-to-determine-ports-of-a-device-like-dev-ttyusb0?utm_medium=organic&utm_source=google_rich_qa&utm_campaign=google_rich_qa

Unfortunately, this did not yield the information I was looking for.

The result was:

/dev/input/event4 - Logitech_USB_Receiver
/dev/input/mouse0 - Logitech_USB_Receiver
/dev/hidraw1 - Logitech_USB_Receiver
/dev/input/event5 - Logitech_USB_Receiver
/dev/hidraw2 - Logitech_USB_Receiver
/dev/hidraw0 - Logitech_USB_Receiver
/dev/usb/hiddev0 - Logitech_USB_Receiver
/dev/bsg/4:0:0:0 - Generic-_SD_MMC_MS_PRO_20120926571200000-0:0
/dev/sdc - Generic-_SD_MMC_MS_PRO_20120926571200000-0:0
/dev/sg2 - Generic-_SD_MMC_MS_PRO_20120926571200000-0:0

At one point I had a script that piped echo output into /dev/ttyUSB0 using echo 'mytext' > /dev/ttyUSB0. One day I realized the /dev/ttyUSB0 did not actually exist, so the script had simply created a text a file. I deleted that text file because I was afraid it would interfere with creating the device file of the same name. I don't know if this could be related.

I am on Ubuntu 14.04.

Thanks in advance!

1
  • There are plenty of error messages in your log, as you may have noticed. If you already tried different cables and ports, likely something in the device is broken, for whatever reason. If the USB configuration enumeration is incomplete/faulty, the correct kernel driver can't load (and wouldn't work even if loaded). Which means no /dev/tty/USB0.
    – dirkt
    May 12, 2018 at 6:53

1 Answer 1

1

You can use the mknod command to create entries in /dev.

Try mknod /dev/ttyUSB0 c 188 n

See man mknod and Linux Allocated Devices

You must log in to answer this question.

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