Difference between revisions of "WeMOS: Install Driver CH340 di Ubuntu 24.04"
Jump to navigation
Jump to search
Onnowpurbo (talk | contribs) (Created page with "Sumber: https://0xsuk.github.io/posts/2022-07-19-how-to-install-ch340-on-ubuntu-22.04/ sudo su apt install dwarves cp /sys/kernel/btf/vmlinux /usr/lib/modules/`uname -r`/b...") |
Onnowpurbo (talk | contribs) |
||
(2 intermediate revisions by the same user not shown) | |||
Line 2: | Line 2: | ||
sudo su | sudo su | ||
− | apt install dwarves | + | apt -y install dwarves git |
cp /sys/kernel/btf/vmlinux /usr/lib/modules/`uname -r`/build/ | cp /sys/kernel/btf/vmlinux /usr/lib/modules/`uname -r`/build/ | ||
Line 19: | Line 19: | ||
Cek | Cek | ||
− | lsmod | grep | + | lsmod | grep ch34 |
Line 33: | Line 33: | ||
cek | cek | ||
− | dmesg | grep | + | dmesg | grep ch34 |
Pastikan keluar | Pastikan keluar | ||
− | [ | + | [ 1089.254128] usbcore: registered new interface driver ch34x |
− | [ | + | [ 1089.254147] usbserial: USB Serial support registered for ch34x |
− | |||
− | |||
− | |||
− | |||
Latest revision as of 10:25, 10 May 2024
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