
                            SpeedTouchUSB-HOWTO
                using Benoit Papillault's OpenSource drivers

                                                                Authors :
                                    Sylvain Trias [1]bozo_fr@caramail.com
                                     Edouard Gomez [2]ed.gomez@wanadoo.fr
                                   Bernard Brandl [3]brandl@tuxfamily.org
                                                                        [
                                 Last Modifications : November 13th 2001]

Table Of Contents

    1. [4]Introduction
    2. [5]Required
    3. [6]Installation/Configuration
         1. [7]Your kernel
         2. [8]Benoit's Drivers
         3. [9]Pppd
    4. [10]Launching the connection
    5. [11]Where to find (more) Help ?
   ______________________________________________________________________

Introduction

   This document will guide you through the installation of Benoit
   Papillaut's open source driver for the Alcatel USB SpeedTouch modem.
   ______________________________________________________________________

  Required:

     * Benoit's drivers
     * Alcatel's microcode for the modem
     * A kernel with usb support (2.4.x kernels are a good choice but
       2.2.x kernels work too)
     * pppd

      Donwload Benoit's drivers

   Download the latest version of the drivers from Benoit's [12] Site
   
   Driver releases are named as follows : speedtouch-2001xxxx.tar.gz (
   date is yyyymmdd)

      Download Alcatel's Modem firmware

   What you need to download is the modem's microcode provided with
   Alcatel's drivers. You have two possibilities:

   It can be found in the form of two files:
     * A mgmt.o file found in the GNU/Linux package
     * A alcaudsl.sys file found in the WindowsTM package

   (If your modem is already running under windows, you can avoid
   downloading it by taking the file in c:\windows\system).


    GNU/Linux drivers on Alcatel's site :
    [13]http://www.alcatel.com/consumer/dsl/dvrreg_lx.htm

   Warning:

   Just download Alcatel's drivers and uncompress them. Do NOT install
   them. You only need them for the microcode (ie a piece of software
   loaded into the modem at initialization)

      A note about linux kernels

   Benoit's drivers work very well with 2.4.x series, but it is possible
   to make them run under 2.2.18 and highers as they use USB code from
   2.4.x kernels.

   If you're not at ease with kernel compilation, don't be happy worry
   and pray. Recent distros are likely to provide an operationnal kernel
   (Mandrake 8.x/RH 7.x/Debian Potato/Woody/Sid for example).
   Nevertheless, it is preferable to build your own kernel for many
   reasons that could not be explain in this document. Another good
   reason to do so is that you can apply a patch on a kernel module,
   preventing a bug when your connection is restarted.

   As a conclusion :

     If you choose to build a new kernel try to pick a recent one: USB
     support is getting better with versions.


    Url to download Linux's kernel : [14]http://www.kernel.org

   NB : Avoid 2.4.5 like the plague as it keeps swapping and trashing all
   the time

      pppd version

   pppd should work from 2.3.11 version (this was the elder version we
   had for testing)
   ______________________________________________________________________

