Thursday, July 20, 2023

CH340 setup on RPI 4 with Ubuntu 64bit

 CH340 setup on RPI 4 with Ubuntu 64bit 


based on : 

Remove the Brile for the blind - it will mess up work with COM port and CH340.
sudo apt remove -y brltty
(source https://askubuntu.com/questions/1403705/dev-ttyusb0-not-present-in-ubuntu-22-04)


source: https://learn.sparkfun.com/tutorials/how-to-install-ch340-drivers/all


  • cd into the directory where the files are saved
  • make clean
  • make
  • sudo make load
  • sudo rmmod ch341 to uninstall the broken driver
  • lsmod | grep ch34 to list what modules are currently installed
  • Plug and unplug your CH340 device again on the USB port
  • dmesg
    • Expected output (should show "ch34x" now):
[  xxx] ch34x ttyUSB0: ch34x converter now disconnected from ttyUSB0
[  xxx] ch34x 3-2:1.0: device disconnected

Depending on your root permissions, you may need to configure the serial port with the following two commands. Make sure to adjust the $username with respect to the user ID that is currently logged in.

sudo usermod -a -G dialout $username 
sudo chmod a+rw /dev/ttyUSB0

No comments:

Followers