Once a modem is physically installed, you can use the wvdialconf command to see if it can detect any modems on your computer. Then you can run wvdial to make sure that you can connect to the Internet Service Provider.
Run wvdialconf-The wvdialconf command checks devices that it expects might be connected to a modem, probes the modem (if it finds one) for information, and creates a configuration file of basic settings for the modem. Here's an example:
# wvdialconf /etc/wvdial.conf.new
Here's what the output looked like when I attached a serial modem to the second serial port (/dev/ttyS1, also referred to as COM2):
ttyS1<*1>: ATQ0 V1 E1 - OK ttyS1<*1>: ATQ0- V1 E1 Z - OK ttyS1*1>: ATQ0 V1 E1 S0=0 -- OK ttyS1<*1>: ATQO V1 E1 S0=0 &C1 -- OK ttyS1<*1>: ATQO V1 E1 S0=0 &C1 &D2 -- OK ttyS1<*1>: ATQO V1 E1 S0=0 &C1 &D2 +FCLASS=0 -- OK ttyS1<*1>: Modem Identifier: ATI -- 288 ttyS1<*1>: Speed 4800: AT -- OK ttyS1<*1>: Speed 9600: AT -- OK ttySl<*l>: Speed 19200: AT -- OK ttyS1<*1>: Speed 38400: AT -- OK ttyS1<*1>: Speed 57600: AT -- OK ttyS1<*1>: Speed 115200: AT -- OK ttyS1<*1>: Max speed is 115200; that should be safe. ttyS1<*1>: ATQO V1 E1 S0=0 &C1 &D2 +FCLASS=0 -- OK Found a modem on /dev/ttyS1. Modem configuration written to /etc/wvdial.conf.new ttyS1<Info>: Speed 115200; init "ATOO V1 E1 SO=0 &C1 &D2 +FCLASS=0
The output shows a modem was detected on /dev/ttyS1 (COM2 port) of your computer. The result of the output was written (in this case) to the /etc/wvdial.conf.new file.
Edit wvdial.conf.new file-View the contents of the wvdial.conf.new file you just created. Here is an example:
[Dialer Defaults] Modem = /dev/ttyS1 Baud = 115200 Init1 = ATZ Init2 = ATQO V1 E1 S0=0 &C1 &D2 +FCLASS=0 ISDN = 0 Modem Type = Analog Modem ; Phone = <Target Phone Number> ; Username = <Your Login Name> ; Password = <Your Password>
Remove the semicolons from the last three lines and replace the words in italics with the phone number of your ISP, username, and password, respectively.
Copy to wvdial.conf-Once you are satisfied with the file, copy it to the permanent /etc/wvdial.conf file:
cp /etc/wvdial.conf.new /etc/wvdial.conf
Try to dial the ISP-To see if your modem is working and ready to create a PPP connection to your ISP, simply type the following command:
# wvdial --> WvDial: Internet dialer version 1.53 --> Initializing modem. --> Sending: ATZ ATZ OK --> Sending: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0 ATQO V1 E1 S0=0 &C1 &D2 +FCLASS=0 OK --> Modem initialized. --> Sending: ATDT5557846 --> Waiting for carrier. ATDT5557846 CONNECT 115200 --> Carrier detected. Waiting for prompt. login: login: -> Looks like a login prompt. --> Sending: jwjones jwjones Password: --> Looks like a password prompt. --> Sending: (password) choice: PPP session from (10.206.160.10) to 10.206.171.70 beginning....~[7f]| # @!}!}!} }4} "}&} } } } }%}&S}/mH}'}"}(}".[~ --> PPP negotiation detected. --> Starting pppd at Thu Dec 11 02:49:23 2003 --> pid of pppd: 23585
From this output you can see that wvdial successfully initialized the modem, dialed the phone number, sent the login and password (as prompted), and started a PPP session. The ISP gave your modem (client side) the address 10.206.160.10 and its modem (server side) the address 10.206.171.70.
If the wvdial session connected, you should be able to type /sbin/ifconfig and see a ppp0 interface running. If it did not work, check the Modem Troubleshooting Tips section at the end of this chapter.