为什么“sudo cat /dev/ttyACM0”只运行一次?

为什么“sudo cat /dev/ttyACM0”只运行一次?

我不知道为什么sudo cat /dev/ttyACM0只运行一次。

我有 U-blox EVK-M8T,它可以通过 Ubuntu 终端窗口读取 NMEA 消息。当我设置并输入命令后sudo cat /dev/ttyACM0,它会显示 NMEA 消息,例如:

$GLGSV,3,3,09,87,06,340,*52
$GNGLL,,,,,140236.00,V,N*56
$GNZDA,140236.00,10,03,2017,00,00*7C
$GNRMC,140236.85,V,,,,,,,100317,,,N*68
$GNVTG,,,,,,,,,N*2E
$GNGGA,140236.85,,,,,0,00,99.99,,,,,,*77
$GNGSA,A,1,,,,,,,,,,,,,99.99,99.99,99.99*2E
$GNGSA,A,1,,,,,,,,,,,,,99.99,99.99,99.99*2E
$GPGSV,3,1,12,10,76,330,52,11,03,322,44,12,23,100,47,14,32,270,44*7E
$GPGSV,3,2,12,15,10,077,,18,70,123,46,20,02,130,47,21,22,189,47*73
$GPGSV,3,3,12,24,40,050,49,25,16,142,39,31,13,211,48,32,52,288,50*72
$GLGSV,3,1,09,69,26,096,28,70,62,024,37,71,30,315,29,73,37,171,36*6A
$GLGSV,3,2,09,79,20,030,,80,64,095,31,85,09,235,27,86,20,287,33*62
$GNGLL,,,,,140236.85,V,N*5B
$GNZDA,140236.85,10,03,2017,00,00*71

但突然间,它停止运行,没有碰到任何东西。我不知道为什么,我试图再次运行,但它没有运行。直到我机械地拔下 USB 电缆并再次连接,它才工作。

这样的事一次又一次地发生……

我也尝试使用:stty -F /dev/ttyACM0。但是下面的消息显示空信息:

speed 57600 baud; line = 0;
intr = <undef>; quit = <undef>; erase = <undef>; kill = <undef>; eof = ^A; start = <undef>; stop = <undef>; susp = <undef>; rprnt = <undef>; werase = <undef>; lnext = <undef>; discard = <undef>;
min = 1; time = 0;
-brkint -icrnl ixoff ixany -imaxbel
-opost -onlcr
-isig -icanon -iexten -echo -echoe -echok -echoctl -echoke

这些是什么?

有人知道发生了什么事吗?

相关内容