Using wvdial

If you have rp3working perfectly, you may have little interest in exploring wvdial. However, in that case, you apparently don’t realize that you’re already using wvdial. As it happens, rp3is merely a GUI façade that overlays wvdial, which does the real work of establishing PPP connections. Here are three reasons you should consider learning more about wvdial:

  • You can use wvdialeven if X isn’t working or isn’t installed.

  • You can use knowledge of wvdialto work around some problems and bugs affecting rp3.

  • You can use wvdialin shell scripts of your own design. Chapter 13 includes an example script.

The /etc/wvdial.conf File

The most salient aspects of the relationship between rp3and wvdialare that rp3-config maintains the wvdialconfiguration file, /etc/wvdial.conf, and that rp3establishes Internet connections described by that file.

To configure wvdial, become the root user and issue the following command:

               wvdialconf /etc/wvdial.conf

This command analyzes your system and creates a template configuration file, /etc/wvdial.conf. You must edit this file to specify the username and password your ISP expects.

Warning

Running wvdialconf overwrites any configuration information stored by rp3-config; you should copy the /etc/wvdial.conf file or make a note of its contents before running wvdialconf.

The contents of the template file look something like this:

[Dialer Defaults]
Modem = /dev/ttyS1
Baud = 115200
Init1 = ATZ
Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 S11=55 +FCLASS=0
; Phone = <Target Phone Number>
; Username = <Your Login Name>
; Password = <Your Password>

Edit the last three lines of the file, deleting the leading semicolon and space and substituting the proper phone number, username, and password required to connect to your ISP. When you’re done, your file should look something like this:

[Dialer Defaults]
Modem = /dev/ttyS1
Baud =  115200
Init1 = ATZ
Init2 = ATQ0 V1 E1 &C1 &D2 +FCLASS=0
Phone = 15625551100
Username = bill100
Password = donttell

Now, you’re ready to make a connection by issuing the following command:

               wvdial &

The command generates quite a bit of output, which makes further use of this virtual terminal distracting. The simplest solution is to switch to another virtual terminal by pressing Alt- n, where n stands for the virtual terminal (17). Alternatively, you can direct the output of the command to a file, by typing this command in place of the one given earlier:

               wvdial 2>/tmp/wvdial.messages &

Of course, you’ll need to consult the file if something goes wrong with wvdial. Do so by using the less command:

               less /tmp/wvdial.messages

Once your connection is up, you can browse the Web and access other Internet services, as described later in this chapter. For now, simply verify that your connection is working by issuing the command:

               ping www.redhat.com

The ping command should report that echo packets were successfully received from the server. If not, check your name server configuration and other details, as described in the preceding section.

When you want to terminate the Internet connection, issue the command:

               killall wvdial

If you prefer, you can use rp3 to establish and terminate the Internet connection. When you build the /etc/wvdial.conf file by using rp3-config, the file contains more sophisticated entries than those generated by wvdialconf. However, the simpler entries are sufficient to enable rp3 to establish an Internet connection.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.139.80.15