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
e91443
        to install and configure one Modem device in each computer. On
e91443
        the other hand, if you're planning to connect the same
e91443
        computer to different networks simultaneously (e.g., to build
e91443
        a proxy between them), you will need to install and configure
e91443
        one Modem device for each different network you plan to
e91443
        establish such simultaneous connection on.
1c6890
    </para>
1c6890
    
1c6890
    <sect2 id="connectivity-dialup-modem-install">
1c6890
    <title>Installing Modem Devices</title>
1c6890
    <para>
1c6890
        To install a Modem device in a computer you need to attach the
1c6890
        Modem hardware to the computer and later the telephone line to
1c6890
        the Modem hardware. To attach the Modem hardware to your
1c6890
        computer, you need to connect the serial or USB cable that
1c6890
        comes from the Modem hardware to the appropriate input on your
1c6890
        computer. To connect the Modem hardware to the telephone line
1c6890
        system, you need to unplug the cable that connects your
1c6890
        telephone device and plug it on the Modem device, specifically
1c6890
        in the port reserved for data transmission.  Later, using a
1c6890
        similar cable, you could connect your telephone device to the
1c6890
        Modem's telephone port, so you can realize telephone calls
1c6890
        when no data transmition take place, as well.
1c6890
    </para>
1c6890
1c6890
    <para>
1c6890
        To be on the safe side, do all the installation with the
1c6890
        computer turned off. Then, when everthing has been put in
1c6890
        place, turn the computer on. Once the system is up, you can
1c6890
        verify the Modem hardware using either the
1c6890
        <command>lsusb</command> or <command>lspci</command> commands.
1c6890
        These commands need to be run with administrative privileges,
1c6890
        so probably need to <command>sudo</command> them or login as
1c6890
        <systemitem class="username">root</systemitem> user in order
1c6890
        to execute them. For example, assuming you are logged in as
1c6890
        <systemitem class="username">root</systemitem> user, and you
1c6890
        are using an USB Modem like that one we mentioned before, the
1c6890
        output of <command>lsusb</command> command would look like the
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>
1c6890
        The relevant line here is that one mentioning the existence of
1c6890
        a Multi-Tech System, Inc. MT5634ZBA-USB MultiModemUSB
1c6890
        (new firmware) device. This line confirms that your
1c6890
        Modem hardware is supported by &TC;; and it is possible to
1c6890
        transmit data through it.  Otherwise, if the Modem you
1c6890
        installed doesn't appear in this list, it is probably because
1c6890
        such hardware is not 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
1c6890
        the <filename>/dev/ttyACM0</filename> file to talk to it. On
1c6890
        the other hand, assuming you've connected your Modem device
1c6890
        through a serial port, the operating system might use the
1c6890
        <filename>/dev/ttyS0</filename> file to talk to it.  To be
1c6890
        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
1c6890
PAPNAME=a
1c6890
WVDIALSECT=ProviderName
1c6890
MODEMNAME=Modem0
1c6890
DEMAND=no
1c6890
IPV6INIT=no
1c6890
IDLETIMEOUT=600
1c6890
NETMASK=255.255.255.0
1c6890
IPADDR=192.168.0.2
1c6890
</screen>
1c6890
1c6890
    </sect2>
1c6890
1c6890
</sect1>