串行设备数据反馈回路可能吗?

Jun*_*ior 2 terminal serial-port

是否可以/dev/ttyS8在一个终端窗口中对串行设备进行一些回显,然后再/dev/ttyS8从该文件中cat和显示数据?

Ale*_*ies 6

如果在指定的串行端口中插入串行环回适配器:是。

Serial Loopback Adapter
Pinout:
* Receive and transmit (2 & 3)
* Request to send and Clear to send (7 & 8)
* Data carrier detect, Data set ready and Data terminal ready (1, 6 & 4)

如果要调试通过串行端口通信的应用程序,可以使用以下命令:

socat /dev/ttyS0,raw,echo=0 SYSTEM:'tee input.txt | socat - "PTY,link=/tmp/ttyV0,raw,echo=0,waitslave" | tee output.txt'
Run Code Online (Sandbox Code Playgroud)

(来自https://unix.stackexchange.com/a/225904/127903