8.3. 测试控制台

从一台机器拨号进入,也许可以使用 Minicom

示例 8-1. 拨号进入串行控制台

localhost bash$ minicom
Initializing modem
Welcome to minicom 1.83.1
Press ALT-Z for help on special keys
AT S7=45 S0=0 L1 V1 X4 &C1 E1 Q0                     
OK
Alt-D remote.example.edu.au-ttyS0
Dialing: remote.example.edu.au-ttyS0 At: 1234-5678
Connected. Press any key to continue
Any
CONNECT 115200/V34/LAPM/V42BIS/33600:TX/33600:RX
Enter
/etc/issue says "All your base are belong to us".
remote.example.edu.au ttyS0 login: user
Password: ********
Message of the day is "be careful out there".
remote bash$ stty -a
speed 9600 baud; rows 0; columns 0; line = 0;
intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = <undef>;
eol2 = <undef>; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R; werase = ^W;
lnext = ^V; flush = ^O; min = 1; time = 0;
-parenb -parodd cs8 hupcl -cstopb cread -clocal crtscts
-ignbrk brkint ignpar -parmrk -inpck -istrip -inlcr -igncr icrnl -ixon -ixoff
-iuclc -ixany -imaxbel
opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab3 bs0 vt0 ff0
isig icanon -iexten echo echoe echok -echonl -noflsh -xcase -tostop -echoprt
-echoctl -echokeremote bash$ logout
NO CARRIER
Alt-X
Leave Minicom? Yes
Resetting modem
localhost bash$

有趣的是,用来显示终端设置的 stty -a 命令报告说,从调制解调器到串行控制台的连接速度是 9600bps。这个CONNECT消息报告说,两个调制解调器之间的连接速度是 33600bps。 恒定速度的调制解调器-计算机连接是 Hayes AT 式调制解调器一个非常有用的功能:调用计算机不需要提前知道被调用串行控制台的线路速度。