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

From OnnoWiki
Jump to navigation Jump to search
Line 1: Line 1:
 
Sumber: https://0xsuk.github.io/posts/2022-07-19-how-to-install-ch340-on-ubuntu-22.04/
 
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
 
  sudo su
Line 22: Line 26:
 
  sudo rmmod ch341
 
  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/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
 
  sudo depmod -a
  

Revision as of 21:30, 6 May 2023

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




Referensi