无法在 ubuntu20.04 版本上使用 cat 命令从 USB CDC-ACM 端口读取数据

无法在 ubuntu20.04 版本上使用 cat 命令从 USB CDC-ACM 端口读取数据

我正在研究 USB2.0 版本,并且我获得了对 USB 设备作为 CDC-ACM 的支持,当我在 ubuntu 版本 18.04 上使用 cat 命令(cat /dev/ttyACM0)从 USB 串行端口读取数据作为 CDC-ACM 时,它工作正常,但如果我在 ubuntu 版本 20.04 上读取数据,则会出现同样的情况,无法在串行端口 /dev/ttyACM0 上看到任何数据。

但是,当我通过 minicom 读取数据而不是使用 cat 命令读取数据时,我能够在 cat /dev/ttyACM0 和 minicom 上看到数据。有人能帮我解决 ubuntu 版本 20.04 上的这个问题吗?

mahesh@alif:~$ sudo dmesg | grep -i -B 3 -A 3 "tty"
[sudo] password for mahesh: 
[    0.092918] random: crng done (trusting CPU's manufacturer)
[    0.092931] vt handoff: transparent VT on vt#7
[    0.092936] Console: colour dummy device 80x25
[    0.092945] printk: console [tty0] enabled
[    0.092957] ACPI: Core revision 20201113
[    0.093312] clocksource: hpet: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 99544814920 ns
[    0.093432] APIC: Switch to symmetric I/O mode setup
--
[    6.990870] Bluetooth: hci0: Applying Intel DDC parameters completed
[    6.993750] Bluetooth: hci0: Firmware revision 0.0 build 121 week 36 2020
[    7.056168] NET: Registered protocol family 38
[   12.352435] Bluetooth: RFCOMM TTY layer initialized
[   12.352443] Bluetooth: RFCOMM socket layer initialized
[   12.352445] Bluetooth: RFCOMM ver 1.11
[   12.477545] usb 3-1: new high-speed USB device number 7 using xhci_hcd
--
[  167.519865] usb 3-1: Product: Devkit
[  167.519867] usb 3-1: Manufacturer: AlifSemiconductor
[  167.519870] usb 3-1: SerialNumber: 1200
[  167.660774] cdc_acm 3-1:1.0: ttyACM0: USB ACM device
[  167.661076] usbcore: registered new interface driver cdc_acm
[  167.661079] cdc_acm: USB Abstract Control Model driver for USB modems and ISDN adapters
[  389.080284] usb 3-1: USB disconnect, device number 11
--
[ 6362.777338] usb 3-1: Product: Devkit
[ 6362.777341] usb 3-1: Manufacturer: AlifSemiconductor
[ 6362.777343] usb 3-1: SerialNumber: 1200
[ 6362.891193] cdc_acm 3-1:1.0: ttyACM0: USB ACM device
[ 8939.102415] usb 3-1: USB disconnect, device number 12
[11474.821283] usb 3-1: new high-speed USB device number 13 using xhci_hcd
[11474.970514] usb 3-1: New USB device found, idVendor=0525, idProduct=a4a7, bcdDevice= 1.00
--
[11474.970528] usb 3-1: Product: Devkit
[11474.970530] usb 3-1: Manufacturer: AlifSemiconductor
[11474.970533] usb 3-1: SerialNumber: 1200
[11475.092167] cdc_acm 3-1:1.0: ttyACM0: USB ACM device
[12473.679173] usb 3-1: USB disconnect, device number 13
[12473.987062] usb 3-1: new full-speed USB device number 14 using xhci_hcd
[12474.251043] usb 3-1: new high-speed USB device number 15 using xhci_hcd
--
[13213.170856] usb 3-1: Product: Devkit
[13213.170859] usb 3-1: Manufacturer: AlifSemiconductor
[13213.170861] usb 3-1: SerialNumber: 1200
[13213.287857] cdc_acm 3-1:1.0: ttyACM0: USB ACM device
[15229.101243] usb 3-1: USB disconnect, device number 18
[15229.102244] xhci_hcd 0000:00:14.0: WARN Cannot submit Set TR Deq Ptr
[15229.102250] xhci_hcd 0000:00:14.0: A Set TR Deq Ptr command is pending.
--
[16741.244573] usb 3-1: Product: Devkit
[16741.244576] usb 3-1: Manufacturer: AlifSemiconductor
[16741.244578] usb 3-1: SerialNumber: 1200
[16741.389087] cdc_acm 3-1:1.0: ttyACM0: USB ACM device
[17028.574150] usb 3-1: USB disconnect, device number 19
[17028.880590] usb 3-1: new high-speed USB device number 20 using xhci_hcd
[17169.054650] usb 3-1: new high-speed USB device number 21 using xhci_hcd
--
[17169.203921] usb 3-1: Product: Devkit
[17169.203924] usb 3-1: Manufacturer: AlifSemiconductor
[17169.203926] usb 3-1: SerialNumber: 1200
[17169.317435] cdc_acm 3-1:1.0: ttyACM0: USB ACM device
[17817.878041] usb 3-1: USB disconnect, device number 21
[17945.487674] usb 3-1: new high-speed USB device number 22 using xhci_hcd
[17945.636935] usb 3-1: New USB device found, idVendor=0525, idProduct=a4a7, bcdDevice= 1.00
--
[17945.636948] usb 3-1: Product: Devkit
[17945.636951] usb 3-1: Manufacturer: AlifSemiconductor
[17945.636953] usb 3-1: SerialNumber: 1200
[17945.774632] cdc_acm 3-1:1.0: ttyACM0: USB ACM device
[123886.633575] kauditd_printk_skb: 31 callbacks suppressed
[123886.633579] audit: type=1400 audit(1668796237.760:42): apparmor="DENIED" operation="capable" profile="/usr/sbin/cups-browsed" pid=7189 comm="cups-browsed" capability=23  capname="sys_nice"
[210268.319025] audit: type=1400 audit(1668882618.858:43): apparmor="DENIED" operation="capable" profile="/usr/sbin/cups-browsed" pid=9625 comm="cups-browsed" capability=23  capname="sys_nice"
--
[338538.725689] usb 3-1: Product: Devkit
[338538.725691] usb 3-1: Manufacturer: AlifSemiconductor
[338538.725694] usb 3-1: SerialNumber: 1200
[338538.837323] cdc_acm 3-1:1.0: ttyACM0: USB ACM device
[339899.088201] usb 3-1: USB disconnect, device number 27
[340341.878586] perf: interrupt took too long (2504 > 2500), lowering kernel.perf_event_max_sample_rate to 79750
[340627.192823] usb 3-1: new high-speed USB device number 28 using xhci_hcd
--
[340627.342104] usb 3-1: Product: Devkit
[340627.342107] usb 3-1: Manufacturer: AlifSemiconductor
[340627.342109] usb 3-1: SerialNumber: 1200
[340627.458160] cdc_acm 3-1:1.0: ttyACM0: USB ACM device
[342966.378444] usb 3-1: USB disconnect, device number 28
[343631.808019] usb 3-1: new high-speed USB device number 29 using xhci_hcd
[343631.957115] usb 3-1: New USB device found, idVendor=0525, idProduct=a4a7, bcdDevice= 1.00
--
[343631.957128] usb 3-1: Product: Devkit
[343631.957131] usb 3-1: Manufacturer: AlifSemiconductor
[343631.957133] usb 3-1: SerialNumber: 1200
[343632.069428] cdc_acm 3-1:1.0: ttyACM0: USB ACM device
[350410.272172] usb 3-1: USB disconnect, device number 29
[469507.966348] audit: type=1400 audit(1669141856.773:45): apparmor="DENIED" operation="capable" profile="/usr/sbin/cups-browsed" pid=17498 comm="cups-browsed" capability=23  capname="sys_nice"
[483030.618048] loop15: detected capacity change from 0 to 113832

问候 Mahesh AVula

相关内容