记录下串口调试命令

记录下正在使用的串口调试命令,防止忘记啦!

1. 查看串口状态:

cat   /proc/tty/drive/serial  

topeet@ubuntu:~$ sudo cat /proc/tty/driver/serial
serinfo:1.0 driver revision:
0: uart:16550A port:000003F8 irq:4 tx:15120 rx:2392 CTS|DSR|CD
1: uart:16550A port:000002F8 irq:3 tx:0 rx:0 CTS|DSR|CD
2: uart:unknown port:000003E8 irq:4
3: uart:unknown port:000002E8 irq:3
4: uart:unknown port:00000000 irq:0
5: uart:unknown port:00000000 irq:0
6: uart:unknown port:00000000 irq:0
7: uart:unknown port:00000000 irq:0
8: uart:unknown port:00000000 irq:0
9: uart:unknown port:00000000 irq:0
10: uart:unknown port:00000000 irq:0
11: uart:unknown port:00000000 irq:0
12: uart:unknown port:00000000 irq:0
13: uart:unknown port:00000000 irq:0
 

2.每秒更新并高亮显示串口状态变化

watch  -n 1 -d  'cat   /proc/tty/drive/serial '

very 1.0s: sudo cat /proc/tty/driver/serial            Fri Apr 26 22:18:28 2019

serinfo:1.0 driver revision:
0: uart:16550A port:000003F8 irq:4 tx:15750 rx:2482 CTS|DSR|CD
1: uart:16550A port:000002F8 irq:3 tx:0 rx:0 CTS|DSR|CD
2: uart:unknown port:000003E8 irq:4
3: uart:unknown port:000002E8 irq:3
4: uart:unknown port:00000000 irq:0
5: uart:unknown port:00000000 irq:0
6: uart:unknown port:00000000 irq:0
 

猜你喜欢

转载自blog.csdn.net/yfkyfk521/article/details/89599928