
Modem usage is accomplished through drivers, sometimes some helper software,
and the core communication work horse "pppd". Usually it will be found at
/usr/sbin/pppd with permissions shown on my Ubuntu system by:
$ ls -l /usr/sbin/pppd
-rwsr-xr--  1 root dip 257720 2006-07-05 08:58 /usr/sbin/pppd
The s means "sticky" meaning only one person can use pppd at a time.
As installed, it requires Root/Adm permissions to use pppd, directly or
through front end dialer tools.  This is a security precaution common to
all COMM channels. But if you want to enable a simple User to dialout,
as is basically OK for a single user PC, do:
$ su - root
# chmod a+x /usr/sbin/pppd
or for Ubuntu:
$ sudo chmod a+x /usr/sbin/pppd
after which there will be seen:
$ ls -l /usr/sbin/pppd
-rwsr-xr-x  1 root dip 257720 2006-07-05 08:58 /usr/sbin/pppd
with the last x meaning any one can execute pppd, either directly or
much more commonly through a front end dialer such as wvdial of KPPP.

Configuration file for wvdial
-------------------------------
There is a very smart dialer utility "wvdial" 
which can be used once basic modem setup is accomplished.  A configuration file
is needed, which begins below with [Dialer defaults].  This file can be accessed
any where by:
$ wvdial --config Path_to/configuration_file
Most commonly the configuration file is saved as:
	/etc/wvdial.conf
whereat it will serve all Users of the computer. If saved as:
	/home/LoginName/.wvdial.rc
it will be found and used before  /etc/wvdial.conf. Note that "." beginning
a file name means "do not show it", except through usage of:
$ ls -a 
Many local configuration files are thus "hidden" in your /home/LoginName/ folder

Some Linux installations have dialup tools like Kinternet, GnomePPP, and the
Redhat/Fedora Internet Connection Wizard which are front ends for wvdial and
will write /etc/wvdial.conf files.  For this reason, it is advisable to test
your configuration file first, before copying it to /etc/wvdial.conf. Typically
a first test is run with:
$ sudo wvdialconf wvtest
   which will search ports with names:  /dev/modem /dev/ttyS* /dev/rfcomm*.
   A successful ouput include a section like:
WvModem<*1>: Cannot get information for serial port.
ttySL0<*1>: ATQ0 V1 E1 -- OK
ttySL0<*1>: ATQ0 V1 E1 Z -- OK
ttySL0<*1>: ATQ0 V1 E1 S0=0 -- OK
ttySL0<*1>: ATQ0 V1 E1 S0=0 &C1 -- OK
ttySL0<*1>: ATQ0 V1 E1 S0=0 &C1 &D2 -- OK
ttySL0<*1>: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0 -- OK
   Note: above lines are testing the driver, modem firmware is then first read by ATI
ttySL0<*1>: Modem Identifier: ATI -- SmartLink Soft Modem
ttySL0<*1>: Speed 4800: AT -- OK
ttySL0<*1>: Speed 9600: AT -- OK
ttySL0<*1>: Speed 19200: AT -- OK
ttySL0<*1>: Speed 38400: AT -- OK
ttySL0<*1>: Speed 57600: AT -- OK
ttySL0<*1>: Speed 115200: AT -- OK
ttySL0<*1>: Speed 230400: AT -- OK
ttySL0<*1>: Speed 460800: AT -- OK
ttySL0<*1>: Max speed is 460800; that should be safe.
ttySL0<*1>: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0 -- OK

Found a modem on /dev/ttySL0.
Modem configuration written to wvtest.
ttySL0<Info>: Speed 460800; init "ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0"
------
will be included in a successful run, where in this case /dev/ttySL0 
is the responding device port.  The generated wvtest file is:
[Dialer Defaults]
Modem = /dev/ttySL0
Baud = 460800
Init1 = ATZ
Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
ISDN = 0
Modem Type = Analog Modem
; Phone = <Target Phone Number>
; Username = <Your Login Name>
; Password = <Your Password>

which at a minimim must be edited to a form like:
[Dialer Defaults]
Modem = /dev/ttySL0
Baud = 115200
Init1 = ATZ
Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
ISDN = 0
Modem Type = Analog Modem
Phone = 3334445555
Username = Your_Login_Name
Password = Your_Password

Additional if your modem port is of the type /dev/pts/N , with N a number,
then there MUST be added a line:
 Carrier Check  =  no
This requirement currently applies to dialups using the helper utility: slmodemd
together with slamr, slusb or ALSA modem drivers, OR the  "      "    : martian_helper
used with the martian_dev  for Lucent/Agere modems with DSP chipsets.

Then a test dialput can be done with:
$ sudo wvdial --config wvtest

There are some Systems for which the wvdialconf test will stall at rfcomm ports.
This is a wvdialconf bug and can be bypassed by just using wvdial with a trial
wvtest, but you need to specify the port appropriate to your modem.

If the configuration file below, lines beginning with # are comments.
Removing a # will activate a line with wvdial instructions appropriate to 
special circumstances.


[Dialer defaults]
# Lines begining with # are comments.
# wvdial will look for this file at  /etc/wvdial.conf  or  /home/LoginName/.wvdial.rc

# Redhat/Fedora have an  Internet Connection Wizard in the popup menus 
# ICW will write a two part  /etc/wvdial.conf supporting multiple modem usage.

Modem = ModemPort
# typically a symbolic link to the true port is used, /dev/modem or /dev/ttyS*
# wvdialconf will test all port names /dev/modem and /dev/ttyS*

Init1 = ATZ
Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
#  Lack of dialtone acquisition can be due to low line voltage,
#    a common problem in Italy.
#  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
# a MS=90 option is sometimes necessary for Internet Providers with buggy V92 protocols:
#  Init2 = ATQ0 V1 E1 S0=0 X3 &C1 &D2  +MS=90
ISDN = 0
Modem Type = Analog Modem
# Dial Command = ATDP
## replaces Touch Tone prefix ATDT to Dialout_phone_number, with older Pulse prefix ATDP

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

# the following lines is NEEDED only for usage with slmodemd or martian_helper
Carrier check = no
# Kinternet appears to add it automatically.

## 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/

# to dial an alternate provide use "wvdial 2nd" which will preferentially read:
[Dialer 2nd]
Phone =  2nd_phone_number
Username = 2nd_LoginName
Password = 2nd_PassWord

## End wvdial config file

