1

Тема: LGT8F328 CH340

http://forum.rcl-radio.ru/uploads/images/2024/01/46a1fb9ac189343be1a521b945af8e35.png

https://raw.githubusercontent.com/nulllaborg/arduino_nulllab/master/package_nulllab_boards_index.json

linux

https://github.com/juliagoda/CH341SER.git

make
sudo make load

http://forum.rcl-radio.ru/uploads/images/2024/01/93f033c02b5e1af9eed7b38deec719ea.png

2

Re: LGT8F328 CH340

Install CH340 Driver Linux
When the download is complete, please extract the CH341SER-master.zip file.

Open a terminal and navigate to the CH341SER-master folder.

For example, the location of the extracted file is in the “Downloads” folder, then enter into that folder using the command:

cd Downloads/CH341SER-master

If you look, some files like this:

neon@linux:~/Downloads/CH341SER-master$ ls -l
total 92
-rw-rw-r-- 1 neon neon 35395 Jul  2 00:08 ch34x.c
drwxrwxr-x 2 neon neon  4096 Jul  2 00:08 images
-rw-rw-r-- 1 neon neon 35149 Jul  2 00:08 LICENSE
-rw-rw-r-- 1 neon neon   332 Jul  2 00:08 Makefile
-rw-rw-r-- 1 neon neon  5866 Jul  2 00:08 README.md
-rw-rw-r-- 1 neon neon   531 Jul  2 00:08 readme.txt

Use the following command to compile:

make

After that, you will see there are files created.

Then use the following command to make load:

sudo make load

Replug Device
After this, replug the device and reload the application you are using. In the example of this article, I used the Arduino IDE application.

If it doesn’t appear, please logout/reboot your Linux operating system.

3

Re: LGT8F328 CH340

liman28@liman28-DEPO-VIP:~$ cd /home/liman28/CH341SER_LINUX
liman28@liman28-DEPO-VIP:~/CH341SER_LINUX$ make clean
rm -rf .tmp_versions Module.symvers *.mod.c *.o *.ko .*.cmd Module.markers modules.order
liman28@liman28-DEPO-VIP:~/CH341SER_LINUX$ make
make -C /lib/modules/4.9.0-040900-generic/build  M=/home/liman28/CH341SER_LINUX  
make[1]: вход в каталог «/usr/src/linux-headers-4.9.0-040900-generic»
  LD      /home/liman28/CH341SER_LINUX/built-in.o
  CC [M]  /home/liman28/CH341SER_LINUX/ch34x.o
/home/liman28/CH341SER_LINUX/ch34x.c: In function ‘ch34x_close’:
/home/liman28/CH341SER_LINUX/ch34x.c:591:15: warning: unused variable ‘wait’ [-Wunused-variable]
  wait_queue_t wait;
               ^
/home/liman28/CH341SER_LINUX/ch34x.c:590:7: warning: unused variable ‘timeout’ [-Wunused-variable]
  long timeout;
       ^
/home/liman28/CH341SER_LINUX/ch34x.c:589:6: warning: unused variable ‘bps’ [-Wunused-variable]
  int bps;
      ^
  Building modules, stage 2.
  MODPOST 1 modules
  CC      /home/liman28/CH341SER_LINUX/ch34x.mod.o
  LD [M]  /home/liman28/CH341SER_LINUX/ch34x.ko
make[1]: выход из каталога «/usr/src/linux-headers-4.9.0-040900-generic»
liman28@liman28-DEPO-VIP:~/CH341SER_LINUX$ sudo make load
[sudo] пароль для liman28: 
modprobe usbserial
insmod ch34x.ko
liman28@liman28-DEPO-VIP:~/CH341SER_LINUX$ sudo rmmod ch341
liman28@liman28-DEPO-VIP:~/CH341SER_LINUX$ lsmod | grep ch34
ch34x                  20480  0
usbserial              53248  1 ch34x