How to: Linux/Ubuntu 8.10 and Ubuntu 9/04 dial up networking in Zimbabwe

Despite all the talk about Broadband at a global scale, dial up networking still remains dominant in Zimbabwe and in some localities its either VSAT or (analogue) dial up. The last time I tried to get a VSAT quotation for my company: I got blank looks from the sales ladies at Zimbabwe Online (ZOL) and Africaonline. The best I got was "What is VSAT?"

This how to applies to Debian and Ubuntu distributions but other distributions can use it provided there have the program wvdial installed.

What you need.

1.) A modem preferabley an external one. I cannot say this often enough; most internal modems are winmodems. External modems can be bought for around $US 33. I know some Indian shops near Ximex mall that sell these.

2.) An account internet account with a local Internet Service Provider (ISP). I prefer ZOL they offer affordable dial up at around $10 which comes with an email account @zol.co.zw plus you get to avoid the dreaded Telone gateway. (If you don't know what it is don't worry.) You can try Comone they offer unlimeted dial up at $7 plus an email account @comone.co.zw. Mweb is good, like ZOL they have their own gateway but like Africaonline they need customers with deep pockets! If you cannot afford an account you can use ZOL's Free Ryder package free. Yes free internet in Zimbabwe!

N.B For this how to we will assume you are using a ZOL free rider package. If you have an account with another ISP you can use this too.

3) A dial in number. For ZOL the local number in Harare is 70905, for Mweb 70908 for Comone 041. For ZOL Mutare the number is 68124. Find from you ISP what the dial in number for your local town is. This important otherwise you might end up paying for trunk calls. Here is one advantage of using Comone; their number is always 041 whether you are in Mutorashanga or Borrowdale. Long distances also mean slower connections.

4) Of course you need a computer!

N.B If you are using Ubuntu 8.10 that is all you need. But If you have Ubuntu 9.04 you need internet access to download the wvdial package and its dependents. Do not worry the whole collection is only about 1.5MB in size.

INSTALLING wvdial

1.) If you have Ubuntu 8.10 and below wvdial is installed by default. But in Jacky Jantlope (9.04) wvdial is not even on the installation disk! The best way to find if wvdial is installed is to open the terminal and typing the following command:

$ whereis wvdial

If you get a response like

wvdial:

Then wvdial is not installed and you need to download it. Got to step 2. However if you get the response.

wvdial: /usr/bin/wvdial /etc/wvdial.conf /usr/share/man/man1/wvdial.1.gz

wvdial is installed then proceed to step 3.

2)

Donwloading

Visit the page http://packages.ubuntu.com/intrepid/wvdial and download wvdial, libwvstreams4.4-base, libwvstreams4.4-extras, libxplc0.3.13,libuniconf4.4. These are the only packages you need. All the other dependent packages like debconf are installed. Save the files to a flash disk or burn them to a disk. Many internet cafes with good speed charge a $1 for 45 minutes. You can visit the Ecoweb cafe in First street if you are in Harare.

Installing
Navigate to the folder in which you saved the packages install them.

3) Configuring wvdial

The configuration for wvdial are stored in a text file /etc/wvdial.conf

First connect your modem and make sure it is switched on. Now open a terminal and type the following command:

sudo wvdialconf

Wvdial will be probe you ports for a modem and configure it. You will get output like the one below.

