CH341 Linux驱动 设备驱动连接后又自动关闭

1.uname -r 查看linux版本号

 

2.选择合适内核下的驱动

https://elixir.bootlin.com/linux/v6.8/source/drivers/usb/serial/ch341.c

3.make & make install

4.发现/dev下没有ttyUSB0设备

5.dmesg 发现问题

6043.015612] usb 1-4.2: ch341-uart converter now attached to ttyUSB0
[ 6043.565091] input: BRLTTY 6.4 Linux Screen Driver Keyboard as /devices/virtual/input/input29
[ 6043.664602] usb 1-4.2: usbfs: interface 0 claimed by ch341 while 'brltty' sets config #1
[ 6043.665356] ch341-uart ttyUSB0: ch341-uart converter now disconnected from ttyUSB0
[ 6043.665374] ch341 1-4.2:1.0: device disconnected

6.共用接口0 可能存在风险,冲突解决:systemctl stop brltty  停止该服务或者删除该服务; apt remove --purge brltty

(brltty为盲人提供的系统服务)https://github.com/brltty/brltty

7. 驱动加载,恢复正常

[ 6336.128286] usb 1-4.2: USB disconnect, device number 15
[ 6338.093402] usb 1-4.2: new full-speed USB device number 16 using xhci_hcd
[ 6338.171645] usb 1-4.2: New USB device found, idVendor=1a86, idProduct=7523, bcdDevice= 2.64
[ 6338.171650] usb 1-4.2: New USB device strings: Mfr=0, Product=2, SerialNumber=0
[ 6338.171652] usb 1-4.2: Product: USB Serial
[ 6338.181201] ch341 1-4.2:1.0: ch341-uart converter detected
[ 6338.182529] usb 1-4.2: ch341-uart converter now attached to ttyUSB0
[ 7038.899215] i915 0000:00:02.0: Using 39-bit DMA addresses

posted @ 2025-03-26 10:04  Keepkit  阅读(211)  评论(0)    收藏  举报