シリアルデバイスのデータフィードバックループは可能ですか?

シリアルデバイスのデータフィードバックループは可能ですか?

/dev/ttyS81つの端末ウィンドウでシリアルデバイスにエコーを実行してから、2番目の端末ウィンドウ/dev/ttyS8にそのファイルのデータを表示して表示できますか?

ベストアンサー1

シリアルループバックアダプタが指定されたシリアルポートに接続されている場合:はい。

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'

(からhttps://unix.stackexchange.com/a/225904/127903)

おすすめ記事