Sunday, January 27, 2008

Dialup in Linux-For Newbies

For new Linux users configuring their system for dialup net connection seems tougher if they are having the built in modem. The main reason is most software modems are based on Windows and they dont get detected in Linux. For that, corresponding drivers should be installed. googling will help in finding the corresponding drivers.

For example if your modem in WinXP is Modem-Agere Systems PCI Soft Modem(COM3), the driver agrsm can be used.

Before installing the driver be sure that the kernel headers are installed. The kernel names will be like
linux-headers-2.6.18-4
linux-headers-2.6.18-4-686
kernel-kbuild-2.6-18

The agrsm tar should downloaded from the site. Do the following steps
tar xzvf agrsm-***.tar.gz
cd agrsm
make
make install
The above steps will complete the driver installation. Then load the drivers
1) Next load the drivers
modprobe agrmodem
modprobe agrserial
which should announce creation of /dev/ttyAGS3

2) It is convient to create symbolic links, which dialer utilities will follow,to the real port /dev/ttyAGS3 .
ln -s /dev/ttyAGS3 /dev/ttySAGR
ln -s /dev/ttyAGS3 /dev/modem
Check with:
ls -l /dev/ttyAGS3 /dev/ttySAGR /dev/modem
whose output should include:
/dev/modem --> /dev/ttyAGS3
/dev/ttySAGR --> /dev/ttyAGS3

3) The first critical functial test is:
wvdialconf /etc/wvdial.conf
which searches through potential ports for modem responses.
A success will end with a section like:
--------
ttySAGR<*1>: Modem Identifier: ATI -- Agere SoftModem Version 2.1.40
ttySAGR<*1>: Speed 4800: AT -- OK
ttySAGR<*1>: Speed 9600: AT -- OK
ttySAGR<*1>: Speed 19200: AT -- OK
ttySAGR<*1>: Speed 38400: AT -- OK
ttySAGR<*1>: Speed 57600: AT -- OK
ttySAGR<*1>: Speed 115200: AT -- OK
ttySAGR<*1>: Max speed is 115200; that should be safe.
ttySAGR<*1>: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0 -- OK

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

Dialout Procedure
First edit in your dialout information with:

emacs /etc/wvdial.conf

In the sample below, the lines beginning with are informative, not essential.
The line order is not important.

[Dialer defaults]
# Lines begining with # are comments.
# wvdial will look for this file at /etc/wvdial.conf
# or /home/LoginName/.wvdial.rc
Baud = 115200
Modem = /dev/ttySAGR3
Init1 = ATZ
Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
# Lack of dialtone acquisition can be due to low line voltage
# Try inserting a "dial without waiting": X3
# Init2 = ATQ0 V1 E1 S0=0 X3 &C1 &D2 +FCLASS=0
# In case of connection instabilities, specify a lower frequency:
# Init2 = ATQ0 V1 E1 S0=0 X3 &C1 &D2 +MS=34

## Outside the USA, a country setting may be needed
# Init3 = AT+CGI=hexadecimal_country_code

ISDN = 0
Modem Type = Analog Modem
Phone = Dialout_phone_number
# if going through a switch board, a perhaps necessary pause can produced with a comma:
# Phone = 1,Dialout_phone_number
Username = LoginName
# if Internet Provider is MSN.net, use under Linux: MSN/LoginName
Password = YourPassWord

## If CONNECT is achieved but browsing fails, try activating the following line
# Auto DNS = yes
## To make a logfile wvdial.out
# wvdial 2>&1 | tee wvdial.out
# # For some Internet providers, the following line is necessary
# Stupid Mode = yes
## for other wvdial options, do "man wvdial" or see the documentation in
## /usr/share/doc/wvdial/
## End wvdial.conf

The above procedure will work if you have installed wvdialconf wvstreams and other required packages.
Ok next time meet me through linux;-)

1 comment:

Anonymous said...

it works..