用的是CH340C
1. 在Win10下未出现此问题, 在Ubuntu20.04下存在
2. CH340C的RX断开连接, 或目标芯片不发送数据时, 不会disconnect
3. CH340C的RX连接目标芯片, 且目标芯片持续发送数据时, 会定时disconnect, 间隔是固定的, 大概5秒左右
4. 如果在3的情况下, 用 cutecom 打开串口, 或用命令行 screen /dev/ttyUSB0 115200 打开串口, ch340就不会disconnect了, 问题消失
猜测是驱动的问题, 在无软件操作, 且RX不断有接收时接收溢出导致USB重启? 有其他人遇到这个问题吗?
dmesg日志
[?6785.293860]?usb?1-2:?USB?disconnect,?device?number?9 [?6785.294399]?ch341-uart?ttyUSB0:?ch341-uart?converter?now?disconnected?from?ttyUSB0 [?6785.294449]?ch341?1-2:1.0:?device?disconnected [?6787.514022]?usb?1-2:?new?full-speed?USB?device?number?10?using?xhci_hcd [?6787.663705]?usb?1-2:?New?USB?device?found,?idVendor=1a86,?idProduct=7523,?bcdDevice=81.32 [?6787.663725]?usb?1-2:?New?USB?device?strings:?Mfr=0,?Product=2,?SerialNumber=0 [?6787.663734]?usb?1-2:?Product:?USB?Serial [?6787.666624]?ch341?1-2:1.0:?ch341-uart?converter?detected [?6787.667417]?usb?1-2:?ch341-uart?converter?now?attached?to?ttyUSB0 [?6793.398198]?usb?1-2:?USB?disconnect,?device?number?10 [?6793.398810]?ch341-uart?ttyUSB0:?ch341-uart?converter?now?disconnected?from?ttyUSB0 [?6793.398868]?ch341?1-2:1.0:?device?disconnected [?6795.514293]?usb?1-2:?new?full-speed?USB?device?number?11?using?xhci_hcd [?6795.664682]?usb?1-2:?New?USB?device?found,?idVendor=1a86,?idProduct=7523,?bcdDevice=81.32 [?6795.664700]?usb?1-2:?New?USB?device?strings:?Mfr=0,?Product=2,?SerialNumber=0 [?6795.664709]?usb?1-2:?Product:?USB?Serial [?6795.669218]?ch341?1-2:1.0:?ch341-uart?converter?detected [?6795.670888]?usb?1-2:?ch341-uart?converter?now?attached?to?ttyUSB0 [?6800.942508]?usb?1-2:?USB?disconnect,?device?number?11 [?6800.943136]?ch341-uart?ttyUSB0:?ch341-uart?converter?now?disconnected?from?ttyUSB0 [?6800.943191]?ch341?1-2:1.0:?device?disconnected [?6803.030516]?usb?1-2:?new?full-speed?USB?device?number?12?using?xhci_hcd [?6803.180155]?usb?1-2:?New?USB?device?found,?idVendor=1a86,?idProduct=7523,?bcdDevice=81.32 [?6803.180174]?usb?1-2:?New?USB?device?strings:?Mfr=0,?Product=2,?SerialNumber=0 [?6803.180183]?usb?1-2:?Product:?USB?Serial [?6803.183633]?ch341?1-2:1.0:?ch341-uart?converter?detected [?6803.184633]?usb?1-2:?ch341-uart?converter?now?attached?to?ttyUSB0