Blame Manuals/Tcpi-ug/Connectivity/Dialup/modem.docbook

1c6890
<sect1 id="connectivity-dialup-modem">
1c6890
1c6890
    <title>The Modem Device</title>
1c6890
1c6890
    <para>
1c6890
        In order to establish a PPP link between two computers using
1c6890
        the telephone line as medium for data transmission, you need
066eb8
        to install and configure one Modem device in each computer you
066eb8
        are connecting in. On the other hand, if you're planning to
066eb8
        connect the same computer to different networks simultaneously
066eb8
        (e.g., to build a proxy between them), you will need to
066eb8
        install and configure one Modem device for each different
066eb8
        network you plan to establish such simultaneous connection on.
1c6890
    </para>
1c6890
    
1c6890
    <sect2 id="connectivity-dialup-modem-install">
1c6890
    <title>Installing Modem Devices</title>
1c6890
    <para>
066eb8
        To install a Modem device in the computer, you need to attach
066eb8
        the Modem hardware to the computer and later the telephone
066eb8
        line to the Modem hardware. To attach the Modem hardware to
066eb8
        your computer, you need to connect the serial or USB cable
066eb8
        that comes from the Modem hardware to the appropriate input on
066eb8
        your computer (whether serial or USB). To connect the Modem
066eb8
        hardware to the telephone line system, you need to unplug the
066eb8
        cable that connects your telephone device and plug it on the
066eb8
        Modem device, specifically in the port reserved for data
066eb8
        transmission.  Later, using a similar cable, you could connect
066eb8
        your telephone device to the Modem's telephone port, so you
066eb8
        can realize telephone calls when no data transmition take
066eb8
        place through Modem's data port.
1c6890
    </para>
1c6890
1c6890
    <para>
066eb8
        To be on the safe side, do everything related to hardware
066eb8
        installation with the computer turned off. Then, when
066eb8
        everthing has been put in place, turn the computer on. Once
066eb8
        the operating system is up and running, you can verify the
066eb8
        Modem hardware using either the <command>lsusb</command> or
066eb8
        <command>lspci</command> commands, based on whether you
066eb8
        attached the Modem device to an USB or serial port,
066eb8
        respectivly.  These commands need to be run with
066eb8
        administrative privileges, so probably need to
066eb8
        <command>sudo</command> them or login as 
066eb8
        class="username">root</systemitem> user in order to execute
066eb8
        them. For example, assuming you are logged in as 
066eb8
        class="username">root</systemitem> user, and you are using an
066eb8
        USB Modem like that one we mentioned before, the output of
066eb8
        <command>lsusb</command> command would be similar to that
1c6890
        following:
1c6890
    </para>
1c6890
1c6890
<screen>
1c6890
Bus 003 Device 001: ID 0000:0000  
1c6890
Bus 001 Device 001: ID 0000:0000  
1c6890
Bus 001 Device 002: ID 058f:6366 Alcor Micro Corp. Multi Flash Reader
1c6890
Bus 002 Device 001: ID 0000:0000  
1c6890
Bus 005 Device 003: ID 06e0:f104 Multi-Tech Systems, Inc.
1c6890
MT5634ZBA-USB MultiModemUSB (new firmware)
1c6890
Bus 005 Device 001: ID 0000:0000  
1c6890
Bus 005 Device 002: ID 046d:c018 Logitech, Inc. Optical Wheel Mouse
1c6890
Bus 004 Device 001: ID 0000:0000 
1c6890
</screen>
1c6890
1c6890
    <para>
066eb8
        The relevant line in this output is that one mentioning the
066eb8
        existence of your Modem. For example, Multi-Tech System,
066eb8
        Inc.  MT5634ZBA-USB MultiModemUSB (new
066eb8
        firmware)<footnote>
71af76
        <para>
71af76
            I want to thank my friend Brians Suarez Alonso for
71af76
            bringing this Modem to me and for his paitient, resisting
71af76
            my repetitive calls at night to realize connection tests.
71af76
        </para>
066eb8
        </footnote>. This line confirms that your Modem hardware is
