DialupModemHowto

Revision 61 as of 2006-05-28 01:44:24

Clear message

This page tries to help you setting up the driver and configuration for a dialup connection over a modem. There are two parts to that:

  • Identifying the type of modem you are using and installing its driver
  • Configuring the dialup connection to your provider

Unfortunately these steps are not done automatically during the Ubuntu installation, but this is work in progress and will hopefully be improved in future releases.

Installing the driver for your modem

Basically, there are two types of modems:

  1. Software modems (Winmodems), which are usually delivered as PCI or USB devices or builtin with desktop PCs and laptops these days: Some of these are not supported under Linux, some are. If you bought your computer or modem recently (since ~ 2000), chances are, that you have one of this kind. A Winmodem is a combination of hardware known as chipset (much less than in a true pure hardware modem) and software (written for the infamous Windows operating systems family). A Linmodem is a Winmodem working under the famous Linux operating system. This can be accomplished thanks to the Linmodems.org project.

  2. Hardware modems, which are connected to the serial port for example and process the raw modem commands themselves: they have become very rare, but are well supported.

Software modems

Using scanModem Tool

There are different drivers available. To find out what kind of software modem you are using, in another machine, go to [http://www.linmodems.org linmodems.org], read the page, and download the scanModem tool (which will only recognize PCI and USB modems, not ISA modems). Copy it to your desktop in your Ubuntu machine, then open a command line and enter:

  •  $ cd ~/Desktop
     $ gunzip scanModem.gz 
     $ chmod +x scanModem 
     $ ./scanModem

Gunzip will 'unzip' the file, chmod will make it an executable (similar to an "exe" file in windows), and ./scanModem will run it. If it tells you to do something as Root by using su - root, instead just enter the commands it wants following a "sudo", e.g. $ sudo modprobe snd-intel8x0m. scanModem will scan your modem and tell you what it is and how to configure it. It will not configure it for you. But after running, you will see a number of new folders, including a 'Modem' folder. Read read1st.txt and modemdata.txt in there, praying that it recognized your modem. This is admittedly not a straight-forward read and might need some more reading around on above mentioned page to find out which drivers your modem needs. Then scan through the following sections to find out about the easiest way to install that driver under Ubuntu.

Note: For many of the following drivers, you will need to enable the universe/multiverse repositories. See AddingRepositoriesHowto. This requires you to have working network connection. You can also search for packages to download in another system and transfer to your Ubuntu installation at http://packages.ubuntu.com/ . Be careful with the dependencies... Check out this forum post for another way to get packages using the LiveCD on another system with network connection and a CD burner: http://www.ubuntuforums.org/showpost.php?p=893732&postcount=6

If compiling from source

On your way to configuring your modem drivers, you may find out that you need to compile from source (which means, typing commands beggining with sudo make). In that case, prior to compiling, do the following: Insert installation CD

sudo apt-get update
sudo apt-get install build-essential linux-headers-`uname -r`

If you need more packages for compiling, you can find them from http://archive.ubuntu.com Always check that your system satisfies the dependencies before installing a new package using this website. The website will list you a number of dependencies for each package. Make sure those dependencies are installed before installing a new package. You can use Synaptic or equivalent to check for installed packages.

Modems supported by ALSA drivers (snd_atiixp_modem, snd_via82xx_modem, snd_intel8x0m)

If Modem/ModemData.txt tells you that the modem can be set up by modprobing either snd_atiixp_modem, snd_via82xx_modem or snd_intel8x0mcd, this section may be for you. You need the sl-modem-daemon package.

  • If you can go online with your Ubuntu, you can install the package/daemon by enabling the  multiverse  repository and using synaptic or apt-get. Here is an excellent link for enabling repositories: http://www.ubuntulinux.nl/source-o-matic To install the package, open a terminal (alt+f2, type gnome-desktop -Ubuntu- or konsole -Kubuntu, hit enter) and copy paste the following:

sudo apt-get update
sudo apt-get install sl-modem-daemon
  • If you cannot go online with your Ubuntu, search for the package using http://packages.ubuntu.com/ in another network-enabled computer, download (link to .deb is given under the text "Architecture") and transfer the package for your version of Ubuntu to your Desktop. After making sure you do not have any other .deb files in your Desktop, open a terminal (alt+f2, type gnome-desktop -Ubuntu- or konsole -Kubuntu, hit enter), and type/copy-paste the following commands:

cd ~/Desktop
sudo dpkg -i *.deb

You can delete the .deb file you used if the installation went ok.

  • To set your country, run  sudo dpkg-reconfigure sl-modem-daemon -plow  and follow instructions on the terminal. Restart the daemon with  sudo /etc/init.d/sl-modem-daemon restart 

  • For further information to configure the daemon (if it is not working), see the following "text" files (using a text editor like gedit or nano):  /etc/default/sl-modem-daemon  and/or /usr/share/doc/sl-modem-daemon/README.Debian 

  • Now you can go on to use a dialing tool (see table of contents of this wiki page; preferably wvdial for slmodems).
  • If you get an error that says

FATAL: Module slamr not found.
SmartLink modem driver not available for this Kernel. Please read README.Debian
or try to install the package sl-modem-modules-2.6.15-20-686. Exiting...
invoke-rc.d: initscript sl-modem-daemon, action "start" failed.

You will need to follow the instructions per section "Modems supported by the Smartlink driver" in this wiki page.

Note: Every time you update your operating system core (called "the kernel"), you're going to have to run through the "Compiling the driver" procedure below again. This is usually the case, when you upgrade from one version of Ubuntu (e.g. 5.10 Breezy Badger) to another (e.g. 6.04 Dapper Drake).

Preliminaries

  • These are steps you will only have to run through the first time you build this driver, we're just making sure you have all the installed packages you need. If any of these packages are already installed, that's fine, but if not, use Synaptic, Adept, aptitude or apt-get to install them:
    1. build-essential
    2. linux-headers-ARCH
    3. fakeroot
    4. (in Breezy: gcc-3.4 (this is the compiler the Breezy-kernel was compiled with))

    Here, ARCH is your kernel flavour, which you can find out by running $ uname -r, which should give you something like VERSION-XX-ARCH (where ARCH is your kernel flavor, e.g. 386, 686, 686-smp, k7 or k7-smp if you use Intel, powerpc for PPC ...). You also need to install the source of the Smartlink driver itself:

    1. sl-modem-source
    2. sl-modem-daemon
    You can install all packages listed above at the same time.

Compiling the driver

  • Now you can use module-assistant, to easily compile and install the driver:
    1. $ sudo module-assistant auto-install sl-modem

    2. $ sudo depmod -a (this updates the list of available modules)

Getting the modem to work

  • Edit the "SLMODEMD_COUNTRY="-line of the file /etc/default/sl-modem-daemon to include your country. The other lines should be fine as default.

    For the last step, run $ sudo modprobe slamr and $ sudo /etc/init.d/sl-modem-daemon restart and the device /dev/modem should appear. You can now go on configuring your dialup connection. (PS: This driver seems rather finicky, a reboot may help.)

Note about alternative drivers for some slmodems

  • Some slmodems (those using the ALSA modem drivers, in this case) do not need compilation. An example is the winmodem of HP Pavilion zv5120us (which uses snd-atiixp-modem as the modem driver). Refer to your scanModem output if this is the case for you. To make such a modem work, see the section above about "Modems supported by ALSA drivers", or notes just below. This note on linmodems.org explains it:

    From http://archives.linmodems.org/21040 {{{Slamr has ceased to be the appropriate driver under more current 2.6.n kernels If your modem controller is one of these

    • PCI ID modem controller name/source low_level_driver
    • ======= =============== ======= ================= 1002:434d ATI snd-atiixp-modem 1002:4379 ATI " 1106:3068 VIA snd-via82xx-modem 10b9:5451 ALI 5451 audio with modem snd-ali5451-modem 8086:???? many Intel controllers snd-intel8x0m 10de:00d9 Nvidia Corp " 1039:7013 SIS 630 "
      • Others? "

}}}

