Blame Documentation/Manuals/Docbook/Tcpi-ug/Connectivity/Ppp/modem.docbook

73737d
<sect1 id="connectivity-ppp-modem">
1c6890
1c6890
    <title>The Modem Device</title>
1c6890
1c6890
    <para>
1c6890
        In order to establish a PPP link between two computers using
7be951
        the telephone line as medium for data transmission, you will
7be951
        need to install and configure a modem device in each computer
7be951
        you plan to connect. On the other hand, if you're planning to
7be951
        use PPP to connect the same computer to different networks
7be951
        simultaneously (e.g., to build a proxy between them), you will
7be951
        need to install and configure one modem device for each
7be951
        different network you plan to establish such simultaneous
7be951
        connection in the same computer.
1c6890
    </para>
1c6890
    
73737d
    <sect2 id="connectivity-ppp-modem-install">
1c6890
    <title>Installing Modem Devices</title>
1c6890
    <para>
7be951
        To install a modem device in the computer, you need to attach
7be951
        the modem hardware to the computer and later the telephone
7be951
        line to the modem hardware. To attach the modem hardware to
066eb8
        your computer, you need to connect the serial or USB cable
7be951
        that comes from the modem hardware to the appropriate input on
7be951
        your computer (whether serial or USB). To connect the modem
7be951
        hardware to the telephone line, you need to unplug the cable
7be951
        that connects your telephone device and plug it on the modem
7be951
        device, specifically in the port reserved for data
066eb8
        transmission.  Later, using a similar cable, you could connect
7be951
        your telephone device to the modem's telephone port, so you
066eb8
        can realize telephone calls when no data transmition take
7be951
        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
7be951
        modem hardware using either the <command>lsusb</command> or
066eb8
        <command>lspci</command> commands, based on whether you
7be951
        attached the modem device to an USB or serial port,
066eb8
        respectivly.  These commands need to be run with
7be951
        administrative privileges, thus, you probably need to do
7be951
        <command>sudo</command> on them or login as 
066eb8
        class="username">root</systemitem> user in order to execute
7be951
        them. For example, assuming you logged in as 
7be951
        class="username">root</systemitem> user and you installed an
7be951
        USB modem hardware as 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.
7be951
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
7be951
        existence of your modem. For example, Multi-Tech System,
7be951
        Inc.  MT5634ZBA-USB MultimodemUSB (new
066eb8
        firmware)<footnote>
71af76
        <para>
71af76
            I want to thank my friend Brians Suarez Alonso for
7be951
            bringing this modem hardware to me and for his paitient,
7be951
            resisting my repetitive calls at night to realize
7be951
            connection tests.
71af76
        </para>
7be951
        </footnote>. This line confirms that your modem hardware is
066eb8
        supported by &TC;; and it is possible to transmit data through
7be951
        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>
7be951
        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
7be951
        device to talk to.  Assuming you've connected your modem
7be951
        device through an USB port, the operating system will assign
7be951
        the the <filename>/dev/ttyACM0</filename> device file to talk
7be951
        to it.  On the other hand, assuming you've connected your
7be951
        modem device through a serial port, the operating system will
7be951
        use the <filename>/dev/ttyS0</filename> device file to talk to
7be951
        it.  To be absolutly sure about what device name the operating
7be951
        system assigned to your modem hardware, you can use the
1c6890
        <command>lshal</command> command from <package>hal</package>
1c6890
        package.
1c6890
    </para>
1c6890
    </sect2>
1c6890
73737d
    <sect2 id="connectivity-ppp-modem-config">
1c6890
    <title>Configuring Modem Devices</title>
7be951
7be951
    <para>
7be951
        Inside &TC;;, modem devices can be configured using the
7be951
        <command>system-config-network</command> tool. This tool is a
7be951
        manages modem configuration files under the
7be951
        <filename>/etc/sysconfig/network-scripts</filename> and
7be951
        <filename>/etc/wvdial.conf</filename>.  Inside
7be951
        <filename>/etc/sysconfig/network-scripts</filename>, modem
7be951
        configuration files can take different file names. To identify
7be951
        them you need to open the file and checking the value set on
7be951
        <varname>DEVICE</varname> variable. This variable can take
7be951
        values like ppp0 for the first modem device,
7be951
        ppp1 for the second modem device, and so on for
7be951
        other modem devices.
7be951
    </para>
7be951
7be951
    <para>
7be951
        The configuration files of modem devices may vary based on
7be951
        whether the computer is acting as server, client or both.
7be951
        When you configure the modem device on the server computer,
7be951
        you should take care of specifying both the IP address
7be951
        (IPADDR) and the network mask (NETMASK) inside the
7be951
        configuration file.  Otherwise, the established connection
7be951
        might end up having the wrong IP information you need to
7be951
        transfer data correctly through it, assuming the other end
7be951
        isn't configured to specify it.  When you configure the modem
7be951
        device on the server computer, there is no need for you to set
7be951
        any configuration related to wvdial, unless you be thinking to
7be951
        make your server computer to act as a client of another server
7be951
        computer. In fact, in the server computer, you can create the
7be951
        modem configuration file by yourself based on the information
7be951
        provided at
7be951
        <filename>/usr/share/doc/initscripts-*/sysconfig.txt
7be951
        </filename>
7be951
    </para>
7be951
1c6890
    <para>
7be951
        When you configure the modem device on the client computer,
7be951
        you don't need to take care of specifying either the IP
7be951
        address or network mask because the server computer will
7be951
        assign them for you. The assignment of client computer IP
7be951
        address is configured by <application>ppp</application> daemon
7be951
        when it is executed by <application>mgetty</application> after
7be951
        an incoming call has arrived to modem's port.
1c6890
    </para>
1c6890
7be951
    <example id="connectivity-ppp-modem-config.fig-1">
7be951
    <title>Modem configuration file</title>
7be951
    <screenshot>
7be951
    <screeninfo>Modem configuration file</screeninfo>
7be951
    <mediaobject>
7be951
    <textobject>
1c6890
<screen>
1c6890
# Please read /usr/share/doc/initscripts-*/sysconfig.txt
1c6890
# for the documentation of these parameters.
7be951
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>
7be951
    </textobject>
7be951
    </mediaobject>
7be951
    </screenshot>
7be951
    </example>
1c6890
1c6890
    </sect2>
1c6890
1c6890
</sect1>