Installation/Configuration :

   This is a two step job:
     * Kernel configuration
     * Pppd Configuration

  Kernel Configuration

   To allow Benoit's drivers to work, your kernel has to have a few
   options enabled. Configure it with your everyday options and carefully
   add the following ones:

    USB support

   Your kernel obviously has to support USB to run Alcatel Speedtouch.

   Depending on your USB controller (chipset on motherboard/pci card),
   you'll have to choose between two modules: UHCI or OHCI
   Without explaining the whole thing, these are two USB incompatible
   norms.
   This is why you have to know which chipset is yours.

   To determine which to use :
   # lspci -v | grep USB

   You should obtain something like :

   usb-ohci : CMD technologies Inc|USB0670B
   usb-uhci : USB Controller: Intel Corporation 82371AB PIIX4 USB (rev
   01) (prog-if 00 [UHCI])

   If your chipset uses OHCI norm, you'll have to pick usb-ohci
   (surprising !).
   If, on the contrary, it uses UHCI norm you'll have to choose between
   usb-uhci or uhci. They should work both, but in case you have problems
   setting usb support with a module, pick the other one, and pray !

      Options to allow usb support :

     <M>/<*> Support for USB (CONFIG_USB)
     <*> Preliminary USB device filesystem (CONFIG_USB_DEVICEFS)
     <M> UHCI (Intel PIIX4, VIA, ...) support (CONFIG_USB_UHCI)
     <M> UHCI Alternate Driver (JE) support (CONFIG_USB_UHCI_ALT)
     <M> OHCI (Compaq, iMacs, OPTi, SiS, ALi, ...) support
     (CONFIG_USB_OHCI)

    PPP support

   You'll need ppp support in your kernel. If needed compile these parts:

     <M> PPP (point-to-point protocol) support (CONFIG_PPP)
     <M> PPP support for sync tty ports (CONFIG_PPP_SYNC_TTY)

    HDLC support

   This part is more sensible. If you want to allow proper reconnection,
   you'll have to patch this module.
   Take it easy, you'll find the patch in the drivers'tarball ans the
   command line to run is simple :
   # cd /usr/src/linux
   # patch -p1 --dry-run < /path/to/drivers/n_hdlc.c.diff  (watchout: two
   - before dry-run ! )

   If you don't get error message, type the real command to currently
   patch the kernel sources
   #patch -p1 < /path/to/drivers/n_hdlc.c.diff

   You can continue, now :

     Character devices --->
     [*] Non-standard serial port support
     <M> HDLC line discipline support
     [*]Unix98 PTY support

  Installing the drivers

   This installation is straightforward uncompress the drivers'tarball by
   typing :
   # tar xvzf speedtouch-xxx.tar.gz

   cd into the new directory and type :
   # ./configure && make

   If everything ran fine su root and finish the install by typing :
   # make install

   Greetings, the drivers should now be installed
   NB: check your path if you can't run modem_run, as it is copied in
   /usr/local/bin

  Creation of the PPP devices

   Cd into your /dev directory :
   # cd /dev

   Check ppp devices existence doing :
   # ls *ppp*

   If the ls command gives you an output go to the next step, else create
   all ppp devices typing :
   # ./MAKEDEV ppp

  Pppd configuration

   Check your pppd version by typing :
   # pppd --version.

   Drivers are tested with pppd 2.4.0 and 2.4.1. They also run fine with
   older versions, per example pppd 2.3.11 shiped with the Potato Debian
   GNU/Linux.

   To configure pppd, you'll have to edit 4 files.

    1st file :

   You should have an /etc/ppp/options file, edit it and keep these 4
   lines in it (comment all extra lines with a #)

   ------------------ /etc/ppp/options Beginning -------------
   noauth
   usepeerdns
   lock
   noipdefault
   ------------------ /etc/ppp/options End ------------------

    2nd file

   Create /etc/ppp/peers/adsl :
   # mkdir /etc/ppp/peers
   # touch /etc/ppp/peers/adsl

   Copy and paste what follows (without the "---" ;) )

   -------------------/etc/ppp/peers/adsl Beginning------------
   #
   # This file could be rename but its place is under /etc/ppp/peers
   # To connect to Internet using this configuration file
   # pppd call adsl, where "adsl" stands for the name of this file
   #
   debug
   kdebug 1
   noipdefault
   defaultroute
   pty "/usr/local/bin/pppoa2 -vpi 8 -vci 35"
   sync
   user "your_login_here"
   noauth
   noaccomp
   nopcomp
   noccp
   novj
   holdoff 4
   persist
   maxfail 25
   usepeerdns
   ------------------/etc/ppp/peers/adsl EOF------------------

   A new version of pppoa, named pppoa3, is available. So you can change
   the pty "/usr/local/bin/pppoa2 -vpi 8 -vci 35" line by pty
   "/usr/local/bin/pppoa3 -c -m 1 -vpi 8 -vci 35"
   For more details about pppoa3, type "man pppoa3".

   Don't forget to adapt the vpi and vci values in the line :
   pty "/usr/local/bin/pppoa2 -vpi 8 -vci 35"

      Note about the VCI/VPI pair [ if you are hurry go to the next section ;^)
      ] :

   As your connection goes through ATM, 2 new parameters appear :

     * VPI : Virtual Path ID
     * VCI : Virtual Circuit ID

   What are their function ?

   That's a good question. They are used to identify your Virtual Path
   Connection (VP) and your Virtual Circuit Connection (VC).
   They simplify the network management, minimizing connection delays.
   They allow cell commutation too.

   An ATM network looks like this :
VC--------|----|-------------|----|--------
VC--------| VP |             | VP |--------
VC--------|----| Transmition |----|--------
               |    Path     |
