Next Previous Contents

4. Specific installation instructions

4.1 Read this first

Installation instructions are given for the binary drivers described above, since the accompanying documention is scant (if existing at all) and can be very misleading. Installation of open-source drivers is not covered here, since it is usually better described by its own documentation, and varies more dramatically from package to package and from time to time.

Installation instructions for the Conexant driver are given, to the extent that they are known, above. This driver has not yet been thoroughly explored.

You may wish to use the installation script which may have accompanied your driver instead of following the instructions given here.

You should read through the instructions given below before beginning, to get a feeling for what's going on and where you might run into problems.

4.2 ISA

If your modem is an ISA PNP modem, make sure that the PNP resources have been appropriately allocated using isapnptools. (See "ISA Plug-n-Play" above.)

4.3 Obtain the driver package

See "Which Linmodem hardware is supported?" above for the approprate URL for the driver for your hardware.

If necessary, unpack the driver package in an empty directory with unzip (if .zip), tar -zxvf (if .tar.gz ), etc. The files present should include binaries with names like some-driver.o (e.g., in the example in the next step, the module is named ltmodem.o).

4.4 Perform a trial insertion of the module

A trial insertion of the module is a good first check to do. Though its results are not necessarily indicative of your final success, it is a fair indicator of whether the remaining steps will be worth your time.

In the directory in which the files were unzipped, perform the following steps, replacing ltmodem.o with the name of the appropriate module(s) for your modem:

First, try to simply insert the module with:

    insmod ltmodem.o
There may be a complaint such as:
  kernel-module version mismatch
  ltmodem.o was compiled for kernel version 2.2.12-20
  while this kernel is version 2.2.14.
If so, try forcing the insertion with:
   insmod -f ltmodem.o
Having done this, check for successful insertion into the kernel with:
  lsmod
which will, if insertion was successful, display a list including ltmodem.o such as:
Module                  Size  Used by
ltmodem               453200   0  (unused)
nls_iso8859-1           2268   1  (autoclean)
nls_cp437               3744   1  (autoclean)
vfat                    9052   1  (autoclean)
fat                    29248   1  (autoclean) [vfat]:
...

If the module (ltmodem) was not inserted, there is an outstanding problem. The some-driver.o may not be matched with the modem hardware; the differences between the sources from which the kernel and module were compiled may be too great; or, your module may require another module to be loaded beforehand (some PCTel packages have two modules; try reversing the insertion order of the two?). Before abandoning the current effort entirely, a more closely version matched kernel could be installed and tested. Source files for Linux kernels can be downloaded and already compiled kernels are available with many Linux distributions.

If the insertion was successful, it is worth proceeding further.

4.5 Align the module and kernel versions

4.6 Fix the 2.2.14 ppp.o if necessary and desirable

If you have a Lucent or ESS modem, and your kernel is more recent than 2.2.15-x), use of a ppp.o from 2.2.14 sources will be necessary. A copy of this module is available at http://walbran.org/sean/linux/stodolsk/ppp2214.o.

It can be copied to the appropiate /lib/modules/`uname -r`/net directory as described below. To avoid forcing insmod -f ppp.o, the mismatched ppp.o can be version fixed as described here for the example of a kernel version 2.2.17 mismatch.

  1. Type su root and give the password. Change to the working directory cd /root/modem
  2. Align the module version with the running kernel version: fixscript ppp2214.o pppfix.o
  3. Remove the original module from the kernel with: rmmod ppp, if it's already loaded
  4. insmod pppfix.o , which should proceed without any mismatch complaint.
  5. lsmod should display the inserted ppp in the list.
  6. If so, finally save the original module, found at (say) /lib/modules/2.2.17/net/ppp.o , by renaming it with:
    mv /lib/modules/2.2.17/net/ppp.o /lib/modules/2.2.17/net/ppp2217.o
    
    and place the fixed pppfix.o with
    cp pppfix.o /lib/modules/2.2.17/net/ppp.o
    

4.7 Copy your modules to the module directory

If not already done copy the other module file(s) (such as ltmodem.o,esscom.o, and pctel*.o) into the directory

/lib/modules/`uname -r`/misc/

4.8 Make the device file

If you wish to allow non-root users to dial out using this device, you can set the file permissions with, for example,
  chgrp uucp /dev/ttyS14
  chmod 666 /dev/ttyS14
Group definitions can be modified in /etc/group.

4.9 Link /dev/modem to the device file

ln -s /dev/yourdevicefile /dev/modem

4.10 Insert your module into the kernel

Note: if you chose to skip the "Align the module and kernel versions" step above, you may need to use "insmod -f" here.

