hardware-modem.html

来自「学习linux的工具书」· HTML 代码 · 共 182 行

HTML
182
字号
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
<head>
   <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
   <meta name="Author" content="Edward Fu">
   <meta name="GENERATOR" content="Mozilla/4.05 [zh-CN] (X11; I; Linux 2.1.127 i686) [Netscape]">
   <title>Freesoft Linux FAQ -- 关于modem卡的问题</title>
</head>
<body>
&nbsp; 首先Linux并不认什么modem,而是去找串口,然后相关的应用程序在modem所连接的串口设备上使用AT命令
<br>集与modem交互式控制.所以配置modem卡其实就是去配置串口.
<br>&nbsp; 如果是PnP的modem卡,请先参考<a href="hardware-isapnp.html">设置PnP卡这一节</a>.设置串口的工具是setserial,配置文件是rc.serial(不
<br>同的发行版可能位置不一样).如果你没有禁止PnP功能的话,应在内核配置里把串口这一部分编译成模块,这
<br>样isapnp把irq/io参数设好以后setserial就可以正常工作了.
<br>&nbsp; 另外有些软件缺省使用/dev/modem设备,其实它通常是一个连接,如ln
/dev/cua3 /dev/modem
<br>&nbsp; 下面是两个典型的问答:
<p>/*----------------------------------------------------------------------------------*/
<br>>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; I have a Hayes Accura V.34+FAX
modem card installed in my Pentium-Pro.
<br>> and I use it well on WIN95 installed with RedHat 4.2 in one hard
disk. I want
<br>> config it on RedHat also, How can I do?
<br>>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; This Hayes card was set IRQ3 and using
COM2. for using on WIN95, I have
<br>> to set COM2 disabled in BIOS.
<p>在您作所有事情之前有没有先查看/var/log/messages文件?
<br>是否发现类似以下两行的关于tty00和tty01的信息?
<p>Sep&nbsp; 3 08:17:20 jt11-129-1 kernel: tty00 at 0x03f8 (irq = 4) is
a 16450
<br>Sep&nbsp; 3 08:17:20 jt11-129-1 kernel: tty01 at 0x02f8 (irq = 3) is
a 16450
<br>&nbsp;
<p>如果没有列出tty01的信息那么说明内核没有发现你的MODEM。
<br>我没有你所说的调制解调器,但据我判断它可能是ISA总线的
<br>PnP(即插即用)卡。可能造成这种情况的原因是你的MODEM
<br>是ISA PnP而Linux-2.0.x版的内核不能直接支持ISA PnP
<br>(PCI PnP is OK)。解决的办法:
<p>本文的附件是一个isapnptool。将它解开后用pnpdump输出所
<br>有ISA PnP卡的情况,看看那个MODEM有没有列出来。
<p>pnpdump > isapnp.conf
<p>如果列出来了,那一定是一个多配置设备,将其中一组参数非
<br>注释(uncomment)然后说:
<p>isapnp isapnp.conf
<p>初始化你的PnP调制解调器。如果成功了,别着急,还得干一件
<br>事—重新配制你的内核。将Standard/general serial support
<br>改为模块。重新作:
<p>make config
<br>make dep ; make clean ; make zImage
<br>make modules
<br>make modules_install
<p>将所需文件拷贝到/boot目录中后,
<p>lilo
<p>shutdown -r now
<p>系统重起后,你作为root说
<p>isapnp isapnp.conf
<br>insmod serial
<p>这样做的道理是,如果不编译成模块,那么串口驱动程序在内
<br>核起动时试图初始化所有的串口但是PnP卡因为没被PnP程序初
<br>始化,故而串口驱动程序看不见,认为没有这个东西。编译成
<br>模块就不同了,我们可以先用isapnp程序初始化PnP卡,然后
<br>insmod。现在卡已经被PnP程序初始化好了,因而串口驱动程
<br>序可以看见它了。
<p>祝你顺利并望及时联系!
<p>宫敏
<br>&nbsp;
<br>&nbsp;
<p>/*----------------------------------------------------------------------------------*/
<p>>我用的是redhat4.1 ,我的modem是内置的Hayes Accura 288B MSG
<br>>Modem,引导linux时检测不到,win95下用时irq 10,i/o0100-0107,COM6,
<br>>linux下怎么办?
<p>See /doc/HOWTO/Serial-HOWTO.gz ( zmore /doc/HOWTO/Serial-HOWTO.gz )
<br>-------------------------------------------------------
<br>/etc/rc.d/rc.serial
<br>#/bin/sh
<br>/bin/seiserial /dev/ttyS4 port 0x100 irq 10 spd_vhi
<br>-------------------------------------------------------
<p>&nbsp; 4.2.&nbsp; What is setserial?
<br>&nbsp; setserial is a program which allows you to look at and change
various
<br>&nbsp; attributes of a serial device, including its port address, its
<br>&nbsp; interrupt, and other serial port options.&nbsp; You can find
out what
<br>&nbsp; version you have by running setserial with no arguments.
<br>&nbsp; When your Linux system boots, only ttyS{0-3} are configured,
using the
<br>&nbsp; default IRQs of 4 and 3.&nbsp; So, if you have any other serial
ports
<br>&nbsp; provided by other boards or if ttyS{0-3} have a non-standard
IRQ, you
<br>&nbsp; must use this program in order to configure those serial ports.&nbsp;
For
<br>&nbsp; the full listing of options, consult the man page.
<br>&nbsp;
<p>>按照你说的干,可是modem还是毫无反应
<p>运行 pnpdump > isapnp.conf , 然后把这个文件贴上来。
<p>>......
<p>最后面是新的isapnp.conf, 拷贝到/etc, 然后在/etc/rc.d/rc.modules 开头加上下面两句:
<br># ISA PNP
<br>/sbin/isapnp /etc/isapnp.conf
<p>这样开机后,就会通过PNP把你的MODEM设置成 100-107, irq 10, 然后在用我以前介绍的方法就可以了.
<br>如果还不行的话,我劝你最好把主板上的某个COM口禁止掉, 比如COM1:, 接着把下面文件中的
<br>(IO 0 (BASE 0x0100))
<br>一行改成
<br>(IO 0 (BASE 0x03f8))
<p>另一行
<br>(INT 0 (IRQ 10 (MODE +E)))
<br>改成
<br>(INT 0 (IRQ 4 (MODE +E)))
<br>开机以后它就是COM1:
<p>很多PNP的设备在Linux中都可以通过isapnp来设置, 除了这个MODEM外, 还有UMC9008
<br>网卡, D-Link DE-220CT 网卡, CMI8330 声卡.
<p>基本步骤就是:
<br>1)&nbsp; 运行 pnpdump > isapnp.conf
<br>2)&nbsp; 修改 isapnp.conf , 按照你需要的配置, 去掉相应行前面的#
<br>3)&nbsp; 把新的isapnp.conf, 拷贝到/etc, 然后在/etc/rc.d/rc.modules
开头加上下面两句:
<br># ISA PNP
<br>/sbin/isapnp /etc/isapnp.conf
<p>更详细的内容最好去看 man isapnp
<p>------------------------------------------------------------------
<br># $Id: pnpdump.c,v 1.10 1997/07/14 22:30:47 fox Exp $
<br># This is free software, see the sources for details.
<br># This software has NO WARRANTY, use at your OWN RISK
<br>#
<br># For details of this file format, see isapnp.conf(5)
<br>#
<br># For latest information on isapnp and pnpdump see:
<br># http://www.roestock.demon.co.uk/isapnptools/
<br>#
<br># Compiler flags: -DREALTIME -DNEEDSETSCHEDULER
<br>#
<br># Trying port address 0203
<br># Board 1 has serial identifier ca 00 04 32 19 19 56 39 20
<p># (DEBUG)
<br>(READPORT 0x0203)
<br>(ISOLATE)
<br>(IDENTIFY *)
<p># Card 1: (serial identifier ca 00 04 32 19 19 56 39 20)
<br># HAY5619 Serial No 274969 [checksum ca]
<br># Version 1.0, Vendor version 0.0
<br># ANSI string -->Hayes Accura 288 V.34 FDSP&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&lt;--
<br>#
<br># Logical device id HAY5619
<br>#&nbsp;&nbsp;&nbsp;&nbsp; Device support I/O range check register
<br>#
<br># Edit the entries below to uncomment out the configuration required.
<br># Note that only the first value of any range is given, this may be
changed
<br>if required
<br># Don't forget to uncomment the activate (ACT Y) when happy
<p>(CONFIGURE HAY5619/274969 (LD 0
<br>#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Start dependent functions: priority
acceptable
<br>#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Logical device decodes 10 bit
IO address lines
<br>#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
Minimum IO base address 0x0100
<br>#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
Maximum IO base address 0x03f8
<br>#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
IO base alignment 8 bytes
<br>#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
Number of IO addresses required: 8
<br>(IO 0 (BASE 0x0100))
<br>#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; IRQ 3, 4, 5, 7, 10, 11, 12 or
15.
<br>#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
High true, edge sensitive interrupt (by default)
<br>(INT 0 (IRQ 10 (MODE +E)))
<p>#&nbsp;&nbsp;&nbsp;&nbsp; End dependent functions
<br>(ACT Y)
<br>))
<br># End tag... Checksum 0x00 (OK)
<p># Returns all cards to the "Wait for Key" state
<br>(WAITFORKEY)
<p>姚飞
<br>&nbsp;
</body>
</html>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?