VC--------|----|             |----|--------
VC--------| VP |             | VP |--------
VC--------|----|-------------|----|--------

    3rd file :

   2 protocols can be used by providers to identify their users: CHAP or
   PAP.
   Depending on your provider, edit /etc/ppp/chap-secrets or
   /etc/ppp/pap-secrets.

   These fields look like this :

   -------------------/etc/ppp/chap-secrets Begining--------------
   # client server secret IP addresses
   "your_login_here" "*" "your_password_here" "*"
   -------------------/etc/ppp/chap-secrets End-------------------

   If you don't know what protocol is used by your provider, you can fill
   in both files, it won't hurt.

    4th file :

   Edit /etc/modules.conf (or /etc/conf.modules if your system is a bit
   old) and add the following lines :

   alias char-major-108  ppp_generic
   alias /dev/ppp ppp_generic
   alias tty-ldisc-3 ppp_async
   alias tty-ldisc-13 n_hdlc
   alias tty-ldisc-14 ppp_synctty
   alias ppp-compress-21 bsd_comp
   alias ppp-compress-24 ppp_deflate
   alias ppp-compress-26 ppp_deflate

   Some entries are useless, but once again they won't hurt !
   ______________________________________________________________________

  Launching the connection

   You'll have to :
     * Load modem's microcode
     * Start pppd

   NB: to launch the connection, it is almost mandatory to be logged as
   root.

    Verifications

   Check if all modules are loaded (if you didn't compile them directly
   into the kernel) :
   # modprobe ppp_generic
   # modprobe ppp_synctty
   # modprobe n_hdlc

   Then, check that usbdevfs is mounted :
   # modprobe usbcore
   # mount none /proc/bus/usb -t usbdevfs
   # modprobe usb-uhci or usb-ohci or uhci

      Load the firmware

   To load the microcode into the modem, simply type :
   # modem_run -m -f /path/to/mgmt.o
   or
   # modem_run -m -f /path/to/alcaudsl.sys

      Launch pppd

   Type (and pray) :
   # pppd call adsl

   Wait for a few seconds (20) and check if the link is up by typing :
   # ifconfig ppp0

   You should have a description of the interface.
   If not, well it's time to look for help (and so to read the next part
   of this howto).
   ______________________________________________________________________

Where to find (more) Help ?

  The MAN pages

   You should first look at the man pages, developers write them because
   they can give you usefull informations :-)
   man pppoa2, man pppoa3, man modem_run can give you the information
   you're looking for.

  User mailing list

   If you are searching for help from other users like you (Benoit is
   also on this mailing list, so it's useless to send an email to the
   list AND to him). This mailing list is for you, you can discuss
   anything that's related to the SpeedTouch USB modem (off topic are :
   Windows , NAT configuration, DNS setup, ...). Both French and English
   are accepted, but not HTML.

   First of all, read the [15]archive of this mailing list before
   subscribing. Your problem may already have a solution.
   To subscribe to the list, send an email to
   [16]speedtouch-request@ml.free.fr with subscribe as the subject.

  IRC

   If your prefer to get a direct help or would like to discuss design of
   the driver, there is a channel for you. It is sometimes very active
   and sometimes it seems every one is sleeping. Be aware that French &
   English are mixed.
   Serveur : irc.openprojects.net
   Channel : #speedtouch
   Known nicknames :
   benoit : Benoit PAPILLAULT
   francoiss : Franois ROGLER
   GomGom : Edouard GOMEZ
   ______________________________________________________________________

   [17]Benoit PAPILLAUT's Driver homepage

Rfrences

   1. mailto:bozo_fr@caramail.com
   2. mailto:ed.gomez@wanadoo.fr
   3. mailto:brandl@tuxfamily.org
   4. SpeedTouch-HOWTO-en.html#intro
   5. SpeedTouch-HOWTO-en.html#requis
   6. SpeedTouch-HOWTO-en.html#install
   7. SpeedTouch-HOWTO-en.html#noyau
   8. SpeedTouch-HOWTO-en.html#drivers
   9. SpeedTouch-HOWTO-en.html#pppd
  10. SpeedTouch-HOWTO-en.html#connec
  11. SpeedTouch-HOWTO-en.html#aide
  12. http://benoit.papillault.free.fr/speedtouch/user.html
  13. http://www.alcatel.com/consumer/dsl/dvrreg_lx.htm
  14. http://www.kernel.org/
  15. http://www.mail-archive.com/speedtouch@ml.free.fr
  16. mailto:speedtouch-request@ml.free.fr
  17. http://benoit.papillault.free.fr/speedtouch/
