Blame Manuals/Tcpi-ug/Configurations/Ppp/modem.docbook

07124f
<sect1 id="configurations-ppp-modem">
07124f
07124f
    <title>The Modem Device</title>
07124f
07124f
    <para>
07124f
        This section describes the steps you should follow to install
07124f
        and configure the modem device in the computer. This section
07124f
        applies both to server and client computers.
07124f
    </para>
07124f
07124f
    <sect2 id="configurations-ppp-modem-installation">
07124f
    <title>Installation</title>
07124f
    <para>
07124f
        The modem device installation consists on attacthing the modem
07124f
        hardware both to the computer and the telephone line. To
07124f
        connect the modem to your computer, you need to connect the
07124f
        serial or USB cable that comes from the modem hardware to the
07124f
        appropriate input on your computer. To connect the modem to
07124f
        the telephone line system, you need to unplug the cable that
07124f
        connects your phone device and plug it on the modem device,
07124f
        specifically in the port reserved for data transmission.
07124f
        Later, using a similar cable, you could connect your phone
07124f
        device to the modem's phone port, so you be able of realizing
07124f
        phone calls when no data transmition take place, as well.
07124f
    </para>
07124f
07124f
    <para>
07124f
        To be on the safe side, do all the installation with the
07124f
        computer turned off. Then, when everthing has been put in
07124f
        place, turn it on. Once the system is up, you can verify the
07124f
        modem hardware using either the <command>lsusb</command> or
07124f
        <command>lspci</command> commands. For example, if you are
07124f
        using an USB modem like that one we mentioned before, run the
07124f
        following command:
07124f
    </para>
07124f
07124f
    <screen>sudo /sbin/lsusb</screen>
07124f
07124f
    <para>
07124f
        and you should get an output similar to the following:
07124f
    </para>
07124f
07124f
<screen>
07124f
Bus 003 Device 001: ID 0000:0000  
07124f
Bus 001 Device 001: ID 0000:0000  
07124f
Bus 001 Device 002: ID 058f:6366 Alcor Micro Corp. Multi Flash Reader
07124f
Bus 002 Device 001: ID 0000:0000  
07124f
Bus 005 Device 003: ID 06e0:f104 Multi-Tech Systems, Inc.
07124f
MT5634ZBA-USB MultiModemUSB (new firmware)
07124f
Bus 005 Device 001: ID 0000:0000  
07124f
Bus 005 Device 002: ID 046d:c018 Logitech, Inc. Optical Wheel Mouse
07124f
Bus 004 Device 001: ID 0000:0000 
07124f
</screen>
07124f
07124f
    <para>
07124f
        The relevant line here is that mentioning the existence of a
07124f
        Multi-Tech System, Inc. MT5634ZBA-USB MultiModemUSB (new
07124f
        firmware) device.
07124f
    </para>
07124f
07124f
    </sect2>
07124f
07124f
    <sect2 id="configurations-ppp-modem-config">
07124f
    <title>Configuration</title>
07124f
07124f
    <para>
07124f
        The modem configuration depends on whether you are setting the
07124f
        server computer or the client computer. Nevertheless, the
07124f
        configuration stuff related to modem detection is both valid
07124f
        on server acn client computers.
07124f
    </para>
07124f
07124f
    <sect3 id="configurations-ppp-modem-config-detect">
07124f
    <title>Detecting The Modem Device</title>
07124f
07124f
    <para>
07124f
        Once the modem hardware has been installed in the computer, it
07124f
        is necessary to determine what device inside the operating
07124f
        system it was assigned to, so applications like
07124f
        <command>pppd</command> and <command>chat</command> can talk
07124f
        to it. To perform this very specific configuration step, run
07124f
        the following command:
07124f
    </para>
07124f
07124f
    <screen>sudo /usr/bin/wvdialconf /etc/wvdial.conf</screen>
07124f
    
07124f
    <para>
07124f
        The <command>wvdialconf</command> command comes with the
07124f
        <package>wvdial</package><footnote>
07124f
        <para>
07124f
            <command>wvdial</command> is an intelligent PPP dialer
07124f
            that takes care of dialing a modem and starting PPP to
07124f
            connect almost any ISP without special configurations. It
07124f
            is something like the <application>chat</application>
07124f
            program, except that it uses heuristics to guess how to
07124f
            dial and log into your server rather than forcing you to
07124f
            write a login script.
07124f
        </para></footnote> package and detects your modem, its maximum
07124f
        baud rate, and a good initialization string. Later, using this
07124f
        information, it generates or updates the
07124f
        <command>wvdial</command> configuration file
07124f
        (<filename>/etc/wvdial.conf</filename>).  The output produced
07124f
        by <command>wvdialconf</command> command looks as the
07124f
        following:
07124f
    </para>
