シリアルポートとの通信に問題がありますか?

シリアルポートとの通信に問題がありますか?

Linuxのシリアルポート通信が私のコンピュータで正しく動作しません。それを処理する方法?

USB to NULLモデムをUSB接続に接続しました。このシリアルケーブルはWindowsで正常に動作します。 Windowsでは、最大100MBまでファイルを転送できます。 Ubuntu Linuxで。困ってしまいました。コマンドラインを操作することもできません。


ポート設定:

sudo chmod o+rw /dev/ttyS0
sudo chmod o+rw /dev/ttyS4

crw-rw-rw- 1 root dialout 4, 64 Feb 10 14:31 /dev/ttyS0
crw-rw-rw- 1 root dialout 4, 68 Feb 10 14:20 /dev/ttyS4

dmesg | grep ttyS
[    0.412092] 00:07: ttyS0 at I/O 0x3f8 (irq = 4, base_baud = 115200) is a 16550A
[    0.433676] 0000:00:16.3: ttyS4 at I/O 0xf0e0 (irq = 19, base_baud = 115200) is a 16550A

通信する:

On one terminal:
cat -v < /dev/ttyS0   or   cat -v < /dev/ttyS4


On another terminal:
echo -e "\x7E\x03\xD0\xAF und normaler Text" > /dev/ttyS0

stty -aF /dev/ttyS0
speed 57600 baud; rows 0; columns 0; line = 0;
intr = <undef>; quit = <undef>; erase = <undef>; kill = <undef>; eof = <undef>;
eol = <undef>; eol2 = <undef>; swtch = <undef>; start = <undef>; stop = <undef>;
susp = <undef>; rprnt = <undef>; werase = <undef>; lnext = <undef>;
discard = <undef>; min = 0; time = 0;
-parenb -parodd -cmspar cs8 -hupcl -cstopb cread clocal -crtscts
-ignbrk -brkint ignpar -parmrk -inpck -istrip -inlcr -igncr -icrnl -ixon -ixoff
-iuclc -ixany -imaxbel -iutf8
opost -olcuc -ocrnl -onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0
-isig -icanon -iexten -echo -echoe -echok -echonl -noflsh -xcase -tostop -echoprt
-echoctl -echoke -flusho -extproc

stty -aF /dev/ttyS4
speed 57600 baud; rows 0; columns 0; line = 0;
intr = <undef>; quit = <undef>; erase = <undef>; kill = <undef>; eof = <undef>;
eol = <undef>; eol2 = <undef>; swtch = <undef>; start = <undef>; stop = <undef>;
susp = <undef>; rprnt = <undef>; werase = <undef>; lnext = <undef>;
discard = <undef>; min = 0; time = 0;
-parenb -parodd -cmspar cs8 -hupcl -cstopb cread clocal -crtscts
-ignbrk -brkint ignpar -parmrk -inpck -istrip -inlcr -igncr -icrnl -ixon -ixoff
-iuclc -ixany -imaxbel -iutf8
opost -olcuc -ocrnl -onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0
-isig -icanon -iexten -echo -echoe -echok -echonl -noflsh -xcase -tostop -echoprt
-echoctl -echoke -flusho -extproc

文書は次のとおりです。

https://www.digi.com/resources/documentation/Digidocs/90001541/tasks/t_use_terminals.htm?TocPath=Get%20started%20with%20MicroPython%7C_____8

ベストアンサー1

USB-シリアルデバイスについて話していますか?これにより、デバイス名が形式で/dev/ttyUSB*はない可能性が高くなります/dev/ttyS*。そのようなデバイスが1つしかない場合は、名前を付けることができます/dev/ttyUSB0

リンクされたガイドラインの最初のLinuxステップでは、次の内容も示しています。

Linuxで端末を開き、次のように入力します。picocom -b 115200 /dev/ttyUSB0

表示は/dev/ttyS0通常の物理シリアルポート(ノートブックではドッキングのみ可能)であり、出力は/dev/ttyS4PCI ID 0000:00:16.3に関連しているように見えるため、dmesgIntel AMT / MEIシリアルになる可能性があります。 Port-over-LAN管理エンドポイント。これらのどれもUSB-シリアルデバイスとは関係ありません。

おすすめ記事