CH340 Linux driver Tutorial

Official website address: http://www.wch.cn/downloads/category/30.html

In the official Linux kernel version in the future since it is included by default on Kernel2.6 driver support CH340 / CH341 chip, but sorry that the drive comes with an older version (submitted by the open source community developers) can not meet the needs of , so we need a new driver chip with official website provides links to be replaced.

1. First, go to the official website to download the latest drivers, download links and drive profiles, see my other blog: Under each platform drive CH340

2. After driver download, copy it to linux system, you first need to be removed before using the old driver, so as to prevent even new drive old drive installed is still in force. The default drive directory system as: / lib / modules / (uname -r) / kernel / drivers, old drivers of the full path name: / lib / modules / (uname -r) / kernel / drivers, old drivers of the full path name : / lib / modules / (uname -r) /kernel/drivers/usb/serial/ch341.ko, we enter into the directory, and then delete it off, as follows:

3. Extract and compile new driver installation process is as follows in FIG.

In fact it is a four-step operation:

root@ubuntu:/#unzip CH341SER_LINUX.ZIP  
root@ubuntu:/#cd CH341SER_LINUX  
root@ubuntu:/#make  
root@ubuntu:/#make load  
  • 1
  • 2
  • 3
  • 4

Where particular attention to the implementation process and the results after the third step make, if not successfully generate ch34x.ko then you need to look at the reasons given prompt, and then to find or consult [email protected] corresponding problem. After insertion make load CH340 hardware, enter the command: the dmesg system log information, as shown below:

 

If the information shown on the map will be successful, and the resulting device node name is ttyUSB0, we can go to the / dev directory view, you will find a device file / dev / ttyUSB0, then the rest of the operation is similar to Windows operating system as simple as a COM port, serial port software commonly used on Linux and instructions can be found at my other blog.

If you want after each boot system can automatically load the driver, it is also very simple just two steps to copy the file to the next generation of ch34x.ko original old-driven directory and execute the depmod command on it, if not explicitly refer to I have a blog: Linux system boot automatically load the driver module

Published 25 original articles · won praise 4 · views 20000 +

Guess you like

Origin blog.csdn.net/zhou8400/article/details/102548719