59

I just did a fresh install of Ubuntu 22.04 and it broke support for CH340 USB to serial adapter based devices. (support was native in 20.04)
When I do /$ ls /dev there is no ttyUSB0 entry in the list.
If I do /$ lsusb I do get : Bus 003 Device 002: ID 1a86:7523 QinHeng Electronics CH340 serial converter

If I do /$ lsmod I can see the right module is loaded : ch34x 24576 0

I tried to manually create the node with mknod /dev/ttyUSB0 c 188 0 and chmod it to 777 but it doesn't work either.

Any help is welcome :)

catmembert
  • 1,141
  • 1
  • 6
  • 9

4 Answers4

92

Unless you are using a braille display this should do the trick:

sudo apt remove brltty 

Don't forget to plug your dongle off and on.

45

This happens because of conflict between product IDs (a Braille screen reader and my CH340 based chip). Here is the solution :

  1. Edit /usr/lib/udev/rules.d/85-brltty.rules
  2. Search for this line and comment it out:
    ENV{PRODUCT}=="1a86/7523/*", ENV{BRLTTY_BRAILLE_DRIVER}="bm", GOTO="brltty_usb_run"
    
  3. reboot

More on https://unix.stackexchange.com/questions/670636/unable-to-use-usb-dongle-based-on-usb-serial-converter-chip

Pablo Bianchi
  • 17,371
catmembert
  • 1,141
  • 1
  • 6
  • 9
1

I had this due to a kernel issue.

The 5.4.0-99-generic modules package had no usb serial drivers, while 4.15.0-96-generic did. They are also in linux-modules-5.4.0-99-lowlatency. Those cannot be used due to a different module format. Pretty much all of them do, but seems there was this one that was wrongly packaged and of course released without checking.

in short, steps in that case

  1. check if the drivers are available

$ find /lib/modules/$( uname -r ) | grep usb/serial

  1. try to reinstall -generic
  2. still not functioning
  3. regret everything
  4. remove the 5.4 line kernel which seems some kind of forward port from 18.04?! and switch to 4.15.0 / linux-generic
  5. find it's still not working and manually load the ftdi_sio driver.
  6. find it's still not working as the driver did not fully attach to the device in-kernel
  7. remember a workaround that was really helpful on Windows 95 Rel2.0 which introduced USB support and as such still had a lot of little problems
  8. try that workaround: re-plug the usb device
  9. see that it now loads and is fully functional
  10. wonder what was the point of working in IT, from PC sales clerk & assembly, to helpdesk, to second level, to third level, to consulting, if I could still be overclocking MMX pentiums, play Quake or Falcon 4.0 and deal with the same issues as in 1997!
1

Ubuntu 23.04 with PlatformIO... I've had these same issues, and applied all of the fixes above at various times successfully. It is broken again. The same port doesn't exist error messages even though the d1-mini connects and disconnects... and permissions/groups are setup!

My Solution... The issue seems to be with how the port is specified... ttyUSB0 no longer works. Use /dev/ttyUSB0 instead.

Testing outside of platformio was to install esptool with:

sudo apt install esptool

Then attempt various port strings using:

esptool --port /dev/ttyUSB0 read_mac

For platformio add this line to the [env] section of platformio.ini file:

upload_port = /dev/ttyUSB0