Preface

After a serious session of postponing and not feeling like it, I wrote
this HOWTO. It contains everything I can think of that you
could/should/have to know to use this driver to it's fullest
capabilities. This HOWTO has explicit support for PPPoA and PPPoE, but
the driver can accommodate any ATM protocol available.

Copyright Information

This document is copyrighted 2001 by Johan Verrept.
Permission is granted to copy, distribute and/or modify this
document under the terms of the GNU Free Documentation
License, Version 1.1 or any later version published by the
Free Software Foundation;

Driver Description

This is a driver for the Alcatel SpeedTouch USB
ADSL modem. The driver itself consists of two different parts. A
kernel part and a user space part. Both parts were originally released
by Alcatel's modem branch,
now part of Thomson Multimedia.
The kernel module is released under the GNU General Public License.
The current maintainer is Duncan
Sands. The kernel module is responsible for all data traffic. It is
modeled as a Linux ATM
card. This allows you to use a wide range of protocols like PPPoA,
RFC2684 Bridging (allowing PPPoE), and others over PVC's and it supports
ATM signaling (SVC's).
The original user space part (speedmgmt) is maintained by Alcatel/Thomson. It is
distributed as a binary-only application. The Alcatel/Thomson application
only does management and firmware downloading. There is now an
open-source replacement (modem_run). It is available from the user space driver site.
The driver supports Plug-N-Play by using the Linux Hotplugging
package.

The choice between PPPoA and PPPoE depends on you provider. Most
providers support one protocol, some both. Consult the FAQ to see which protocol is applicable to you. If
you can choose, PPPoA has the least overhead and thus best
performance...

The First Step: Downloading.

General

You will need to download quite a few packages to get this thing
running.

The firmware to be loaded into the modem. You can either use the
file mgmt.o that comes with speedmgmt,
or the file alcaudsl.sys which comes with the windows drivers (it gets
installed in \windows\system).

PPPoA

For kernels older than 2.4.15, the PPPoA
kernel patch (grab the most recent one smaller than your current
kernel version) by Jens Axboe. Newer
kernels already include this patch.

A PPP over ATM aware PPP daemon. To see if you already have one,
run the command

find /usr/lib/pppd -name pppoatm.so

If the result is "No such file or directory" then you will have to
download an ATM aware PPP daemon. Try these
packages.Remark: Debian users can use alien
to change rpm packages into the Debian deb format.
Remark: If dependency problems are stopping you from installing the
SuSe packages, you can try recompiling the source rpms that SuSe provides.

Remark: Off course, do not forget to replace the 'x' with
your version number!Remark: Do not apply both the PPPoA and PPPoE patches!
They collide.Remark: If you are using Mandrake 8.0, you can skip this
part. The kernel supplied with Mandrake 8.0 already contains the
nescessary patches.Remark: If you are using Mandrake 8.1, you can skip this
HOWTO! Mandrake 8.1 contains an rpm with the driver.

Applying PPPoA patches

Only necessary if you are going to use PPPoA! Only necessary if your
kernel is older than 2.4.15!
Now, go to the kernel directory.

cd /usr/src/linux

Unzip the patch:

gzip -d pppoatm-1.gz

Apply the patch:

patch -p1 -s -E < /path/to/pppoatm-1

Ready.

Applying PPPoE patches

Only necessary if you are going to use PPPoE!
Now, go to the kernel directory.

cd /usr/src/linux

Unzip the patch:

gzip -d br2684-against2.4.2.diff.gz

Apply the patch:

patch -p1 -s -E < /path/to/br2684-against2.4.2.diff

Ready.

The Third Step: Configuring the kernel

For easily configuring the kernel type:

cd /usr/src/linux/make menuconfig

You will need to set the following options:

Code Maturity Level Options

Prompt for development and/or incomplete code/drivers [Y]

Loadable Module Support

Enable Loadable Module Support [Y]

General Setup

Support for hot-pluggable devices [Y]

Networking Options

Packet Socket [Y]

Asynchronous Transfer Mode (ATM) (EXPERIMENTAL) [Y]

Network Device Support

PPP (Point-to-Point Protocol) Support [Y]

PPP Deflate Compression [Y]

USB Support

Support for USB [Y]

Preliminary USB Device Filesystem [Y]

UHCI (Intel PIIX4, VIA,...) Support [M]

OHCI (Compaq, iMacs, OPTi, SiS, ALi, ...) support [M]

For PPPoA you will need the following options:

Network Device Support

PPP Over ATM (EXPERIMENTAL) [Y]

For PPPoE you will need these options:

Networking Options

RFC 1483/2684 Bridged protocols [Y]

Network Device Support

PPP Over Ethernet (EXPERIMENTAL) [Y]

Remark: These are the options needed to get this driver
running. you will also have to enable the other drivers you need for
your system. A good starting point to determine what these are are
the (currently) loaded modules. For more information on how to build a
kernel see theLinux Kernel HOWTO.

The Fourth Step: Building and Installing the Kernel

After configuring, this is easy!
Go to the kernel directory.

cd /usr/src/linux

Type:

make depmake bzImagemake modulesmake installmake modules_install

Congratulations with your new kernel!
Do not forget to reboot before you continue! Remark: If your kernel refuses to build correctly, try to do a:

make mrproper

Before you try the above sequence.

As a quick check you can type:

uname -a

to see if your new kernel has booted. It should return something like:

Linux infinty 2.4.4 #4 Sun May 6 04:09:45 CEST 2001 i686
unknown

If there are any problems in installing and getting your kernel to run,
please consult the Linux
Kernel HOWTO or the documentation of your distribution.

The Fifth Step: Building the SpeedTouch Kernel Module

Untar, build and install the SpeedTouch module:

tar zxvf speedtouch-1.x.tar.gzcd speedtouchmakemake install

The last step needs to be done as root. Ready!

Remark: If you are using speedtouch-1.0.tar.gz, you can
edit speedtouch.c before building and installing it and remove the
following line:

#define DEBUG_PACKET 1

This will cause the module to use a LOT less CPU resources.

The Sixth Step: Installing Hotplugging.

If you have downloaded the RPM, you do:

rpm --install hotplug-XXXXX-1.noarch.rpm

If you downloaded the source archive:

tar zxvf hotplug-XXXXX-1.tar.gzmake install

Remark: This only work smoothly for RedHat systems,
installation instruction for other distributions can be found in the
hotplug README file.

Now, to make sure your hotplugging subsystem is started at boot
time:

cd /etc/rc.d/rc3.dln -s ../init.d/hotplug S07hotplug

To make sure hotpluggin is disabled at shutdown, add:

cd /etc/rc.d/rc3.dln -s ../init.d/hotplug K07hotplug

The Seventh Step: Installing the Binary Management Application

If you downloaded the speedmgmt package from Alcatel/Thomson,
untar and install it:

The Eight Step: Installing PPPoA/PPPoE

Installing PPPoA

First we need the pppd.
If /dev/ppp does not exist, we need to create it ourself:

cd /dev ./MAKEDEV ppp

If your distribution does not include the MAKEDEV script, or it fails
to create the correct device,
you can use the following command:

mknod /dev/ppp c 108 0

Now we install the pppd daemon:

rpm --install ppp-2.4.0b2-2.i386.rpm

Remark: Problems have been reported with
package ppp-2.4.0-2.i386.rpm, that is why I list a beta package here.Remark: If installation of this package fails because PAM
has not been installed (for example on a SuSE 7.1), please
download the source archive and compile the pppd by hand.

Installing PPPoE

First we install the ATM Package:

tar zxvf atm-0.78.tar.gzcd atmmakemake install

Remark: In RH 7.0, this package will probably fail the
compiling process. Do not worry, we only need the header files.

Now we compile and install the br2684ctl utility,

cc -o br2684ctl brctl-010226.c -latmcp br2684ctl /usr/sbin/

Make sure you do not have a pppd installed on your system. It will be
overwritten!
Now we install the pppd daemon:

The Ninth Step: Configuring the system

Configuring the usb subsystem

Add the following line to /etc/fstab:

/dev/usb /proc/bus/usb/ usbdevfs defaults 0 0

This will mount usbdevfs at boot time.

Remark: If you are using mgmt version 1.3.1 or
older, you must mount is under /proc/bus/usb/Version 1.3.2 will also look in /dev/usb/.Remark: If this gives errors during booting, check
whether /dev/usb is not already there. If it already exists, replace
/dev/usb in the above line with /dev/invalid . The exact name does not
matter, as long as it does not exist.

To mount it now type:

mount -a

Configuring PPPoA

Edit the file /etc/ppp/options and replace its contents with
the following:

These settings will cause pppd to check the link state and time out a
connection after 14 seconds if the link is broken. I chose this value
because If the ADSL line looses sync, it will take about 10
seconds to resync.

Remarks:You will need to replace the two "user@domain"s with your ADSL
username.

Also, in the above example "0.38" is the VPI/VCI ATM pair
for the author's provider. You will need to know what the correct
values are for your provider, and substitute those. If these values are
incorrect, you may sync, but will not be able to connect to your ISP's
IP layer, and probably be frustrated. These values can be obtained
from the Window's Alcatel client, your ISP or the FAQ

Edit the file /etc/ppp/chap-secrets and replace its
contents with the following:

These settings will cause pppd check the link state and to time out a
connection after 14 seconds if the link is broken. I chose this value
because If the ADSL line looses sync, it will take about 10
seconds to resync.

Remark: You will need to replace the two "user@domain"s
with your ADSL username.

Edit the file /etc/ppp/chap-secrets and replace its
contents with the following:

Remark: You will need to replace the "user@domain"s with
your ADSL username and "password" with your real password..

The Tenth Step: Running the driver

If everything went according to plan, the driver should start as soon
as you plug in the SpeedTouch USB modem. If the driver is installed
correctly, you will see the following sequence when plugging in the
modem:

Both LED's green for a very short period.

Left LED is blinking, right LED is green.

Left LED is green, right LED is green/red

Left LED is green, right LED is blinking

Both LED's are green.

In your /var/log/messages file or on your console you will see
at plugin:

Remark: the numbers in the message are purely dependent on
your ISP and your subscription.

If you want to dial in to your ISP, do the following:
For PPPoE only:

br2684ctl -b -c 0 -a 0.VP.VC

Remark: VP and VC are to be replaced with the VP/VC values of
your ISP. You will need to know what the correct values are for
your provider, and substitute those. If these values are incorrect, you
may sync, but will not be able to connect to your ISP's IP layer,
and probably be frustrated. These values can be obtained from the
Window's Alcatel client, your ISP or the FAQ

If modprobe complains about not finding the modules, go back to the
section about configuring the kernel, verify the configuration of the
USB subsystem. If nothing is wrong, go the section of making the kernel
and rerun:

make installmake install_modulesreboot

If this is all ok, check whether mgmt is running.

ps -ef | grep mgmt

This should return a line like:

root 3215
1 0 19:41 ? 00:00:00
/usr/sbin/speedmgmt

If it does not, then check your /var/log/messages.
If this shows something like:

If the numbers are all 0's, the ppp daemon is wrongly configured and it
is not sending data to the modem.
If the numbers are NOT zero, check whether you have used the correct
VP/VC settings and the correct protocol!

When I plug in the modem the LED sequence stops when the left one
is green and the right one is red/green.

You are using the Alcatel managment tool Version 1.3.2, which does not
work correctly. Please upgrade to 1.3.3 or a more recent version.

When I plugin my modem, the LED sequence never goes beyond step
two and the syslog gives something like:

Everything seems to work ok, but ppp refuses to connect.

You can try two things.
First, try to add the following option to your /etc/ppp/options
file.

usepeerdns

OR figure out the dns server of your provider (see Windows).
and edit your /etc/resolv.conf file.
It should look something like:
nameserver

nameserver aaa.bbb.ccc.dddnameserver eee.fff.ggg.hhh

with aaa.bbb.ccc.ddd and eee.fff.ggg.hhh mathcing the ip
addresses of your providers primary and secondary dns. Remark: If you have only one ip address, just leave out the
second line.

Appendix B: Some possible tweaks

Running without hotplugging.

It is entirely possible to run this driver without using the
hotplugging package. You can then disable the kernel option and
not install the hotplugging package.
If you wish to do this, you have to insert the speedtch.o module by
hand and start the mgmt daemon by hand.

modprobe speedtch.o/usr/sbin/speedmgmt &

There are no real rules. Just make sure you insert the module before
the line is in sync. From speedmgmt version 1.3.3 onwards, it no longer
matters when you insert the kernel module.

Automatically dialing in at modem plugin.

It is possible to have your system automatically dial in when your
modem is plugged in.
To do this you will have to edit the /etc/hotplug/usb/speedtouch
file.
For PPPoA it should look something like:

#!/bin/bash

# configuration and startup-script for the Alcatel SpeedTouch USB
modem

Important: There is a catch here though. The hotplugging
system does not yet support remove events. This means you will have to
kill your pppd or br2684ctl utility by hand otherwise you have problems
when plugging the modem in again.