066eb8
        supported by &TC;; and it is possible to transmit data through
066eb8
        it.  Otherwise, if the Modem you installed doesn't appear in
066eb8
        this list, it is probably because such hardware is not
066eb8
        supported by &TC;;, yet.
1c6890
    </para>
1c6890
1c6890
    <para>
1c6890
        Once you have confirmed the Modem hardware has been installed
1c6890
        in the computer (either client or server), you need to
1c6890
        determine the device name the operating system assigned to it.
1c6890
        This information is required by programs like
1c6890
        <application>mgetty</application> and
1c6890
        <application>wvdial</application>, so they can know what
1c6890
        device to talk to.  Assuming you've connected your Modem
1c6890
        device through an USB port, the operating system might use the
066eb8
        <filename>/dev/ttyACM0</filename> device file to talk to it.
066eb8
        On the other hand, assuming you've connected your Modem device
1c6890
        through a serial port, the operating system might use the
066eb8
        <filename>/dev/ttyS0</filename> device file to talk to it.  To
066eb8
        be absolutly sure about what device name the operating system
1c6890
        assigned to your Modem hardware, you can use the
1c6890
        <application>wvdialconf</application> program from
1c6890
        <package>wvdial</package> package or the
1c6890
        <command>lshal</command> command from <package>hal</package>
1c6890
        package.
1c6890
    </para>
1c6890
    </sect2>
1c6890
1c6890
    <sect2 id="connectivity-dialup-modem-config">
1c6890
    <title>Configuring Modem Devices</title>
1c6890
    <para>
1c6890
        Modem devices are configured through
1c6890
        <command>system-config-network</command> command. This command
1c6890
        produces Modem configuration files under the
1c6890
        <filename>/etc/sysconfig/network-scripts</filename> directory.
1c6890
        Configuration related to Modem devices can take different
1c6890
        file names, but they can be clearly identified by the value
1c6890
        set on the <varname>DEVICE</varname> variable, inside the
1c6890
        configuration file. This variable can take names like
1c6890
        ppp0 for the first Modem device,
1c6890
        ppp1 for the second Modem device, and so on for
1c6890
        other Modem devices.  The Modem configuration files are used
1c6890
        by <application>pppd</application> and
1c6890
        <application>wvdial</application> programs when a PPP
1c6890
        connection is established between two computers.  If you are
1c6890
        runing mgetty and pppd to attend incoming calls, it is very
1c6890
        important that you also specify the IP address and the network
1c6890
        mask in the configuration file of the Modem device you are
1c6890
        using to establish the connection. Otherwise, if the remote
1c6890
        peer doesn't set the IP information for you, it would be
1c6890
        difficult for both computer to establish a permanent
1c6890
        interchange of data across the link created.
1c6890
    </para>
1c6890
1c6890
<screen>
1c6890
# Please read /usr/share/doc/initscripts-*/sysconfig.txt
1c6890
# for the documentation of these parameters.
1c6890
TYPE=Modem
1c6890
DEVICE=ppp0
1c6890
BOOTPROTO=none
1c6890
ONBOOT=no
1c6890
USERCTL=yes
1c6890
PEERDNS=yes
1c6890
AC=off
1c6890
BSDCOMP=off
1c6890
VJCCOMP=off
1c6890
CCP=off
1c6890
PC=off
1c6890
VJ=off
1c6890
LINESPEED=115200
1c6890
MODEMPORT=/dev/ttyACM0
1c6890
PROVIDER=ProviderName
1c6890
DEFROUTE=yes
1c6890
PERSIST=no
066eb8
PAPNAME=faith
1c6890
WVDIALSECT=ProviderName
1c6890
MODEMNAME=Modem0
1c6890
DEMAND=no
1c6890
IPV6INIT=no
1c6890
IDLETIMEOUT=600
1c6890
NETMASK=255.255.255.0
adbaa1
IPADDR=192.168.1.1
1c6890
</screen>
1c6890
1c6890
    </sect2>
1c6890
1c6890
</sect1>