07124f
07124f
<screen>
07124f
Scanning your serial ports for a modem.
07124f
07124f
ttyS0<*1>: ATQ0 V1 E1 -- failed with 2400 baud, next try: 9600 baud
07124f
ttyS0<*1>: ATQ0 V1 E1 -- failed with 9600 baud, next try: 115200 baud
07124f
ttyS0<*1>: ATQ0 V1 E1 -- and failed too at 115200, giving up.
07124f
Port Scan<*1>: S1   S2   S3   
07124f
WvModem<*1>: Cannot get information for serial port.
07124f
ttyACM0<*1>: ATQ0 V1 E1 -- OK
07124f
ttyACM0<*1>: ATQ0 V1 E1 Z -- OK
07124f
ttyACM0<*1>: ATQ0 V1 E1 S0=0 -- OK
07124f
ttyACM0<*1>: ATQ0 V1 E1 S0=0 &C1 -- OK
07124f
ttyACM0<*1>: ATQ0 V1 E1 S0=0 &C1 &D2 -- OK
07124f
ttyACM0<*1>: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0 -- OK
07124f
ttyACM0<*1>: Modem Identifier: ATI -- LT V.90 1.0 MT5634ZBA-USB
07124f
Data/Fax Modem (Dual Config) Version 5.18e
07124f
ttyACM0<*1>: Speed 4800: AT -- OK
07124f
ttyACM0<*1>: Speed 9600: AT -- OK
07124f
ttyACM0<*1>: Speed 19200: AT -- OK
07124f
ttyACM0<*1>: Speed 38400: AT -- OK
07124f
ttyACM0<*1>: Speed 57600: AT -- OK
07124f
ttyACM0<*1>: Speed 115200: AT -- OK
07124f
ttyACM0<*1>: Speed 230400: AT -- OK
07124f
ttyACM0<*1>: Speed 460800: AT -- OK
07124f
ttyACM0<*1>: Max speed is 460800; that should be safe.
07124f
ttyACM0<*1>: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0 -- OK
07124f
07124f
Found an USB modem on /dev/ttyACM0.
07124f
Modem configuration written to /etc/wvdial.conf.
07124f
ttyACM0<Info>: Speed 460800; init "ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0"
07124f
</screen>
07124f
07124f
    <para>
07124f
        which produces the following <command>wvdial</command>
07124f
        configuration file:
07124f
    </para>
07124f
07124f
<screen>
07124f
[Dialer Defaults]
07124f
Modem = /dev/ttyACM0
07124f
Baud = 460800
07124f
Init1 = ATZ
07124f
Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
07124f
ISDN = 0
07124f
Modem Type = USB Modem
07124f
; Phone = <Target Phone Number>
07124f
; Username = <Your Login Name>
07124f
; Password = <Your Password>
07124f
</screen>
07124f
07124f
    <para>
07124f
        At this point, the computer should be ready to attend incoming
07124f
        calls.  When an incoming call is detected by the computer, the
07124f
        <application>pppd</application> deamon responds to it. To
07124f
        configure the way such incoming calls are attended (e.g.,
07124f
        forcing user authentication, restricting the phone numbers the
07124f
        calls can be initiated from, etc.), you need to set-up the
07124f
        <application>pppd</application> deamon to fit your needs. On
07124f
        the other hand, if you are configuring a computer to act as
07124f
        client, you need to realize a few more tunning steps on
07124f
        <filename>/etc/wvdial.conf</filename> to set the information
07124f
        related of that Internet Service Provider (ISP) you want to
07124f
        get connected in (e.g., by uncommenting the
07124f
        Phone, Username and
07124f
        Password lines above to set the appropiate values
07124f
        there) and then, instruct to <application>pppd</application>
07124f
        deamon about the user credential (e.g., user name and
07124f
        password) you will use to connect the target ISP. In this
07124f
        case, credentials defined both in
07124f
        <application>wvdial</application> and
07124f
        <application>pppd</application> applications must be exactly
07124f
        the same.
07124f
    </para>
07124f
07124f
    </sect3>
07124f
07124f
    <sect3 id="configurations-ppp-modem-config-server">
07124f
    <title>The Server Settings</title>
07124f
07124f
    <para>
07124f
        ...
07124f
    </para>
07124f
07124f
    </sect3>
07124f
07124f
    <sect3 id="configurations-ppp-modem-config-client">
07124f
    <title>The Client Settings</title>
07124f
    <para>
07124f
        ...
07124f
    </para>
07124f
    </sect3>
07124f
07124f
    </sect2>
07124f
07124f
    <sect2 id="configurations-ppp-modem-verification">
07124f
    <title>Verification</title>
07124f
    <para>
07124f
    ...
07124f
    </para>
07124f
07124f
<screen>
07124f
--> WvDial: Internet dialer version 1.54.0
07124f
--> Cannot get information for serial port.
07124f
--> Initializing modem.
07124f
--> Sending: ATZ
07124f
ATZ
07124f
OK
07124f
--> Sending: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
07124f
ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
07124f
OK
07124f
--> Modem initialized.
07124f
--> Sending: ATDT520347
07124f
--> Waiting for carrier.
07124f
ATDT520347
07124f
NO DIALTONE
07124f
--> No dial tone.
07124f
--> Disconnecting at Thu Sep 29 13:04:30 2011
07124f
</screen>
07124f
    </sect2>
07124f
07124f
</sect1>