WeMOS: Install Driver CH340 di Ubuntu 24.04
Jump to navigation
Jump to search
Sumber: https://0xsuk.github.io/posts/2022-07-19-how-to-install-ch340-on-ubuntu-22.04/
sudo su apt -y install dwarves git cp /sys/kernel/btf/vmlinux /usr/lib/modules/`uname -r`/build/
sudo su cd /usr/local/src git clone https://github.com/juliagoda/CH341SER.git cd /usr/local/src/CH341SER make sudo make load
Load module
find . -name *.ko | xargs gzip sudo cp ch34x.ko.gz /usr/lib/modules/$(uname -r)/kernel/drivers/usb/serial
Cek
lsmod | grep ch34
Lanjut dengan
sudo rmmod ch341 sudo mv /usr/lib/modules/$(uname -r)/kernel/drivers/usb/serial/ch341.ko.gz /lib/modules/$(uname -r)/kernel/drivers/usb/serial/ch341.ko.gz~ sudo mv /usr/lib/modules/$(uname -r)/kernel/drivers/usb/serial/ch34x.ko.gz /lib/modules/$(uname -r)/kernel/drivers/usb/serial/ch34x.ko.gz~ sudo depmod -a
Sebelum menjalankan arduino-ide, colok wemos d1 r2 ke USB
cek
dmesg | grep ch34
Pastikan keluar
[ 1089.254128] usbcore: registered new interface driver ch34x [ 1089.254147] usbserial: USB Serial support registered for ch34x
Troubleshooting
[ 284.973396] ch34x 3-4.2:1.0: ch34x converter detected [ 284.973894] usb 3-4.2: ch34x converter now attached to ttyUSB0 [ 285.019333] usb 3-4.2: usbfs: interface 0 claimed by ch34x while 'brltty' sets config #1 [ 285.019883] ch34x ttyUSB0: ch34x converter now disconnected from ttyUSB0 [ 285.019895] ch34x 3-4.2:1.0: device disconnected
Cara paling gampang
sudo apt remove brltty
Cara lain, tapi kurang manjur
then, I find : https://unix.stackexchange.com/questions/670636/unable-to-use-usb-dongle-based-on-usb-serial-converter-chip
use:
for f in /usr/lib/udev/rules.d/*brltty*.rules; do sudo ln -s /dev/null "/etc/udev/rules.d/$(basename "$f")" done sudo udevadm control --reload-rules