我要清除minicom terminal
来自 UART 的屏幕连接到 PC /dev/ttyUSB0
.我知道如何在 PC 中使用快捷方式 Ctrl + A then Z and select C
或 Ctrl + A then C
.现在我想通过使用 UART 来做同样的事情。这个怎么做?
最佳答案
Now I wanted to do the same by using UART.
UART 用于简单地传输数据。 UART 没有访问权限,也无法清除或控制 迷你通终端屏幕/窗口。
也许您在问串行连接的远程端如何清除屏幕,例如通过发送命令序列?
这个答案取决于哪个
terminal emulation
(例如 ANSI 或 VT102)配置为 迷你通终端,并且如果该终端定义具有 erase screen
命令字符串(又名转义序列)。原来
erase screen
ANSI 和 VT102 终端的转义序列相同。Esc[2J Erase Display:
Clears the screen and moves the cursor to the home position (line 0, column 0).
当迷你通终端接收(从远程端或启用本地回显时)
Esc[2J
的 4 字节字符序列,这个转义序列被拦截,不显示,然后终端窗口会被清空。四个字符是:
Esc the ASCII Escape character, value 0x1B.
[ the ASCII left square brace character, value 0x5B.
2 the ASCII character for numeral 2, value 0x32.
J the ASCII character for the letter J, value 0x4A.
引用
ANSI Escape sequences
ANSI/VT100 Terminal Control Escape Sequences .
关于ubuntu - 如何使用串行UART清除minicom终端的屏幕,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60293014/