postman@claremontestates:~$ sudo wvdialconf
[sudo] password for postman:
Editing `/etc/wvdial.conf'.

Scanning your serial ports for a modem.

ttyS0<*1>: ATQ0 V1 E1 -- OK
ttyS0<*1>: ATQ0 V1 E1 Z -- OK
ttyS0<*1>: ATQ0 V1 E1 S0=0 -- OK
ttyS0<*1>: ATQ0 V1 E1 S0=0 &C1 -- OK
ttyS0<*1>: ATQ0 V1 E1 S0=0 &C1 &D2 -- OK
ttyS0<*1>: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0 -- OK
ttyS0<*1>: Modem Identifier: ATI -- 56000
ttyS0<*1>: Speed 4800: AT -- OK
ttyS0<*1>: Speed 9600: AT -- OK
ttyS0<*1>: Speed 19200: AT -- OK
ttyS0<*1>: Speed 38400: AT -- OK
ttyS0<*1>: Speed 57600: AT -- OK
ttyS0<*1>: Speed 115200: AT -- OK
ttyS0<*1>: Max speed is 115200; that should be safe.
ttyS0<*1>: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0 -- OK
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.
Modem Port Scan<*1>: S2 S3

Found a modem on /dev/ttyS0.
Modem configuration written to /etc/wvdial.conf.
ttyS0: Speed 115200; init "ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0"
postman@claremontestates:~$

As said the output is stored in /etc/wvdial.conf .You might get different output depending with your modem.

3) Configuring your dial up account

Type the following command on the command prompt:

sudo cp /etc/wvdial.conf /etc/wvdial.conf.bak

You should always back up configuration files first. In the words of the Apache team " You have been warned!"

Now type the following command in the terminal:

sudo gedit /etc/wvdial.conf

And edit the Phone, Username and Password fields to look like the ones below. Please remove the preceding ; before these lines.


[Dialer Defaults]

Phone = 70905
Username = free@hrezol
Password = ilovezol

Stupid mode = on

This configuration really works as it is if you are in Harare and it is either weekend or between 0000hrs and 0800hrs week days! You might want to replace the username,phone and password values with the corresponding ones your ISP gave you if you want to be connected anytime.

N.B Free rider only works during weekends and between 0000hrs and 0800hrs so you will get "we failed to authenticate ourselves errors if you try to connect for using the Free ZOL accounts. Please note this limit does not apply to the account you created with your ISP.

4) Connecting

Open a terminal and type the following command:

sudo wvdial

You get something like:

ATZ
OK
--> Sending: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
OK
--> Modem initialized.
--> Sending: ATDP041
--> Waiting for carrier.
ATDP041
CONNECT 115200
--> Carrier detected. Waiting for prompt.
~[7f]}#@!}!/} }8}"}&} }*} } }#}$@#}%}&`[1f]q"}'}"}(}"73~
--> PPP negotiation detected.
--> Starting pppd at Sat Aug 15 16:15:30 2009
--> Pid of pppd: 9323
--> Using interface ppp0
--> pppd: xÕ Ò
--> pppd: xÕ Ò
--> pppd: xÕ Ò
--> pppd: xÕ Ò
--> local IP address 41.220.25.79
--> pppd: xÕ Ò
--> remote IP address 41.220.25.5
--> pppd: xÕ Ò
--> primary DNS address 194.133.122.47
--> pppd: xÕ Ò
--> secondary DNS address 194.133.122.42
--> pppd: xÕ Ò
--> pppd: xÕ Ò
--> Connect time 1.8 minutes.
--> pppd: xÕ Ò
--> pppd: xÕ Ò
--> pppd: xÕ Ò

The program will seem as if it has hung. That's OK! Open Firefox or whatever your favorite browser is and happy surfing.

5) Trouble shooting.

You might see the above screen and be not able to connect. This is usually because the kernel has not replaced the default route. Try the following:

i) Open a another terminal and type:

sudo route add default ppp0

Try to visit www.google.com or any other internet page from your browser. You should now be able to view the page. You will need to do this every time you get connected. To permanently solve the problem however open a terminal and type the following command:

sudo gedit /etc/ppp/peers/wvdial

Add the following line to the file and save.

replacedefaulteroute

Save and close. You will not have to type the route add default ppp0 command after you add this line.

Configuring wvdial for Pulse dialing.

For all I know the exchanges in Harare and most major cities are digital. However in places like Nyanga they still use analogue technology. (As an aside if your exchange uses analogue technology you will be limited to 24kbps. It does not matter you have a modem the size of the earth that can handle 200000000kbps or you are located just outside the exchange. The maximum speed will be 24kps.) If you want to know whether your exchange uses analogue (pulse dialing) or not : you have an analogue exchange if you hear pauses and/ pulsating sounds in your ear-piece whenever you dial a number. Another way to know is when you dial up using the number you ISP gave using the wvdial as above your phone quiclky returns to dial tone and you are not connected.

To configure wvdial to use pulse dialing instead of tone dialing (which is the default) add the following line to the file /etc/wvdial.conf

Dial Command = ATDP

Please post a comment after you are connected. Would like to hear what you think of this guide.

Comments