精华区 [关闭][返回]

当前位置:网易精华区>>讨论区精华>>电脑技术>>● Linux>>Linux之应用篇>>硬件篇>>如何设置你的Modem(7/28新鲜翻译出炉)

主题:如何设置你的Modem(7/28新鲜翻译出炉)
发信人: skybird(晓湖)
整理人: qiaoqian(2001-12-30 23:53:40), 站内信件
Configuring your ISA / External or PCI modem 
Written by Wayne Goodrich (Radar)
mailto: [email protected] 

This NHF assumes that you: 
本文假设你:
1: Have the modem installed
1.已经安装了一个可爱的猫猫

2: Have Linux installed and running
2.已经安装好并且运行了Linux

3: have a dialup account with an ISP
3.有一个拨号上网的帐号

4: Know what type of modem you have (ISA or PCI)
4.知道你的猫猫是是什么类型的,ISA还是PCI。

5. Know if your modem is a hardware modem. 
5.知道你的猫猫是硬猫还是软猫。

If you are not sure about (5) go to --> http://www.idir.net/~gromitkc/winmodem.html and look up your modem in their list. 
如果你是对第5种情况不了解的话,可以去上面这个网址查一下。

This NHF will not discuss winmodems. Winmodems use software which emulate hardware routines that hardware based modems perform in order to keep costs down. If you have one, you may want to go to http://www.linmodems.org to see if your particular modem is supported. 
本文不会涉及Winmodem。Winmodem是用现有的硬件来软件模拟成的Modem,如果你的是Winmodem的话,就要去上面这个网址逛逛了。

If you're modem is an ISA or an external (connected to com port) chances are it is already configured. The way to tell is to issue the following command: setserial -bg /dev/ttyS* (may need to be root) The following should appear: (in the case of ISA / external) 
如果你的猫是ISA或者外置式的(通过串行口连接的),那么Linux就应该已经给它配置好了。你可以通过下面这个命令来知道:

setserial -bg /dev/ttyS*  #前提是成为root

正常的话,系统将会显示:
/dev/ttyS0 at 0x03f8 (irq = 4) is a 16550A
/dev/ttyS1 at 0x02f8 (irq = 3) is a 16550A 

For PCI modems, you may need to do a little work. 
如果你的猫猫是PCI的话,那么你就要做些工作了:

Issue the following command: cat /proc/pci (may need to be root) You should see the following after scrolling down some: 
执行下面的命令:
cat /proc/pci #前提是成为root

你将会看到如下信息:
Serial controller: Unknown vendor Unknown device (rev 1).
Vendor id=12b9. Device id=1008.
Medium devsel. IRQ 5.
I/O at 0xfcc0 [0xfcc1].
Bus 1, device 0, function 0: 

Using this information, we can use the setserial command to set values. 
通过这些信息,我们可以用setserial命令来设置:

Issue the following command as root: 
以root的身份执行下面的命令
setserial /dev/ttyS2 uart 16550A port 0xfcc0 irq 5 

substituting the port and irq values for your own.
以上命令中的数据根据你的猫的port口和IRQ而定。

Now let's find the appropriate init script to put this command in so that it will automatically be prepared at bootup. 
现在让我们把这个命令加到正确的初始化脚本中,以便每次启动的时候都可以自动加载。

In Red Hat & Mandrake you should have a file called rc.local (/etc/rc.d/rc.local) where you can add this command.
在Redhat和Mandrake中,你应该找到一个叫做rc.local的文件(/etc/rc.d/rc.local)。把刚才那行命令加进去。

Make sure that the file is there, and as root type: 
如果你找到了那个rc.local,就以root的身份打入:
echo setserial /dev/ttyS2 uart 16550A port 0xfcc0 irq 5 >> /etc/rc.d/rc.local 

(this appends the setserial entry to the end of the file). 
(这样就可以把刚才那行命令加到rc.local中去)

In Debian, I use /etc/init.d/bootmisc.sh. (Alternatively, you can just edit the script with your favorite editor.) 
在Debian中,取而代之的是 /etc/init.d/bootmisc.sh

(Linux下有很多编辑器,可以直接添加进去)

Your modem should now be configured for use. Now, when you type: 
现在你的猫猫应该已经配置好了。OK,当你打入:
setserial -bg /dev/ttyS* 

you should see: 
你应该看到:

/dev/ttyS2 at 0xfcc0 (irq = 5) is a 16550A 

Now we can set up ppp to dial our ISP.
现在让我们设置ppp一边连到ISP服务商去。

If you have a GUI program that dials for you, you should be able to select /dev/ttyS* (substitute a valid com port from above) and have the program probe it for you. 
如果你在Xwindow下有一个图形界面的程序可以拨号的话,你应该选择/dev/ttyS* (*代表正确的串行口号)应该有个程序可以探测出来的。

If it fails, try the next one. You should now be able to dial out. If you cannot dial out as a regular user, make sure youruser belongs to the proper groups -- dip, dialout & possibly pppusers. 
如果不成功的话,那么就试试下一个:
你现在应该可以拨号出去的,如果你不能以正常用户的身份拨号出去的话,去查查你的帐号是否属于一个正确的用户组里面--可以拨号的ppp用户。

If not, issue: adduser dip (and so forth). 
如果不是的话,执行:adduser dip

For Debian users: make sure you have pppconfig installed (it is the default). Type as root: 
对于Debian用户:看看你是否安装了pppconfig,然后以root的身份打入:
pppconfig

Go through and configure your connection using "provider" as the name. This way you can just type "pon" to dial the ISP.
然后用“provider”来设置你的连接。这样你就可以打pon来拨通你的ISP了。

You will need to know your ISP's DNS servers and whether to use PAP or CHAP.
注意,你需要知道你的ISP的DNS服务器地址,还有它的密码认证方式:PAP还是CHAP

You can let pppconfig probe your modem, but it's not necessary. Just manually enter what it is. When you're through, as root type: 
你可以用pppconfig来检测你的猫猫,但是不是必须的。你只要手工输入就行了。当你通过以后,以root的身份打入:
linuxconf

Go to users / groups and tab over to ppp groups. It will ask to create a pppusers group.
进入users/groups,它会让你添加一个pppusers用户组。

Do it, then (at terminal) adduser pppusers, adduser dip, adduser dialout. Now, as your username, type:
然后添加pppusers,dip和dialout。然后打入:
pon

(if all is well, you should hear the modem dialing). 
如果正常的话,你应该听到猫猫叫的声音了。嘻嘻。

press CTRL-ALT-F1 to get to a terminal (if you're already at a terminal, type ALT-F2 etc).
按下Ctrl+Alt+F1进入文本终端模式。(如果你已经在终端模式的话,按Alt-F2)

Log in as root, and type: 
然后以root的身份登录,打入:
tail -f /var/log/syslog

 You should see your logfile scrolling down. This is where you will see any errors that may occur. Once you're issued an ip address according to this logfile, you can type ALT-F7 to get back to GUI.
你应该可以看到一个记录文件显示出来。从这里面你可以看到可能发生的错误信息。一旦IP地址已经建立,你就可以通过按Alt-F7回到图形界面(如果是的话)。

--------
晓湖附:TMD,英文的技术文章真是废话多,看起来还是中文简练一些。可惜现在的Linux还是以英文开发的,我们讲中文的就更要努力了!


----
我的Linux配置:
P200/96M EDO RAM/4.3G+1.5G HD/Cirrus 5446显示卡(2M RAM)/10M Network Adapter with REDHAT 7.1 

http://wangxiaohu.126.com   ICQ:3340023 

[关闭][返回]