Saturday, 20 February 2010

Linux How-to: Configure a Dial-up Modem (Re-post)

Original Article 27/02/08
What to do when you need to get on-line, but wireless broadband isn't available or isn't allowed? Having one web space only accessible via verified dial up link, not to mention the lack of broadband at my parents place, I had to dust off the dial-up modem in the laptop. Then I remembered that Linux has never been great with dial-up modems; they are an ancient, diverse and unfashionable category of hardware, built on perverse layers of software, chipsets, hardware abstractions and drivers.

There's a very good How-to on the Ubuntu support pages under that tries to cover all bases for the five main modem families, while one or other of the six methods will probably work if you know a little of what you're doing! This is a walk-through of the most basic. Bear in mind this example is specific to the Conexant HSF modem in my Dell 6400.

For this I'll assume you know your ISP, dial up numbers, Login, password and have a means to lookup and get files onto the machine you're configuring.

The essential steps
  1. Find out what modem you've got; even if you've got manuals and driver CD's, assume nothing. You will need the right info for a Linux install.
  2. Get an appropriate driver (in this lucky case, a package; otherwise you'll need the source code to compile), install it.
  3. Configure your dial-up account.

Run scanModem utility
To find out what modem you've got, the best method I've found is to run the truly remarkable scanModem utility. For this you need to get the latest version of the utility:

unpack it  with the tar command
# tar xcvf scanModem.tar.gz

In a terminal, change to the folder, then run scanModem;
# cd Modem
# ./scanModem

This runs a whole stack of scripts to interrogate your hardware. You should get output like this;
Identifying PCI bus slots with candidate modems.
 === Finished modem firmware and bootup diagnostics section. ===
 === Next deducing cogent software ===
Analysing card in PCI bus 00:1b.0, writing to scanout.00:1b.0
  The High Definition Audio card with PCI ID 8086:27d8 may host a soft modem chip.
Using scanout.00:1b.0 data, and writing guidance to ModemData.txt
Writing Intel.txt
Writing Conexant.txt

 Writing residual guidance customized to your System.
   A subfolder Modem/  has been written,  containing these files with more detailed Information:
1stRead.txt    Conexant.txt   DriverCompiling.txt  InfoGeneral.txt
Intel.txt      ModemData.txt  Rational.txt        scanout.00:1b.0
SoftModem.txt  Testing.txt    UNSUBSCRIBE.txt     wvdial.txt
       Please read 1stRead.txt first for Guidance.

A round of applause for scanModem for doing all that and leaving you with at least thirteen text files, which will tell you more than you ever wanted to know.

What the scanModem files tell you.
1stRead.txt: Start here. This file outlines what files scanModem wrote specific to your modem chipset , such as Smartlink.txt, Conexant.txt, Intel.txt , etc.
YourSystem.txt and ModemData.txt: These contain guidance about your particular set-up, outlining sound and modem components and their addresses (old versions may still refer to one file, YourModem.txt).
DriverCompiling.txt: This explains the roles of additional files which may have to be installed to support compiling of modem drivers and the steps to take if you need to compile from source.
SoftModem.txt: Information and instructions about 'soft modems' - virtual devices sitting on top of the hardware chipset. Most 56k modems have a host ID for the primary audio or modem controller (soft modem), with diverse subsystems to run the actual dial up link. It is the chipset of the Subsystem which determines the driver you need.
Intel.txt, Conexant.txt: info file about the modem 'family' detected in your machine, providing guidance on what drivers to use. You may get one or more modem family files depending on the controller and chipset.
Testing.txt: (formerly ModemTesting.txt) read this after your drivers have been installed to help you test.
wvdial.txt: this is sample a wvdial configuration file – the text file that contains the dial-up settings - we'll generate our own wvdial.conf file later.
InfoGeneral.txt: has general information about the status of win-modem support under Linux. Do read this if ModemData.txt  reports that your current modem is not supported under Linux.
Others: scanout.00:1b.0 contains technical output from the scanModem diagnostics. Rational.txt and Unsubscribe.txt contain general info from the scanModem development team.

Using the scanModem results
In my case, scanModem identified 2 possible types - Conexant 56K ACLink Modem OR Agere V92 Modem. In the ModemData.txt , I found:
The modem symbolic link is /dev/modem -> ttySHSF0
This is the logical modem device name that we'll need to configure.
More usefully, it also gave me;
Support type needed or chipset:   hsfmodem
supported by:
Codec: Conexant HSF
Address: 1
Vendor Id: 0x14f12bfa
Subsystem Id: 0x14f100c3
Revision Id: 0x90000

In my Conexant.txt file, this goes into more detail. Vendor ID, sub-systems and revision numbers are useful for the more obscure models.

Get the Driver
Modem drivers are not, to my knowledge, supported in the repositories, so you will have to track them down yourself using a combination of user forums and search engines.

If you're lucky enough to see an HSF-type modem, you can get a driver package. I've found the Dell HSF driver [hsfmodem_7.60.00.18oem_i386.deb] also works in non-Dell machines. Modem drivers for Linux are often commercially supported, for example, the HSF Modem package from is a free test package providing only a low 14K speed; they charge a license fee for the full-speed 56k version.

Sticking with my basic example, I downloaded and installed hsfmodem_7.60.00.18oem_i386.deb. In Ubuntu you can use 'Open with GDebi Package installer' from the file manager and get the package utility to do the legwork for you - it will also flag any other package dependencies.

Configure Dial-up account through the Network Interface
If you go this route on a machine also equipped with wireless, my best advice is switch off your broadband router while you set-up and test your dial-up link. My wireless adapters have a habit of trying to reconnect the broadband even when I don't want it and that's just going to confuse things.

Open the Network Interface applet from the Gnome panel or from System > Administration > Network.

If all your drivers installed correctly you should now have an entry in the list for Modem Connection (status check-box will be empty). Select it, then choose Properties.

You get a three-tab properties pane to fill in.

In the General tab:
  • Check the box for 'enable this connection'.
  • Enter your dialling information.
  • Enter user account name and password

In the Modem tab:

The modem port should reference the logical modem name - /dev/modem in my example. As long as your driver installed OK, this should be selectable from the drop-down list.
  • Dial type should be set to Tones for most modems.
  • Volume can be anything you want, but I find it reassuring to hear the tone dial and the  connection handshake so I know its working.
In the Options tab:
  • I don't want dial-up as my default link, so I left Set modem as default route to internet blank.
  • My ISP doesn't mandate Use the Internet provider nameservers, so I left that blank.
  • As dial-up isn't so robust, I checked the box for Retry if the connection breaks or fails to start.
Click on the OK button. This will create one of those wvdial.conf files in the background which contains the account settings to use.

Dial now
Back in the Network GUI, you should now be able to check the box for Modem Connection to start the dialler!

You may want a visual clue to your connection status; you can add the Gnome Modem Monitor applet to the panel – right click an empty area on the panel, choose Add to Panel and Search on 'modem'; it will appear under the System and Hardware category.

This is the most straightforward example I've done. I've successfully used other methods and software to configure different machines, so if it doesn't go to plan because of your hardware, all is not lost. My outstanding challenge is to compile and configure the drivers on the Agere Systems modem in my other laptop, but at lease I have all the information from scanModem to help me.  RC

No comments:

Post a Comment

At least try to be nice, it won't kill you...