Difference between revisions of "WeMOS: Install Driver CH340 di Ubuntu 22.04"

From OnnoWiki
Jump to navigation Jump to search
 
Line 56: Line 56:
 
  [  285.019883] ch34x ttyUSB0: ch34x converter now disconnected from ttyUSB0
 
  [  285.019883] ch34x ttyUSB0: ch34x converter now disconnected from ttyUSB0
 
  [  285.019895] ch34x 3-4.2:1.0: device disconnected
 
  [  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
 
then, I find : https://unix.stackexchange.com/questions/670636/unable-to-use-usb-dongle-based-on-usb-serial-converter-chip
Line 65: Line 71:
 
  done
 
  done
 
  sudo udevadm control --reload-rules
 
  sudo udevadm control --reload-rules
 
  
 
==Referensi==
 
==Referensi==
  
 
* https://0xsuk.github.io/posts/2022-07-19-how-to-install-ch340-on-ubuntu-22.04/
 
* https://0xsuk.github.io/posts/2022-07-19-how-to-install-ch340-on-ubuntu-22.04/

Latest revision as of 08:18, 23 February 2024

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`/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 ch341


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 ch34x

Pastikan keluar

[53125.787403] usbcore: registered new interface driver ch34x
[53125.787447] usbserial: USB Serial support registered for ch34x
[53388.562160] ch34x 1-1:1.0: ch34x converter detected
[53388.562228] Modules linked in: ch34x(OE) exfat ntfs3 ses enclosure scsi_transport_sas uas usb_storage cmac nls_utf8 cifs cifs_arc4 cifs_md4 fscache netfs cp210x pcspkr usbserial vboxnetadp(OE) vboxnetflt(OE) vboxdrv(OE) xt_CHECKSUM xt_MASQUERADE xt_conntrack ipt_REJECT nf_reject_ipv4 xt_tcpudp nft_compat nft_chain_nat nf_nat nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 nf_tables libcrc32c nfnetlink bridge stp llc binfmt_misc nls_iso8859_1 snd_hda_codec_realtek snd_hda_codec_generic snd_hda_codec_hdmi uvcvideo ledtrig_audio snd_hda_intel snd_intel_dspcfg snd_intel_sdw_acpi intel_rapl_msr videobuf2_vmalloc intel_rapl_common snd_hda_codec videobuf2_memops intel_tcc_cooling snd_usb_audio x86_pkg_temp_thermal intel_powerclamp snd_hda_core snd_usbmidi_lib videobuf2_v4l2 snd_hwdep snd_seq_midi snd_seq_midi_event videobuf2_common snd_rawmidi snd_pcm snd_seq coretemp videodev nvidia_uvm(POE) mc nvidia_drm(POE) nvidia_modeset(POE) snd_seq_device snd_timer mei_pxp mei_hdcp cdc_acm joydev snd
[53388.562797]  ch34x_attach+0x127/0x344 [ch34x]
[53388.563953] usb 1-1: ch34x converter now attached to ttyUSB0




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

Referensi