发信人: sungang(笨刚)
整理人: zhcharles(2002-01-30 15:40:11), 站内信件
|
建立一个FreeBSD的串行控制台
电缆:可以去太平洋电脑城或其他电脑城的零配件商店买一个串口拷贝线。(现在的电脑基本上都是小的9针串口了,注意连接线的公母是否匹配)。
或者买接头和电缆来自己焊接
9针串行 null modem 电缆的连接顺序是:
|--1o------------------o1--|
| 2o--------\/--------o2 |
| 3o--------/\--------o3 |
| 4o------------------o6--|
| 5o------------------o5
|--6o------------------o4
7o--------\/--------o7
8o--------/\--------o8
1 载波检测
2 接收数据
3 传出数据
4 数据终端就绪
5 系统接地
6 数据设置就绪
7 请求发送
8 清除发送
接法:1、6脚短接,2-3,3-2,7-8,8-7。
25针的接头同上,只是6脚接到对端的20脚。
要设置三样东西:
COM1
/boot.config
/etc/ttys
一、COM1
dmesg|grep sio1,如果输出类似下面这样就可以了
sio0 at port 0x3f8-0x3ff irq 4 flags 0x10 on isa0
sio0: type 16550A
device sio0 at isa? port IO_COM1 flags 0x10 irq 4
否则在kernel中加入
device sio0 at isa? port IO_COM1 flags 0x10 irq 4
重新编译安装kernel,并重启电脑。
二、/boot.config
建立/boot.config文件,内容为
-P
启动电脑时会看到下面这个样子:
/boot.config: -P
Keyboard: yes
或是是Keyboard: no
三、修改/etc/ttys
把下面这一行
ttyd0 "/usr/libexec/getty std.9600" dialup off secure
改为
ttyd0 "/usr/libexec/getty std.115200" cons25 on secure
四、连接:
1) windows 系统下,用netterm或secureCRT或windows自带的超级终端程序,连接参数
速度115200,
数据位8
停止位1
奇偶校验位 无
启动FreeBSD前先拔掉server的键盘。
2) FreeBSD或Linux下:
安装kermit软件,在freebsd下,可以
cd /ports/comms/kermit
make install distclean
linux下找rpm包来安装。
连接好串行线后,
root@host:~#/usr/local/bin/kermit -l /dev/cuaa0 -b 115200 -c
Connecting to /dev/cuaa0, speed 115200.
The escape character is Ctrl-\ (ASCII 28, FS)
Type the escape character followed by C to get back,
or followed by ? to see other options.
----------------------------------------------------
FreeBSD/i386 (192.168.0.200) (ttyd0)
login: root
Password: *****
Last login: Thu Apr 12 09:56:46 on ttyd0
Copyright (c) 1980, 1983, 1986, 1988, 1990, 1991, 1993, 1994
The Regents of the University of California. All rights reserved.
FreeBSD 4.4-RELEASE (SGKERNEL) #2: Sun Sep 6 23:51:26 GMT 2001
You have new mail.
root@remotehost:~#
刚连接时可能看不到显示,按回车就后提示了。
---- Best Regards,
Sun Gang
[email protected]
icq: 2499593
Don't Click me! |
|