DialupModemHowto

Revision 26 as of 2006-01-20 10:55:53

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.

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

Software modems

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 (an exe file in windows terms), 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.

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 is for you.

Everything your modem should need, is the package sl-modem-daemon, which you can install via apt-get or Synaptic, e.g. $ sudo apt-get install sl-modem-daemon. After the installation of this package, there should exist the device /dev/modem and you can go on configuring your dialup connection.

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". 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? "
    see the "Modems supported by ALSA drivers" section of this page.

}}}

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.

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 go on configuring your dialup connection. (FIXME: create device link to /dev/modem on boot?)

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 14.99 US dollars. That comes with one year support 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 14.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

  • 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 :(

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 defaultroute 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".

CategoryDocumentation