USB serial driver for USB to UART chip ch340, ch341, etc. In fact Linux mainline kernels have built-in ch341 serial driver since kernel version 2.6.24. The location is: drivers/usb/serial/ch341.c, it's a pity that the built-in driver cannot be kept up to date. We suggest our customers use this driver. 1. Open "Terminal" 2. Switch to "driver" directory 3. Compile the driver using "make", you will see the module "ch341.ko" if successful 4. Type "sudo make load" or "sudo insmod ch341.ko" to load the driver dynamically 5. Type "sudo make unload" or "sudo rmmod ch341.ko" to unload the driver 6. Type "sudo make install" to make the driver work permanently 7. Type "sudo make uninstall" to remove the driver 8. You can refer to the link below to acquire uart application, you can use gcc or Cross-compile with cross-gcc https://github.com/WCHSoftGroup/tty_uart Before the driver works, you should make sure that the usb device has been plugged in and is working properly, you can use shell command "lsusb" or "dmesg" to confirm that, USB VID of these devices are [1a86], you can view all IDs from the id table which defined in "ch341.c". If the device works well, the driver will created tty devices named "ttyCH341USBx" in /dev directory. ## Note Any question, you can send feedback to mail: tech@wch.cn翻译
时间: 2024-04-25 09:27:29 浏览: 231
Development board USB to serial CH340 driver
这段话是关于使用USB转UART芯片ch340、ch341等的USB串行驱动程序的说明。实际上,Linux主线内核自2.6.24版本起就内置了ch341串行驱动程序,但遗憾的是内置驱动无法保持最新状态。建议客户使用此驱动程序。具体操作步骤如下:
1. 打开“终端”
2. 切换到“driver”目录
3. 使用“make”编译驱动程序,如果成功将看到“ch341.ko”模块
4. 输入“sudo make load”或“sudo insmod ch341.ko”以动态加载驱动程序
5. 输入“sudo make unload”或“sudo rmmod ch341.ko”以卸载驱动程序
6. 输入“sudo make install”以使驱动程序永久工作
7. 输入“sudo make uninstall”以删除驱动程序
8. 您可以参考链接获取UART应用程序,可以使用gcc或交叉编译工具cross-gcc
在驱动程序工作之前,您应确保USB设备已插入并正常工作,您可以使用shell命令“lsusb”或“dmesg”来确认,这些设备的USB VID为[1a86],您可以从“ch341.c”中定义的ID表中查看所有ID。如果设备工作正常,驱动程序将在/dev目录中创建名为“ttyCH341USBx”的tty设备。
请注意,如果有任何问题,您可以发送反馈邮件至tech@wch.cn。
阅读全文