1,使得终端重定向到串口/dev/ttyAMA2
microcom -t 10000 -s 115200 /dev/ttyAMA2
关闭/开启终端的回显
stty -echo
stty echo
setconsole,百度百科说“setconsole [video][serial][ttya][ttyb],设置系统终端”,我没有用过!
2,如何判断一个串口对应的是哪个设备节点?
cat /proc/tty/driver/serial
#cat /proc/tty/driver/serial
serinfo:1.0 driver revision:
0: uart:8250 mmio:0x44E09000 irq:158 tx:459413 rx:2997 RTS|CTS|DTR|DSR
1: uart:8250 mmio:0x48022000 irq:159 tx:85 rx:0 CTS|DSR|CD|RI
2: uart:unknown port:00000000 irq:0
3: uart:unknown port:00000000 irq:0
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