Configuring wvdial for Internet access in fedora, using a cell phone or a normal modem
This post is dedicated to those poor lost souls who made their way to this blog while they were searching google for “configure wvdial for internet in fedora 7″ and “configure airtel internet in linux”. Hence the big “search engine friendly” post title!
The Basics
First of all, the simple basics.. Most of Linux’s powerful tools exist in the command line, technically known as the “shell”. Fedora refers this as terminal for some complicated reasons, so I will use that term here. For those of you who don’t know, vi is the text editor to use in Linux. You can open any file in the terminal by typing vi followed by the filename.
So, in this case, you would type “vi /etc/wvdial.conf” in the terminal. Press “i” to start inserting text. Press ESC and then “:wq” to save and quit the text editor. If this doesn’t make any sense to you or if you are scared of the terminal, you can use the GUI based text editor that came with your Linux distribution. Try looking somewhere in the Accessories Menu. Also, you will be required to log in the “root” account to modify some of the configuration files. The “root” account is basically the Linux system administrator account. If you are not carefully, you can completely mess up your Linux installation when you are logged in this account, so its safer to use a normal user account for “normal” usage. Don’t worry, if you stick to what I have said here, nothing will go wrong.To login the root account, type “su” in the terminal. Enter your root password when prompted.
The Manual Pages
Secondly, it will help if you read the wvdial.conf and the wvdial documentation. This tutorial will make more sense. Type “man wvdial” and “man wvdial.conf” in the terminal. Infact, you can type “man” followed by any command or system configuration filename to get its complete description and usage.
For phone modems connected with data cable or normal internal modems
If you are using an inbuilt modem or even a mobile cable modem, you need to fine the modem’s device file path. Use the command “wvdialconf /etc/wvdial.conf” in the terminal and carefully observe the output. You will get the modem’s device file path. It should be something like “/dev/tty0″ or “/dev/ttyACM0″ or “/dev/ttyUSB0″. If you are using a data cable and a phone, chances are it will be one of the latter two. The thing is that each device(or everything rather) in Linux is treated as a file. For wvdial to use your modem, it needs the device’s file path.
For phone modems connected with Bluetooth
If you are using a phone connected with Bluetooth, the procedure is slightly longer. First of all, you need to get the Bluetooth MAC address for your phone. MAC stands for media access protocol and has nothing to do with either Apple Computers or MacDonalds burgers. Basically, every hardware device connected in a network is assigned a unique MAC address. Your LAN card also has one. Your Bluetooth dongle/inbuilt Bluetooth adapter has one. Your Bluetooth has one, and so does your phone. This address basically “recognizes” your device hardware on the network. To find this MAC address of your phone, type the following command in the terminal.
hcitool scan
You will get a list of all Bluetooth devices in range. Needless to say, your phone’s Bluetooth must be switched on and must be in discoverable mode. Your computer’s Bluetooth dongle, if external, must be plugged in; or switched on, if internal.
Now, type in the following command to bind your phone with the “rfcomm” file. Just type the following command to do so, replacing the <Address> with your phone’s Bluetooth MAC address…. without the brackets, the entire thing, with the “:” symbols in between.
rfcomm bind 0 <Address> 1
This basically binds your phone’s Bluetooth with /dev/rfcomm0 file. If you have done something like this before, there is a good chance that the above command may not work… or it may not work for other reasons too. It will give an error message if it doesn’t work. If it is already binded to another Bluetooth address, you can try another rfcomm file: rfcomm bind 7 <Address> 1 . Else, you need to create the rfcomm file by typing mknod /dev/rfcomm0 c 216 0. This doesn’t apply to you if your first bind rfcomm command worked!
Editing the wvdial.conf file
Like I said earlier, it will help if you have read the wvdial.conf documentation using “man wvdial.conf”. It will make the following process much more understandable and easier. If you are a bit clever, you might have guessed what to do already after reading this file.
For phone with data cable connection, or internal modem
Luckily, there is an inbuilt tool which will scan your computer and set up your wvdial.conf file. Bluetooth needs more configuration, but it will work fine with an internal or data cable connection. Type the following:
wvdialconf /etc/wvdial.conf
This will scan all the modem device files with all the port speeds. You will get something like this:
ttyS0<*1>: ATQ0 V1 E1 — failed with 2400 baud, next try: 9600 baud
ttyS0<*1>: ATQ0 V1 E1 — failed with 9600 baud, next try: 115200 baud
ttyS0<*1>: ATQ0 V1 E1 — and failed too at 115200, giving up.
ttyS1<*1>: ATQ0 V1 E1 — failed with 2400 baud, next try: 9600 baud
ttyS1<*1>: ATQ0 V1 E1 — failed with 9600 baud, next try: 115200 baud
ttyS1<*1>: ATQ0 V1 E1 — and failed too at 115200, giving up.
ttyS2<*1>: ATQ0 V1 E1 — failed with 2400 baud, next try: 9600 baud
ttyS2<*1>: ATQ0 V1 E1 — failed with 9600 baud, next try: 115200 baud
ttyS2<*1>: ATQ0 V1 E1 — and failed too at 115200, giving up.
ttyS3<*1>: ATQ0 V1 E1 — failed with 2400 baud, next try: 9600 baud
ttyS3<*1>: ATQ0 V1 E1 — failed with 9600 baud, next try: 115200 baud
ttyS3<*1>: ATQ0 V1 E1 — and failed too at 115200, giving up.
WvModem<*1>: Cannot get information for serial port.
ttyACM0<*1>: ATQ0 V1 E1 — OK
ttyACM0<*1>: ATQ0 V1 E1 Z — OK
ttyACM0<*1>: ATQ0 V1 E1 S0=0 — OK
ttyACM0<*1>: ATQ0 V1 E1 S0=0 &C1 — OK
ttyACM0<*1>: ATQ0 V1 E1 S0=0 &C1 &D2 — OK
ttyACM0<*1>: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0 — OK
ttyACM0<*1>: Modem Identifier: ATI — Nokia
ttyACM0<*1>: Speed 4800: AT — OK
ttyACM0<*1>: Speed 9600: AT — OK
ttyACM0<*1>: Speed 19200: AT — OK
ttyACM0<*1>: Speed 38400: AT — OK
ttyACM0<*1>: Speed 57600: AT — OK
ttyACM0<*1>: Speed 115200: AT — OK
ttyACM0<*1>: Speed 230400: AT — OK
ttyACM0<*1>: Speed 460800: AT — OK
ttyACM0<*1>: Max speed is 460800; that should be safe.
ttyACM0<*1>: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0 — OK
Found an USB modem on /dev/ttyACM0.
Modem configuration written to /etc/wvdial.conf.
ttyACM0<Info>: Speed 460800; init “ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0″
As you can read, it has found the modem in the “/dev/ttyACM0″ file, working at 460800. If your phone doesn’t support 3G or Edge, you might get a lower speed.
Edit the “/etc/wvdial.conf” to make some changes like editing your username, password and phone number to dial. For Airtel mobile office or other GPRS/Edge users, the phone number is *99# or *99***1#. Airtel mobile office users, the username and password is empty, syou can enter ” ” in both fields. Your file may look something like this:
[Dialer Defaults]
Init1 = ATZ
Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
Modem Type = USB Modem
ISDN = 0
New PPPD = yes
Phone = *99#
Modem = /dev/ttyACM0
Username = munim
Password = mydumbpassword
Baud = 460800
Now, all you have to do is to type “wvdial” in the terminal to get connected. If you are using Fedora, you will have to edit the resolv.conf file to edit the DNS server addresses to use the Internet, which I will explain after the Bluetooth explanation. But if you are on Ubuntu, you can open your browser and surf the Internet. Leave the terminal window open and press Ctrl+c in this window to disconnect after surfing.
For Bluetooth connections
You have your rfcomm device file ready. You might have to do the binding command each time you restart your Linux OS, depending on distribution. Open your “/etc/wvdial.conf” file using vi or any text editor. Delete everything there, if there is anything. Type the following, replacing the proper username and password and phone number, and the rfcomm file path if its different.
[Modem0]
Modem = /dev/rfcomm0
Baud = 230400
SetVolume = 0
DialCommand = ATDT
FlowControl = Hardware(CRTSCTS)
[Dialer GPRS]
Username = munim
Password = mydumbpassword
Phone = *99***1#
Mode = 1
Inherits = Modem0
[Dialer Defaults]
Modem = /dev/rfcomm0
Baud = 230400
Init1 = ATZ
Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
ISDN = 0
Modem Type = Analog Modem
Phone = *99***1#
Username = munim
Password = mydumbpassword
If you are a Linux guru, you might realize that one of the above section is not exactly needed. But according to what I have read in some forum, this works perfectly for most distributions. I don’t know.. I might be wrong. If you are not a guru, type the whole thing down. It won’t hurt a lot.
Now, to connect, type “wvdial GPRS” in the terminal. If you are using Fedora, you will have to edit the resolv.conf file to edit the DNS server addresses to use the Internet, which I will explain soon. But if you are on Ubuntu or something else, you can open your browser and surf the Internet. Leave the terminal window open and press Ctrl+c in this window to disconnect after surfing.
Editing the resolv.conf file
This only applies to users of Fedora, or probably any other distribution who can surf after connecting successfully. After type wvdial and connecting, note down the DNS nameservers’ IP addresses in the output. For Airtel mobile office users, it will be 202.56.250.5 and 202.56.250.6. It might have changed, but this is what it was at the time of writing this post. Don’t take chances, note down the DNS nameservers IP address. Now, open the “/etc/resolv.conf” file using vi in another terminal window or any other text editor. Create it if it doesn’t exist. Type the following, replacing with the DNS nameservers IP addresses you noted.
nameserver 202.56.250.5
nameserver 202.56.250.6
Save the file and exit. You must be able to use the Internet now.
Please note:
Don’t close the terminal window after starting “wvdial”! Leave it open when you are surfing. You can shift it to another workspace if you want to. After you finish using the Internet, press Ctrl+c to disconnect and then you can close the terminal window after you return to the prompt.
I hope you liked my first “HOW-TO” and it helped you access the Internet on your Linux OS. If you have any questions, you can email me at munim2020 at gmail or leave a comment here.


[...] noname01.com added an interesting post today on Configuring wvdial for Internet access in fedora, using a cell phone or a normal modemHere’s a small reading [...]
Thank you for your post. I also belong to this poor lost souls using Linux. Presently I am using ubuntu 7.10. In ubuntu I edit wvdial.conf file using sudo gedit /etc/wvdial.con Once I installed opensuse 10.3 and was at a loss because I didn’t know how to edit my wvdial.conf file like I used to do in ubuntu. I also searched google by typing “how to edit wvdial.conf file in opensuse” Now it’s quite clear to me. But I’ll not rush to install opensuse, I am at ease with ubuntu, kde desktop is attractive but I can’t use it effectively. I love the simple gnome desktop.
Thanks for your comments Nitin. By the way, I actually think Gnome is more attractive than KDE. Install Compiz config and emerald themer.. and then see!
hey !
you can have look at mine http://shubuntu.blogspot.com/2008/04/use-your-mobile-as-external-modem-in.html
I didn’t know the bluetooth thing…It was useful.
thanks for ur procedure in configuring wvdial_up connection.