我有一台通过 USB 转串行接口插入机器的热敏打印机:
[422487.983278] usb 1-7: new full-speed USB device number 32 using xhci_hcd
[422489.500951] usb 1-7: New USB device found, idVendor=1c8a, idProduct=3011
[422489.500957] usb 1-7: New USB device strings: Mfr=1, Product=2, SerialNumber=6
[422489.500961] usb 1-7: Product: USB To Serial Interface
[422489.500964] usb 1-7: Manufacturer: SWEDA
[422489.500967] usb 1-7: SerialNumber: 0000000000022
[422489.503978] cdc_acm 1-7:1.0: ttyACM0: USB ACM device
它偶尔会打印
AT#PORTCFG?
在热敏纸上。
我猜测有什么东西正在向端口发送命令。
关于如何避免这种情况有什么想法吗?
Ubuntu 18.04.3
答案1
我遇到了这个问题,并使用蛮力找到了解决方案:
# grep -r PORTCFG
Binary file lib/x86_64-linux-gnu/ModemManager/libmm-plugin-telit.so matches
Binary file lib/x86_64-linux-gnu/ModemManager/libmm-plugin-dell.so matches
所以答案是:
# systemctl stop ModemManager.service
并且可选地:
# systemctl disable ModemManager.service