Dapper 6.06 Special Instructions

Due to a [https://launchpad.net/distros/ubuntu/+source/sl-modem/+bug/31640 BUG] in Ubuntu Dapper, you may need to follow these instructions, instead of the above module compilation instructions. First, check whether the bug is fixed yet. If it is, you can do the above steps. Steps below were taken from [http://ubuntuforums.org/showpost.php?p=1011364&postcount=28 here].

1.Read the ubuntu wiki dialupmodemhowto, the steps below only compliment the wiki and you should have all the preliminaries done as described for the Smartlink modem, but you can omit installing gcc-3.4 as this is not required for dapper. Basically the sl-modem driver has to be installed first and then the sl-modem-daemon. The daemon in the repositories will work after an installation, but the /dev/ttySL0 will not be rewritten and the symlink to /dev/modem will not exist after a reboot. The new daemon found in the debian repos solve this. There was a mention that the daemon now looks for ungrab-winmodem and if you get an error message refering to this, you may need to install as well. 2.Download sl-modem-daemon2.9.9d+e-pre2-5.deb and sl-modem_2.9.9d+e-pre2.orig.tar.gz from the debian website http://packages.debian.org/unstable/misc/sl-modem-daemon. I have found that the slmodem-2.9.11-20051101.tar.gz works better in dapper and this can also be downloaded from the linmodem website http://phep2.technion.ac.il/linmodems/packages/smartlink/. 3.It may also be required that you download and install the ungrab-winmodem from the linmodem website as well. 4.Copy the sl-modem-daemon file to your local repository and update your Packages.gz file, this will allow you to install with Synaptic etc. Or use your favourite way to install a .deb file. 5.Copy the sl-modem_2.9.9+e-pre2.orig.tar.gz ( or preferably the slmodem-2.9.11-20051101.tar.gz) file to your Desktop and right click on it and select “Extract here” and a folder wth the same name will be created with the extracted files on your desktop. 6.Now rename the folder to an easier name such as “slmodem” 7.Open a terminal and cd in to the slmodem folder 8.Type make 9.Type sudo make install 10.Type sudo modprobe slamr 11.Type dmesg | grep slamr 12.Now install sl-modem-daemon2.9.9d+e-pre2-5.deb with Synaptic or in your own favourite way. 13.Use Kppp to query the modem, if this works you are there! 14.Edit /etc/default/sl-modem-daemon to change the line SLMODEMD_COUNTRY= USA to i.e SOUTHAFRICA or your country 15.Type sudo /etc/init.d/sl-modem-daemon restart to restart the daemon. 16.If you do a “Query modem” in Kppp and you will see that your country has changed. 17.It seems as if the Smartlink modems with Netodragon chip MDV92XP does not work, but the ND92XPA chip works.

Modems supported by the Lucent driver

This section is for you if the output of scanModem tells you something like: 'The modem has a supported Lucent/Agere DSP (digital signal processing) chipset.'. You will be able to use a driver from the "restricted-modules" package, which should be installed by default.

  • (To check that the necessary package is installed, use your package manager, e.g. Synaptic or Adept. You need to look for a package, which is called linux-restricted-modules-ARCH, where ARCH is the last part of the $ uname -r output, i.e. your kernel flavor. If it is not installed yet, install it there.)

Setup steps:

  • In a terminal type
      $ sudo sh -c "echo lt_serial >> /etc/modules"
      $ sudo sh -c "echo lt_modem >> /etc/modules"
    to add them to the module autoloading list.
  • Since udev rewrites /dev on each boot, and some dialup programs rely on the existence of /dev/modem, you need to have a symlink created on boot (from /dev/ttyLTM0 to /dev/modem). To do this, create the file /etc/udev/rules.d/10-local.rules, and put these lines in it:
      #ltmodem 
      KERNEL="ttyLTM0", SYMLINK="modem"
  • Now load the drivers for the first time:
      $ sudo modprobe lt_serial
      $ sudo modprobe lt_modem

    This should have created the device /dev/modem and you can now go on to configure your dialup connection.

  • No, I get an error about "FATAL: module not found" for this step Sad :(

    Note for "5.04 Hoary" users: Ubuntu 5.04 Hoary was shipped with kernel 2.6.10, which has some problems with these modules. To fix, change the grub boot commands /boot/grub/menu.lst as follows (pci=routeirq is new):

      ## ## Start Default Options ##
      ## default kernel options
      ## default kernel options for automagic boot options
      ## If you want special options for specifiv kernels use kopt_x_y_z
      ## where x.y.z is kernel version. Minor versions can be omitted.
      ## e.g. kopt=root=/dev/hda1 ro
      # kopt=root=/dev/hda1 ro pci=routeirq

    Do not forget to update grub: $ sudo update-grub

Modems supported by the Intel536EP driver

This page describes how to install the driver for the Intel 536EP internal modem on Ubuntu for i386 systems. Some of these are sold as Cnet modems and have Ambient chips on board. The process below is quick easy and works quite well.

The procedure is fairly similar for Ubuntu releases 4.10, 5.04 and 5.10. There is a minor complication on 5.10, discussed below.

  • As of this writing, compilation and usage has been tested on 5.10; only compilation has been tested on 5.04 and nothing at all tested on 4.10. I'll test these when I find the time; if anyone else succeeds (or fails), please update this page.

Update (2006-Jan-11 - RicardoChavez):

I have an Intel 537EP modem and it worked both on 4.10 and 5.04 using the drivers from the Intel page. The only drawback was that wvdialconf seemed not to recognize /dev/modem (it only scanned /dev/ttyS*). My (rather dangerous) solution was to (backup and) replace one of the /dev/ttyS* with a symlink to /dev/537 so wvdialconf could recognize it. Besides that, there were no other inconveniences. Hope this is useful.

There are 4 steps in this howto:

  1. Install required Ubuntu packages
  2. Download required files
  3. Compile the driver
  4. Install the driver

Install required Ubuntu packages

  • Here, ARCH is your kernel flavour, which you can find out by running $ uname -r, which should give you something like VERSION-XX-ARCH (where ARCH is your kernel flavor, e.g. 386, 686, 686-smp, k7 or k7-smp if you use Intel, powerpc for PPC ...).

    Ubuntu 4.10 and 5.04

    You will need to install the build-essential and linux-headers-ARCH packages. Both of these are on the install CD. One way to install these two packages is to type the following in a terminal (Applications->System Tools->Terminal):

      $ sudo apt-get install build-essential linux-headers-386
    You may be prompted for a password; if so, enter your user password.

    See SynapticHowto and AptGetHowTo for more on installing packages.

    Ubuntu 5.10 The procedure for 5.10 is similar; unfortunately, some packages necessary for installing the modem driver are not on the Ubuntu 5.10 install CD.

    First, install the build-essential and linux-headers-ARCH packages, as for Ubuntu 4.10 and 5.04 (to get a terminal, use Application->Accessories->Terminal):

     sudo apt-get install build-essential linux-headers-386

    Now, you need also need to install the gcc-3.4 package. If you can connect to the Internet while running 5.10, and have setup your repositories, or perhaps if you have an Ubuntu 5.10 DVD, this is as simple as

     sudo apt-get install gcc-3.4
    It is more likely that you cannot connect to the Internet running Breezy: why would you need a modem driver otherwise? In this case, you will need to download the 3 files listed below on a system which is connected to the Internet, and you'll need to somehow make the files available to your 5.10 system (e.g., write the files to a CD or memory stick, or use a shared hard-drive partition). The files are the Ubuntu package files for gcc-3.4-base, cpp-3.4 and gcc-3.4. The appropriate files, at the time of writing, can be found here: Assuming you have downloaded the files, and know where they are, you

    can install them using dpkg:

     sudo dpkg -i gcc-3.4-base_3.4.4-6ubuntu8_i386.deb
     sudo dpkg -i cpp-3.4_3.4.4-6ubuntu8_i386.deb
     sudo dpkg -i gcc-3.4_3.4.4-6ubuntu8_i386.deb
    The order is important.

Get the driver itself

Compiling the driver

  • First we need to uncompress the downloaded file. Start a terminal window and run the following command:
     tar xzf Intel-536EP-4.71.tgz
    This assumes you saved the file downloaded from Intel in your home

    directory; otherwise, type cd <directory-where-the-file-is> before typing the tar command above.

    This will create a directory Intel-536 with the source contained in it. Change to this directory by typing

     cd Intel-536
    Still in the terminal window, type the following:
     make clean
    This should produce output looking like this:
     Try `uname --help' for more information.
     cd coredrv; make clean
     make[1]: Entering directory `/home/rory/Intel-536/coredrv'
     rm -f *.ko *.o *~ core
     make[1]: Leaving directory `/home/rory/Intel-536/coredrv'
     rm -f *.o *.ko
    Now type
     make 536
    This will result in many lines of output being printed to the terminal window; you can ignore most of them. The final lines should look like this:
       CC      /home/rory/Intel-536/coredrv/Intel536.mod.o
       LD [M]  /home/rory/Intel-536/coredrv/Intel536.ko
     make[2]: Leaving directory `/usr/src/linux-headers-2.6.12-9-386'
     make[1]: Leaving directory `/home/rory/Intel-536/coredrv'

    There should be an Intel536.ko file in the directory now; test this by typing ls -l Intel536.ko; the output should look like

     -rw-r--r--  1 rory rory 1070520 2005-10-16 21:02 Intel536.ko
    Your dates and times will be different. If you are using Breezy, the file size (1070520) should be the same.

Installing the driver

  • There are two steps to installing the driver. The first is to copy the Intel536.ko file created above to an appropriate directory, and the second is to cause the driver to be loaded at boot time.

    Installing the Intel536.ko file Copy the file to the modules directory by this command:

     sudo cp Intel536.ko /lib/modules/$(uname -r)/kernel/drivers/char
    You may be prompted for a password; if so, enter your user password.

    Make your system aware of this module with depmod:

     sudo depmod -a

    Finally, load the driver with the modprobe command:

     sudo modprobe Intel536
    This command should not print a response; if it prints something like this:
     FATAL: Module Intel536 not found.
    you have made an error; most likely you have copied the file to the wrong place. If you see a different error message, there may be an error in the module, or your modem, or you may not have a Intel 536-based modem.

    Loading the driver at boot time

    To load the module at boot time, we need to add a line "Intel536" to the file /etc/modules. First make a backup of the file:

     sudo cp /etc/modules /etc/modules.backup
    Now add the required line as follows:
     sudo sh -c "echo Intel536 >> /etc/modules"

Using the modem

  • The name of your modem device is /dev/536ep0. You can now use

sudo pppconfig to set up pon & poff. To use Kppp you will need to create a symlink be able to link the /dev/536ep0 to /dev/modem. Udev rewrites the /dev on each reboot and you thus have to create a file /etc/udev/rules.d/10-local.rules and put the following lines in it:

  •  # Intelmodem536ep
     KERNEL="536ep0"' SYMLINK="modem"

Now reboot and you can use Kppp to query the modem as this is a quick check if all is well before dialling out. Configure KPP for your ISP connection. These Intel modems are found to be more stable and less finicky that the Smartlink types on Breezy.

Modems supported by the Conexant drivers

Note: If you need Conexant modem drivers, that company does not care as much about it's open source software customers. The linux driver is available only for purchase (from a different company). It costs 19.99 US dollars. That comes with at least one year support and kernel-version upgrades, after which you need to purchase it again if you are running a different kernel which needs a newer version of the driver. In general, you can buy a Lucent or Intel (smartlink, or other brand with intel chipset) modem for less than 19.99 US. Some Conexant modems can be run with the sl-modem-drivers (smart link)

Update (2005-Sept-22):

Quick Steps for setup of Conexant HSF driver

  • Note: this is not the same driver as above. The above one is free, not limited in speed and specific to only one modem model (pci id 14f1:2f00). Assuming you know everything there is to know about your setup, all you need to do is:

    Get the ZIPped Debian hsfmodem package from [http://www.linuxant.com/drivers/ Linuxant] from another connected machine (find the Ubuntu 5.10 package). Remember to extract the Debian package to the home user directory. You will use the terminal application to run the commands listed below. The terminal application looks in specific directories for ".deb" packages. If you download binary file then goto Step 3.

Step 1

Step 2

  • Then, after transferring that file to your unconnected $1,000+ paperweight, este, Ubuntu box, you first install gcc-3.4 and friends:
     $ mount /where/art/thou/gcc-3.4/
     $ cd /where/art/thou/gcc-3.4/
     $ sudo dpkg --install {gcc-3.4,g++-3.4,gcc-3.4-base,cpp-3.4}_3.4.4-6ubuntu8_i386.deb

Step 3

  • Then install hsfmodem:
     unzip hsfmodem_*.deb.zip          // extract to home user directory
     sudo dpkg --install hsfmodem_*.deb

Step 4

  • And finalize the modem driver installation:
     sudo hsfconfig

    sudo hsfconfig will prompt you about your location, your email address and license credentials, assuming you've purchased one; if not, then go by the FREE license key which will grant you up to 14.4 kbps connectivity only Sad :(

PCTel Modems

Original forum post here: http://ubuntuforums.org/showpost.php?p=928212&postcount=10 The OP couldn't edit the wiki, I thank him for his time and effort for contributing.

Following are the instructions:

In order to use PcTEL Micromodem 56 (HSP56 MicroModem Pctel, or any other modem supported by driver) you will have to switch to kernel 2.6.8.1 or lower. Even so, some units will NOT work with 2.6 kernel (consult README file in driver archive), but all of them work with 2.4 kernels. To make the short story long, going online on Ubuntu 5.10 aka. Breezy Badger you have to do four things: (before u do all this, read this section until the end) I. get some utilities (gcc & initrd among else) II. get vanilla kernel on www.kernel.org (I suggest) 2.6.8.1 III. Recompile the kernel IV.Install the driver and configure ppp

Here are the details: (I will assume your kernel source is in /usr/src

Open terminal and use root privileges

sudo apt-get install gcc-3.4 build-essential libncurses5-dev kernel-package gnome-ppp
#this step ensures you will have easier time later on
sudo ln -sf /usr/bin/gcc-3.4 /usr/bin/gcc # this will make your system use gcc 3.4 instead of 4.0.2 This is necessary because you will not be able to compile kernel with gcc-4 series

Go to your downloaded kernel folder {{{sudo tar -xvfj kernel-2.6.8.1.tar.gz cd kernel-2.6.8.1 sudo make mrproper sudo make xconfig #if xconfig doesn't work use menuconfig or gconfig instead }}} Configure your kernel if you know what you are doing, but you don't since you are reading this so don't do anything you are not 100% sure about.

File-> Load go to /boot and select config-2.6.12-9-386 or current config file (check with uname -r in a separate terminal)
sudo make-kpkg clean
sudo make-kpkg --initrd --revision=custom.1.0 kernel_image

After couple of hours, or less depending on you CPU....
cd /root
sudo dpkg -i kernel-image-2.6.8.1_custom.1.0_i386.deb

If something goes wrong you will have to delete folder in /usr/src with your new kernel's name, NOT your default kernel.

If something goes wrong, go to where your kernel source is and run sudo make clean  and repeat everything above. If you are using GRUB that's it. No more. If you are using LILO, google a bit and you'll find how to configure it.

Only one note here: you will not see standard Ubuntu splash on boot process; screen will be black, but the boot will go as normal. If you want to see what is happening go to /boot/grub and open menu.lst and under line that goes boot /boot/vmlinus something...something  quiet splash  delete  splash . Or, if you will you can go on-line and find a better way to do this. There are enough resources.

Second, if you are messing with configuration of the kernel, DO NOT change things you are not sure about. Sure, feel free to select only your graphic/music card or such things, but if you are not sure if you need something don't remove that. Remember, these are the settings that work.

  • Actually, if this compiled kernel doesn't work, you will have to add some changes... and here they are: (you can do this in the first attempt)

CONFIG_BLK_DEV_RAM=y
CONFIG_BLK_DEV_RAM_SIZE=16384
CONFIG_BLK_DEV_INITRD=y

These settings may be changed in Block Devices in kernel configuration or you can open file /boot/config-2.6.8.1 and look for these lines (if they don't exist, make them).First thing seems to be nesessary only on older Pcs, but what does old mean is beyond me. I have Pentium II 400 Mhz @ 128 Mb RAM and it takes three hours to compile kernel if no changes are made to config file. Final size is cca. 12 Mb, however fully customized kernel is around 2 MB and it takes 30 minutes to compile. You can speed up the process by killing gdm and all the stuf you dont need. Here is how to: f1+ctrl+alt and then use sudo

sudo /etc/init.d/gdm stop

now continue with  make menuconfig  ...

See http://www.falkotimme.com/howtos/debian_kernel2.6_compile/ for more help on this (kernel compilation) step.

You will now have to download modem drivers and install them. Simply run

sudo ./setup
Or in the ~/src folder
sudo ./configure
sudo make
sudo make install

from within the untarred modem driver directory. In order to use second method you will have to copy your kernel source to /usr/src. Do this Only AFTER you have successfuly compiled the kernel, and DO NOT compile it from /usr/src.

Final step: once you have sucessfuly compiled the kernel and the drivers you will whish to be able to load the drivers every time you boot the machine. Here is how you do it: go to /etc and look for file called modules. Open it and add following lines:

linmodem
pctel
pctel_hw

You can also load them by

sudo modprobe linmodem
sudo modprobe pctel
sudo modprobe pctel_hw

In the end, you will have two kernels you can chose among, if something goes wrong. Remmember that what you do by using one kernel will not be undone when you use the other one.

Hardware modems

Hardware modems don't need a special driver. If your modem connects to the serial port and you know the COM port, the device name is /dev/ttySx, where x is one less than the COM port number. For example, if your modem is on COM2, the device is /dev/ttyS1, or if your modem is on COM1, the device is /dev/ttyS0. You can use this device name to configure your dialup connection.

Note by RaduCristianFotescu: I experienced the problem of a non-detected and not working external hardware serial modem (which made pppconfig, wvdial[conf] and gnome-ppp unuseable) even after issuing a 'sudo ln -s /dev/ttyS0 /dev/modem'. Of course, it previously worked in Slackware and Mepis! Eventually I got it working by making sure the modem was ON and connected to the RS-232 at the time when the kernel was booting! I guess it's smth with the boot scripts...

Configuring the dialup connection to your provider

There are different tools, which can help you to configure & establish a dialup connection. Some of them are command line based (pppconfig & pon/poff, wvdialconf & wvdial), while others use a graphical interface (System => Administration => Networking, kppp, gnome-ppp).

With all these tools, to establish a dialup connection, the user has to be member of the "dip" and "dialout" groups, so put all users who are supposed to connect via dialup into these groups:

  •  $ sudo adduser USERNAME dip
     $ sudo adduser USERNAME dialout

where of course USERNAME has to be substituted.

You will also need to know the device node of your modem. The "Installing the driver"-section of this page should have told you about it. In case you don't know it, assume /dev/modem.

System => Administration => Networking (Ubuntu)

The Networking section of System => Administration will let you set up the ppp connection in a graphical interface. You have to know your device name, ISP phone number, username and password to set it up. You can also use the Gnome Modem Monitor and Network Monitor panel applets if you want to stop, start and monitor modem connections without opening the Networking GUI every time. Some people have had a problem with the modem dialing during bootup. This may be related to setting the modem as default route to the internet on the Options tab of Interface properties.

Note: It has been reported, that connections started with this interface might be very slow, if they work. You can try it, but if this is the case for you, just try one of the other options.

kppp (Kubuntu, but also possible on Ubuntu)

Kppp can be installed and comes with Kubuntu and is a very nice program with all the features you would like from a dialer. It has a nice window showing that it is connected and gives the duration as well. It can also be configured to calculate your telco connection cost. If it is not installed yet, you can install it with your package manager, e. g. $ sudo apt-get install kppp, and find it in the "Internet" section of the menu.

Every user, who is in the dip/dialout groups, can use kppp to configure, connect and manage a connection to an ISP. If you need help with its interface, go to "Help -- Handbook" or use the online handbook here: [WWW] http://docs.kde.org/stable/en/kdenetwork/kppp/

If you have problems with Authentification, you might want to edit /etc/ppp/peers/kppp-options and activate the line noauth by removing the comment sign.

pppconfig & pon/poff

This is a command line based option to manage dialup connections. This makes it very flexible, but maybe not so straightforward to configure.

Collecting Information

You will need:

  • Your ISP's phone number
  • Your username and password on the ISP
  • The name of the modem device (/dev/...)

Setting up ppp

  1. Open a terminal (Applications > System Tools > Terminal) and type

      $ sudo pppconfig
  2. You will be on the main menu. Choose 'Create Create a connection'.
  3. Leave the name as 'provider', hit 'Ok'.
  4. Select 'Dynamic Use dynamic DNS', hit 'Ok'.
  5. Select 'PAP Peer Authentication Protocol', hit 'Ok'.
  6. Enter your user name for the ISP, hit 'Ok'.
  7. Enter your password for the ISP, hit 'Ok'.
  8. Leave the speed at 115200 as recommended, hit 'Ok'.
  9. Choose Tone or Pulse dialing, hit 'Ok'.
  10. Enter the phone number to your ISP (do not use any dashes), hit 'Ok'.
  11. You can try to have your modem detected automatically, but it did not work for me, even on my easily detectable external modem.
  12. If the modem wasn't detected, it will ask you for the port your modem is on. Enter the device name for your modem, hit 'Ok'.
  13. A summary screen will appear and give you the opportunity to make changes if needed.
  14. Choose 'Finished Write files and return to main menu.'.
  15. Choose 'Quit Exit this utility'.
  16. Exit the terminal window, type:

      $ exit

Connecting to the ISP

Log out and back in (for the group setting to take effect). Every "dialout/dip" user will now be able to connect and disconnect with these commands:

  •  $ pon    # connect to the ISP configured as "provider"
     $ poff   # disconnect the ISP configured as "provider"

You can also check the last messages generated by these commands with:

  •  $ plog   # shows the (status) messages generated by pon and poff

If you want to configure more ISPs, start pppconfig again, go through the steps, but give it a different name in step 3 (e.g. provider2). You can then (dis)connect by pon provider2 and poff provider2.

Changing speaker volume

To quiet or silence the connection noises (dialing, negotiation, etc.), follow these steps:

  1. Open a terminal (Applications > System Tools > Terminal) and type

     $ sudo nano /etc/chatscripts/provider
  2. Locate the line marked 'OK-AT-OK'.
  3. Change 'ATDT' to 'ATxxDT', where 'xx' is one of the following:
    • M0 Silence the speaker
    • L1 Low volume
    • L2 Medium volume
    • L3 High volume For example: ATM0DT. Leave the rest of the line unchanged.
  4. Save the file (Ctrl-o) and exit (Ctrl-x).

Using Modem Lights panel-application

While it's good to be able to get online, it'd be nice to have a single way to either connect or disconnect.

The easiest way is by using Modem Lights. Right click on the top panel, select 'Add to panel', and choose 'Modem Lights'. If your modem device is other than ttyS0, you'll have to configure the app. Right-click Modem Lights, choose Preferences -> Advanced, and change the lock file to point to your modem device.

For example, if you have an internal modem on /dev/modem, the Device would be ppp0 and the Lock File /var/lock/LCK..modem

Besides allowing you to connect and disconnect with a single click, Modem Lights also gives you information on how long you've been connected, and a graphical view of your modem's activity.

wvdialconf & wvdial

I prefer wvdial, because it tells you whether your modem is configured or not. Type in a terminal

  •  $ sudo wvdialconf /etc/wvdial.conf

If it says 'no modem found' or something similar, sorry... the driver for your modem seems not to be installed properly yet. The lack of a /dev/modem is not supposed to break wvdial's configuration. If the modem is found, finish the setup with:

  •  $ sudo nano /etc/wvdial.conf

After opening the wvdial.conf file, input your ISP information where needed (look inside the file for fields) and add other options that might be needed for your software modem. You will know what these options are if you asked for help from linmodems.org mailing list. Examples options that you can try to add, if dialling does not work:

  • add X3 to Init2 (means dial without waiting)

  • add Carrier Check = no as a new line (useful for Smartlink modems)

  • add Stupid mode = on as a new line (will start pppd immediately--required by some ISPs)

Typing man wvdial.conf in a separate terminal will give details on options.

Once you are ready, save the file (Ctrl-o) and exit (Ctrl-x), and try to dial:

  • sudo wvdial

will dial and connect. Upon connection, it will spit out some information about your connection (local IP, remote IP, DNS address, etc.). Do not close the terminal where wvdial is running. Leave it alone until you want the connection to be terminated, and hit CTRL+C on that terminal once you want to end the connection.

If you lose the connection a short time after connecting (30 sec - 3 min), you might need to edit options for pppd:

sudo gedit /etc/ppp/options

Find lcp-echo-interval30 and lcp-echo-failure4. Comment out these options by adding a '#' at the start of these lines, eg. # lcp-echo-interval30 and # lcp-echo-failure4.

If you connect successfully but your Internet applications do not function (eg. web pages do not load in Firefox), you might need to add replacedefaultroute as a new line in the pppd option file.

gnome-ppp

gnome-ppp is a graphical frontend to wvdial and can be installed by $ sudo apt-get install gnome-ppp. You will find it in the Applications menu and the configuration is probably straightforward.

If wvdial works but you have problems connecting with gnome-ppp, view the wvdial.conf you created earlier in the wvdialconf section above:

sudo gedit /etc/wvdial.conf

open the wvdial.conf file that gnome-ppp creates (in a different location):

sudo gedit $HOME/.wvdial.conf

and compare the settings. Change the settings in the gnome-ppp wvdial so they match the settings in the functioning /etc/wvdial.conf. Do not delete lines--if you need to remove a setting, simply delete the text to the right of the = sign, eg. "Init3 = ". Despite the warning at the bottom of the gnome-ppp wvdial.conf file, you can add lines if necessary, eg. "Stupid Mode = on".

Discussion

CategoryDocumentation CategoryNetworking