Wvdial

January 11th, 2006 by uCertify Leave a reply »

The wvdial utility helps in making modem-based connections to the Internet. It is included in some important Linux distributions. wvdial is a Point-to-Point Protocol dialer: it dials a modem and starts pppd in order to connect to the Internet.

When wvdial starts, it first loads its configuration from /etc/wvdial.conf and ~/.wvdialrc, which contain basic information about the modem port, speed, and init string, along with information about your ISP, such as the phone number, your user name, and your password.

Then it initializes your modem (strings are sent to the modem) and dials the server and waits for a connection (a CONNECT string from the modem). Any time after connecting, wvdial starts PPP if it sees a PPP sequence from the server or, alternatively, tries to start PPP. If all of this fails, wvdial just runs pppd and hopes for the best.

The connection started with wvdial can be dropped by switching back to the terminal from where it was started and pressing ctrl-C. It uses the wvstreams library.

wvdial and chat

It is something like the chat program, except that it uses heuristics to guess how to dial and log into your server rather than forcing you to write a login script.

wvdialconf utility

If /etc/wvdial.conf is not present, the easiest way to create it is to use the configuration utility wvdialconf. It helps in generating the configuration file needed by wvdial. wvdialconf detects your modem, and fills in automatically the Modem, maximum Baud rate, and a good initialization string (Init options), and generates or updates the wvdial configuration file (/etc/wvdial.conf) based on this information.

It is safe to run wvdialconf if a configuration file already exists. In that case, only the Modem, Baud, Init, and Init2 options are changed in the [Dialer Defaults] section, and only if autodetection is successful.

wvdialconf is a non-interactive utility (that means that you still need to edit /etc/wvdial.conf to specify the phone number, login name, and password of your internet account in order for wvdial to work).

For Example: wvdialconf /etc/wvdial.conf

Here, /etc/wvdial.conf is the path of the file that needs to be created or updated with the details that wvdialconf detects. The configuration file built by wvdialconf still needs to be updated with the details like your phone number, username, password for your Internet connection in order for wvdial to work.

Files used by the wvdial utility:

  • /dev/ttyS (serial port modems) and /dev/ttyUSB (USB modems)
  • /etc/ppp/peers/wvdial
  • /etc/ppp/{pap,chap}-secrets: Contains a list of usernames and passwords used by pppd for authentication. wvdial maintains this list automatically.

wvdial.conf

When wvdial starts, it first loads its configuration from /etc/wvdial.conf. The configuration file /etc/wvdial.conf is equivalent to the Windows “ini” file format, with sections named in square brackets and a number of variable = value pairs within each section.

Here is a sample configuration file:

[Dialer Defaults]
Modem = /dev/ttyS2
Baud = 57600
Init = ATZ
Init2 = AT S11=50
Phone = 555-4242
Username = apenwarr
Password = my-password

[Dialer phone2]
Phone = 555-4243

[Dialer shh]
Init3 = ATM0

[Dialer pulse]
Dial Command = ATDP

This is an example that uses Init3 to turn the modem’s speaker off. The default is “ATZ” for Init(1).

When wvdial is in Stupid Mode, it does not attempt to interpret any prompts from the terminal server. It starts pppd immediately after the modem connects. Apparently, there are ISPs that actually give you a login prompt, but work only if you start PPP, rather than logging in.

Error Log

If wvdial fails to establish the communication, type the following commands:

script wvdial.log
wvdial
exit

Copyright © 2009-2010 Wikipedia. All rights reserved.

Like this article? Share it with others
If you like this article, please leave a comment or subscribe this blog via RSS or via e-mail, Bookmark and share through your network. Click the AddThis button below. Thanks.
  • Share/Bookmark
Advertisement

Leave a Reply

uCertify.com | Our Company | Articles | Contact Us | News and Press Release | uCertify India | Entries (RSS)
MCSE: MCSA, MCTS, MCITP    JAVA Certification: SCJP, SCWCD    Cisco Certification: CCNA, CCENT    A+, Network+, Security+ Project+
Oracle Certification: OCP 11g, OCP 10g, OCA 11g, OCA 10g    CIW foundation    EC-212-32,    CISSP    Photoshop ACE CS4    Adobe Flash ACE, PMP, CAPM
© 2008 uCertify.com. All rights reserved. All trademarks are the property of their respective owners.