ttyACM0 在一段时间后停止流式传输

ttyACM0 在一段时间后停止流式传输

我有一个 arduino 设备,可以读取光传感器,然后结果可以通过其 USB 端口传输。在 Windows 上,使用名为的软件,Serial Osciloscope我可以读取设备发送的数据。但是当我运行

sudo cat /dev/ttyACM0

显示一些数据(约 450 行)后它保持停止状态。

请帮助我,任何帮助都将非常感谢。

提前致谢。

PS:这是命令的输出

...
0,0,0,0,0.000000,0.000000
0,0,0,0,0,0,0,0,8,1,2,4,2,0,0,0
1,0,0,4,2,4,0,0,0,0,3,6,4,0,0,0
0,0,0,2,0,0,0,1,0,1,2,0,0,0,0,0
0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0
0,0,0,4,0.000000,0.000000
4,4,3,0,0,0,0,0,0,0,0,0,0,4,0,3
1,12,2,10,3,0,0,0,7,2,1,0,5,0,0,1
0,0,0,0,0,0,0,1,0,1,1,1,1,0,0,0
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
0,0,0,0,0.000000,0.000000
6,3,0,0,0,0,0,0,1,0,0,2,4,1,3,3
0,0,5,0,0,1,0,5,2,9,3,4,0,0,0,0
0,0,0,0,0,0,1,0,1,0,1,1,0,0,0,0
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
# hang on this line.

答案1

通过从以下链接添加 udev 规则来解决https://www.pjrc.com/teensy/49-teensy.rules

ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="04[789B]?", ENV{ID_MM_DEVICE_IGNORE}="1"
ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="04[789A]?", ENV{MTP_NO_PROBE}="1"
SUBSYSTEMS=="usb", ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="04[789ABCD]?", MODE:="0666"
KERNEL=="ttyACM*", ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="04[789B]?", MODE:="0666"

另存为/etc/udev/rules.d/49-teensy.rules

相关内容