シリアル通信 - テクノロジ・オタクなのかも・・・瀧(紅呪)'s Blog

カレンダー
<< 2009.1 >>
[日記]
        1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30 31


お品書き

コンテンツ

ツリー表示:開く | 閉じる


保存庫

ホットリンク

HOME / コンピュータTips / Linux / シリアル通信

Linux シリアル端末にする

Linuxにはtipは標準で入ってなさげなので、 代わりにkermitを使う

CentOSの場合は、

yum install ckermit

C-kermitにはサーバモードとか色々あり、でかくなってしまったらしいが、 パッケージで入れる時は、どうだって良い。

接続

私は/dev/ttyS0(COM1)にはシリアルコンソールを出しているので、 クライアントとしては/dev/ttyS1(COM2)に接続した。

# kermit
C-Kermit> set LINE /dev/ttyS1
C-kermit> set SPEED 9600
C-kermit> set carrier-watch off
C-kermit> connect

こうすると繋がる。

Connecting to /dev/ttyS1, speed 9600
 Escape character: Ctrl-\ (ASCII 28, FS): enabled
Type the escape character followed by C to get back,
or followed by ? to see other options.
----------------------------------------------------

要するに、

Ctrl-\ 文字

で出ることが出来る。

Ctrl-\ h

の結果は下記の通り。

Press:
 C to return to succubus.wizard.justplayer.com
 ? or H for this message
 0 (zero) to send the NUL (0) character
 B to send a BREAK signal (0.275sec)
 L to send a Long BREAK (1.5sec)
 U to hangup and close the connection
 Q to hangup and quit Kermit
 S for status
 ! to push to local shell
 Z to suspend
 \ backslash code:
   \nnn  decimal character code
   \Onnn octal character code
   \Xhh  hexadecimal character code;
   terminate with Carriage Return.
 Type the escape character again to send the escape character itself,
 or press the space-bar to resume the CONNECT session.

Get RSS

リンク集
ジャストプレイヤー株式会社
WikiPlus
Torrentan.net
人気blogランキング

Twitter
Fox Meter
Firefox3 Meter

Nakanohito

検索バー(内部検索)

※WikiPlusの内部検索ツールを利用しています。


最新情報
Copyright Kohju / TAKI, Yasushi http://kohju.justplayer.com/ - Design by Casafree.com