4.11 Modifying your serial port configuration.

Your Linux system will in many cases need to be informed of the addition of the new "serial" device /dev/ttyS14 or 15.

Older kernels (2.0.x)

The drivers available tend to have been compiled for a kernel version 2.2.x, with x in the teens. However, if you are for some reason unable/unwilling to update your kernel, Werner Heuser (wehe(at)snafu.de) points out the following tips for older kernels:

With 2.0.x kernels, the serial ports are defined in the serial driver source itself, i.e. /usr/src/linux/drivers/char/serial.c; after 2.1.98, these moved to /usr/src/linux/include/asm-i386/serial.h and require CONFIG_SERIAL_MANY_PORTS, MULTIPORT and SHARE_IRQ to be set during kernel configuration. You should modify the appropriate line for your device file, i.e. either of

       /* UART CLK   PORT IRQ     FLAGS        */
...
       { 0, BASE_BAUD, 0x000, 0, 0 },        /* ttyS14 (spare; user configurable) */
       { 0, BASE_BAUD, 0x000, 0, 0 },        /* ttyS15 (spare; user configurable) */
to read something like
       { 0, BASE_BAUD, 0x0260, 3, STD_COM_FLAGS}},
with the appropriate port/irq for your hardware. When you boot the new kernel with these changes, you should see a message like the following:
Serial driver version 4.13 with no serial options enabled
tty00 at 0x03f8 (irq = 4) is a 16550A
tty14 at 0x0260 (irq = 3) is a 16550A

Newer kernels

With more modern Linux kernels, script files such as /etc/serial.conf and the program setserial are generally used to govern the parameters of serial ports; your configuration will likely have to be modified to accommodate the new device, though this apparently depends on your kernel/distribution of choice. The best reference for such modifications is David S. Lawyer's excellent Serial HOWTO, in particular the section on Setserial, where he notes, in particular, "Don't ever use setserial with Laptops (PCMCIA)". The documentation with your distribution should provide you with more information on the particular defaults and initialization scripts used.

As an example, Sean's laptop with the Lucent LT modem, running Red Hat 6.2/kernel 2.2.14-5, required no modifications to the ( in fact nonexistent) /etc/serial.conf whatsoever. With Marvin's PCI Lucent winmodem with a Debian installation, however, the following section is needed in the file /etc/serial.conf:


# These are two spare devices you can use to customize for 
# some board which is not supported above....
#
#Lucent Modem driver version 4.27.5.66
#  ltmodem.o was compiled for kernel version 2.2.12-20
#  with MANY_PORTS MULTIPORT SHARE_IRQ enabled
#  ttyS14 at 0x0260 (irq = 3) is a Lucent
/dev/ttyS14 uart 16450 port 0x0260 irq 3
#/dev/ttyS15 uart XXXXX port XXXX irq X
# These are the ports used for either the Usenet Serial II
# board, or the Boca Board 4, 8, or 16 port boards.

Whatever your particular configuration, conflicts for interrupt (IRQ) assignments are generally to be avoided. Information on your serial port properties can be displayed with:

   setserial -agv /dev/ttyS*
which returns information like:
/dev/ttyS0, Line 0, UART: 16550A, Port: 0x03f8, IRQ: 4
        Baud_base: 115200, close_delay: 50, divisor: 0
        closing_wait: 3000
        Flags: spd_normal skip_test session_lockout

/dev/ttyS14, Line 14, UART: 16950/954, Port: 0x0260, IRQ: 3
        Baud_base: 115200, close_delay: 50, divisor: 0
        closing_wait: 3000
        Flags: spd_normal skip_test

4.12 Try it out with a minimal terminal program

At this point you probably want to try dialing out with a simple terminal program like minicom.

4.13 Configure your ppp dialer

The name and location of these scripts depend on the particular Linux distribution (among Redhat, Debian, Suse and many others) and the particular software mediating the dialup (such as kppp and wvdial). Many distributions/dial-up software have a configuration utility which will request your input and then automatically generate the dial-up scripts. The minimum information required is:

If you have trouble, consult the documentation of your ppp dialer and/or the PPP-HOWTO. Example scripts for the particular example of pppconfig with Debian are given in the appendix.

4.14 Dial up

Try to connect to your ISP with the ppp dialer.

It works!

Congratulations!

It doesn't work!

Dang!

See the Troubleshooting and FAQ sections of this howto for some ideas on how to fix it.

4.15 Post-Installation

To avoid having to insert the module(s) in the kernel every time you want to dial in, see the appendix section "Coincident insertion and removal of ppp related modules."


Next Previous Contents