0. RedHat
8.0
If you use RedHat 8.0 then you
had better read this before going any further. I have found that a version
of the Benoit Papillaut driver works fine with this release, and what's more
is extremely easy to install. It also appears that the method proposed here
for RedHat 7.2/7.3 does not work with RedHat 8.0, I think this is due to
the version of the gcc compiler which is installed as standard with RH8 (gcc-3.2
instead of gcc-2.96). The problem seems to come at the compilation of "sarlib",
when error mesages appear such as
/usr/src/linux/include/linux/malloc.h:4:2: #error linux/malloc.h is deprecated, use linux/slab.h instead.
make: *** [sarlib.o] Error 1
This is typical of ANSI-standard
compatibility problems seen when passing from gcc-2.96 to gcc-3.2. (Thanks
to Bill Fisher and Gilles Yue for reporting this - and for their patience!).
I installed the package you'll find here
which is a version of the Papillaut driver. I did this by following their
instructions and it was a lot easier and faster than all that you will find
on this page. You may still find some of the information on configuring the connection
given here to be useful.
I don't know if this solution also works for RH7.2/7.3
(judging by the HTML address of the RPM webpage, it should work from 7.2
onwards...), I don't remember if I tried it before or if I tried a driver
from the SourceForge homepage of Benoit's
driver (the packages on SourceForge aren't the same).
You need to download the Alcatel microcode and copy it to
/usr/lib/speedtouch/mgmt.o
An additional advantage of using this driver is that you can set the thing up so that your connection is
established automatically at boot-time (translation: this is the only one I have actually managed to figure this out
for ;-). You need to modify slightly the /usr/sbin/stusb script so that it becomes a "SysVInit" script.
You can download the modified script here. Then, in order for it to work, put this script
in the directory
/etc/rc.d/init.d/
Then, as root, type the following command:
chkconfig stusb on
If you type
chkconfig --list stusb
you should see
stusb 0:off 1:off 2:on 3:on 4:on 5:on 6:off
The connection
will be established the next time you reboot.
The only problem I have remarked with this method is that from time to time, without explanation, the connection
is broken (ISP ?). In this case, despite all the precautions taken in the SysV script, doing a
/etc/rc.d/init.d/stusb restart
probably
will not bring the connection back up. You need to look at the result of
ps aux
and (as root) kill any instances of modem_run or pppd/pppoa which are running. Then disconnect and reconnect the modem
and
/etc/rc.d/init.d/stusb start
1. Introduction
I have just succeeded
in using my ADSL internet connection with Red Hat 7.2. As it took me
about a month (not continuously ;-) ) to do it, and as I didn't find any
accounts of other people having managed it for this particuar distribution,
I thought I'd better try to write a kind of "how to" (although I am far
from being qualified to do so).
The reason I'm doing this is because neither the Benoît
Papillaut driver/method, nor the Johan Verrept driver/method worked
in my case. Well, not by following their "howto" to the letter, at any
rate. The working solution uses the Verrept driver, and mixes in some
Papillaut with a bit of Faust (?) for the pppoatm part (see below).
So I'll try to write down exactly what I did, hoping that I
don't miss anything out, and knowing that what I really should do is
(a) write the "howto",
then
(b) wipe everything off my computer,
and
(c) put everything back in its right place using the "howto",
thus checking that I know what I'm talking about...
But of course, I'm not
going to take that risk! So, let's be clear right from the start: I do
not promise that this will work for you, but maybe you will get some useful
new information from me that you didn't find elsewhere, and which may
help you on your way. OK ?
2. Starting
conditions
...in other words: what
computer, what stuff installed on it already, and why couldn't I just
use the existing how-to's for SpeedTouch ?
i. Hardware
I set this up on a
Compaq Presario 2710 laptop. This is (was) basically
a Windows XP box with a 1.13GHz Pentium III, 250Mb of RAM, 32Mb Radeon
Mobility graphics card, 10/100 Ethernet card, DVD/CD-RW combo, etc.
My first act on opening the box was to ditch XP, split the hard disk
into two 10Gb chunks, and put W2000 professional in the first one.
ii. Linux installation
As already mentioned,
I used Red Hat 7.2 to install Linux on my laptop. This distribution provides
the 2.4.7-10 kernel. The installer did a great job of identifying and
taking control of everything almost without any assistance - graphics
card, sound card, ethernet card, etc. etc. Much better than Mandrake
8.1, which I tried after some of my early failures with SpeedTouch. I
have a HP Pavilion 6715 PC at home, 600MHz Celeron, 32Mb NVidia GeForce
MX graphics card, Agfa Snapscan Touch USB scanner, Lexmark Z22 printer,
plus of course the SpeedTouch USB. Mandrake 8.1 installation on this machine
was a doddle - not only does the distribution include support for SpeedTouch
that you simply (and minimally) configure during setup, but it even detected
and installed a (working) driver for what must be one of the most notorious
Winprinters ever made!
However, on the Presario, Mandrake fared far less well - after
installation about the only part of the system configured correctly
was the keyboard! Everything else was "unknown device". So I had to come
back to Red Hat 7.2 and find out how to use my Speed Touch the hard way.
A word of warning about RH7.2:
in order to be able to do everything that's coming next, make
sure that you/RH install(s) the following essential tools: make, automake,
kgcc, egcs (plus the backwards compatible versions), libgcc, rpm, gcc,
binutils, libcdevel, cpp, etc. etc. This stuff is mostly in the Development
package class, some are in the System, I don't know about the rest. Some
(all) of this you would think would be in any standard basic linux installation,
but beware! If you do a "recommended" install of RH7.2 without checking
the individual packages yourself, you may find yourself surprisingly
under-equipped when it comes to compiling and installing the packages...
3. Sources
of information
...in other words, whose
words of wisdom enabled me to sort this out ? Three main sources, three
"how-to"'s in fact:
Believe me, I know
absolutely nothing about anything that follows apart from what I read
in these people's web pages. Let them receive all due credit and thanks
here. In the following I'll refer to them as BP, JV and F, respectively.
They are presented in chronological order. My first try was
with the BP "model" and seemed to block at the USB level (although my
2.4.7-10 kernel fully supported USB devices). My second try was with
the JV ten-step kernel recompilation approach, and broke down because
although I followed the instructions to the letter, a very important
file (/usr/lib/pppd/plugins/pppoatm.so) that should have been there
wasn't, and that was the end of that. Finally I found F's howto for
a different ADSL modem, found the solution to the ppoatm.so problem,
and finally got it together with the JV driver.
4. What
to do ?
i. Update the kernel to 2.4.9-31
for PPPoATM support
Note (September 17th 2002): The RH7.2 distribution
came with the 2.4.7-10 kernel which had no support for PPPoATM. The first
RH kernel with support was one of the 2.4.9-* kernels. However, in the case
of RH7.3 the kernel is 2.4.18-3, which already includes PPPoATM support,
so you can skip this part. If in doubt, check that the file /lib/modules/2.4.x-x/kernel/net/atm/pppoatm.o is present on your machine, then PPPoATM support is included.
Now I do not mean
JV's death-defying
ten-step kernel reconfig and recompilation!!! No, I am a complete novice,
I do not want to do anything more complicated than download a few RPM's
and install them with Red Hat's Package Manager. However, in order to
get this thing off the ground, you need a kernel which supports PPP
over ATM. For Red Hat 7.2, and in RPM form, this currently means the
2.4.9-31 kernel.
Download both the kernel itself,
kernel-2.4.9-31.i686.rpm (if i686 is not your architecture,
choose the right one from the list
here ) and the source files
kernel-source-2.4.9-31.i386.rpm which you'll need
later on for compiling something else (I could only find an i386 version
at rpmfind.net, I don't think it matters - well it works, anyway!).
In the same place as the new kernel, you'll find an up to date version
of glibc too, which I probably installed with Package Manager before going
on.
In order to be able to install the new kernel, you need to have
a version of modutils which is at least as recent as 2.4.13. If in doubt,
get
modutils-2.4.13-0.7.1.i386.rpm and install it before going
on. (There may be other unsatisfied dependencies when you try to install
the kernel: if so, just get the necessary packages from rpmfind.net and
install them before re-installing the kernel).
Now, following F's instructions, update to the new kernel by doing
this:
/bin/rpm -Fvh kernel-2.4.9-31.xxxx.rpm
where "xxxx" is your
architecture, and you "cd" to the directory where you downloaded the
kernel RPM beforehand. You can install the kernel source files with Package
Manager.
Next do the following:
/sbin/mkinitrd -f
/boot/initrd-2.4.9-31.img 2.4.9-31
If you use a the GRUB bootloader you can safely (?) reboot now ( /sbin/reboot). If it's
LILO, then you have to do some more fiddling about, see F for details.
After the reboot, you still have to do the following (as 'root'):
/sbin/depmod -ae -F
/boot/system.map-2.4.9-31
If all went well, then the following file must exist:
/lib/modules/2.4.9-31/kernel/net/atm/pppoatm.o
If so, then carry on. If not, then I don't know why. Start again
?
ii. Install PPP daemon version 2.4.0-2
It is strange but true that, when it comes to
pppd, having the latest
version on the market is no good at all. You need an old version, 2.4.0-2
to be precise, in order to be able to use your SpeedTouch modem.
Why? To run the modem you need to use the "PPP over ATM" protocol, which
means that you need to use a plug-in for this purpose with
pppd.
Now, the tricky bit is that although the versions of
pppd which shipped
with RH7.2/3 (2.4.1-2 and 2.4.1-3, respectively) can accept plug-ins, the
actual plug-in itself (a file called
pppoatm.so) is not provided with
these versions.
The only way (as far as I know) to have both pppd and plug-in is to install
the patched version 2.4.0-2 available from sourceforge.net. You can check
to see if, by some stroke of luck, you already have the plug-in, by verifying
whether or not the file
/usr/lib/pppd/plugins/pppoatm.so
exists on your system. If not, then you need to download the
pppd
RPM here:
ppp-2.4.0-2.i386.rpm
Now, check the version of
pppd you have by typing:
rpm -q ppp
If the version number is
superior to 2.4.0-2 (i.e. 2.4.1-2 for a
standard RH7.2 system) then you will have to uninstall the existing version
of pppd before attempting to install version 2.4.0-2. Do this by typing (you
probably need to be "root"):
/bin/rpm -ev --nodeps ppp
Now you can install version 2.4.0-2 with the command
/bin/rpm -Uvh ppp-2.4.0-2.i386.rpm
The plugin /usr/lib/pppd/plugins/pppoatm.so
should be there now!
The next step is to configure PPPD by adapting three files:
/etc/ppp/options, /etc/ppp/chap-secrets , and /etc/ppp/pap-secrets.
The ones I use are a mix
of BP and JV.
Here's /etc/ppp/options:
noauth
usepeerdns
lock
noipdefault
defaultroute
passive
asyncmap 0
lcp-echo-interval 2
lcp-echo-failure 7
name xxx@clubadsl1
user xxx@clubadsl1
plugin /usr/lib/pppd/plugins/pppoatm.so
8.35
On the lines beginning
'name' and 'user' you have to put the username you use to log in to your
ISP provider. As an anecdote, for Club Internet the username is 'xxx',
and when you try to configure your Windows connection with their installation
kit, it also uses 'xxx' and it's only when you manage to get through
to their hotline to find out why you can't connect that they tell you
to put 'xxx@clubadsl1'. Apart from that little quibble, I have no complaints
to make about my ISP!!!
Note also that I live in France and so 8.35 is the "VP.VC" for me.
For a list of numbers for different countries, see JV's
FAQ
Here's /etc/ppp/chap-secrets:
# Secrets
for authentication using CHAP
# client server secret
IP addresses
xxx@clubadsl1 * rqp398u2
*
Here's /etc/ppp/pap-secrets:
# Secrets for
authentication using PAP
# client server secret
IP addresses
xxx@clubadsl1 * rqp398u2
*
Obviously, here you have
to put your username and password given by your ISP, instead of "xxx@clubadsl1"
and "rqp398u2" (which I made up!).
Another thing that you can
do which may be helpful later on is to edit or create the files
/etc/resolv.conf and
/etc/ppp/resolv.conf and put in them your ISP's DNS servers
(if you know them). The two files are identical and contain simply two
lines like this:
nameserver 194.117.200.10
nameserver 194.117.200.15
where the first should be
your primary DNS server, the second your secondary server.
iii. Install the SpeedTouch Kernel Module
This is where we come back to the JV howto (at step 5). Download the
two following files into the same directory:
sarlib-0.2.4.tgz
speedtouch-1.5.tar.gz
Untar and build the SARLib:
tar zxvf sarlib-0.2.4.tgz
If this creates a directory called
'sarlib-0.2.4' instead of 'sarlib' then you should rename it 'sarlib' before
trying to build the SpeedTouch module.
Now before trying to compile sarlib, you need to have the sources of
your currently working kernel installed on your machine. This means installing a package such
as kernel-2.4.x-xxxx.src.rpm (which can be found e.g. at http://rpmfind.net).
Make sure that the kernel source is exactly the same version as the kernel
you have running on your box!
The kernel sources should be in a directory called /usr/src/linux-2.4.x-x.x.x
In order for the compilation of sarlib to work you need to do the following:
Make the symbolic link /usr/src/linux
by typing:
ln -s /usr/src/linux-2.4.x-x.x.x
/usr/src/linux
(replacing the "x"'s with the real
figures of course ;-)
Now if you look at the contents of the directory /usr/src/linux/configs you
should get a listing something like this:
44K kernel-2.4.x-athlon.config
44K kernel-2.4.x-i686.config
44K kernel-2.4.x-athlon-smp.config 44K kernel-2.4.x-i686-debug.config
56K kernel-2.4.x-i386-BOOT.config 44K kernel-2.4.x-i686-smp.config
44K kernel-2.4.x-i386.config
40K kernel-2.4.x-i686-uml.config
44K kernel-2.4.x-i586.config
44K kernel-2.4.x-x86_64.config
44K kernel-2.4.x-i586-smp.config 44K
kernel-2.4.x-x86_64-smp.config
44K kernel-2.4.x-i686-bigmem.config
One of these "config" files should correspond to the architecture of your
machine i.e. its processor.
In my case it's an "i686" (you can check both the machine type and the exact
version of your
kernel by launching the KDE Control Center - assuming you have KDE installed
- on the welcome
page you should see the kernel version number next to "Release:" and the
architecture next to
"Machine:"...)
Once you know which "config" to use, make the following symbolic link:
ln -s /usr/src/linux/configs/kernel-2.4.18-xxxx.config
/usr/src/linux/.config
OK, let's compile the sarlib:
cd sarlib
make
Now we'll make the SpeedTouch module itself:
tar zxvf speedtouch-1.5.tar.gz
cd SpeedTouch
Edit the file speedtouch.c and remove the following line:
#define DEBUG_PACKET
1
before carrying on with:
make
make install
Ignore errors such as
depmod: ***Unresolved
symbols in /lib/modules/2.4.9-31/kernel/drivers/usb/speedtch.o
(which you may not see here but some time later...)
iv. Install the binary management application
Get the code speedmgmt.tar.gz from
Alcatel themselves.
Then uncompress and install it:
tar zxvf speedmgmt.tar.gz
cd mgmt
make install
This is where you'll run into problems if you don't have kgcc and egcs-2.91.66.
5. Getting
connected
Right, now you should be ready
to go. JV's hotplugging business hasn't worked for me yet (I don't know
if I'll bother to work out why), so I wrote myself a little shell script
(based on BP, JV and F) which sets up my connection. This is the script:
#!/bin/bash
# configuration and startup-script for the Alcatel SpeedTouch USB modem
echo "SpeedTouch Inserting
module."
/sbin/modprobe -k speedtch
echo "SpeedTouch Attempting
to start management deamon"
/usr/sbin/speedmgmt &
echo "Starting pppoatm"
/sbin/modprobe pppoatm
echo "Waiting..."
sleep 15
echo "Connecting..."
/usr/sbin/pppd user xxx@clubadsl1
/sbin/ifconfig ppp0
I run this from a command
line prompt as 'root'. When I do this I see the following output:
SpeedTouch Inserting
module.
Warning:
loading /lib/modules/2.4.9-31/kernel/drivers/usb/speedtch.o will taint the
kernel: no license
SpeedTouch
Attempting to start management deamon
Starting
pppoatm
Waiting...
Connecting...
Plugin
/usr/lib/pppd/plugins/pppoatm.so loaded.
PPPoATM
plugin_init
PPPoATM
setdevname_pppoatm
PPPoATM
setdevname_pppoatm - SUCCESS
ppp0
Link encap:Point-to-Point Protocol
POINTOPOINT NOARP MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:3
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
And if I look in /var/log/messages
I see (not necessarily all in one continuous stream, but close to the end
of the file) (this is for the case where I launch the connection just after
booting):
Apr
9 18:55:30 ganp571 kernel: usb.c: registered new driver Alcatel SpeedTouch
USB
Apr 9 18:55:31 ganp571 Speedmgmt[1286]: Alcatel SpeedTouch USB
Management daemon started.
Apr 9 18:55:31 ganp571 Speedmgmt[1286]: (C) Alcatel 2001, Version
1.3.4
Apr 9 18:55:31 ganp571 kernel: usb_control/bulk_msg: timeout
Apr 9 18:55:31 ganp571 kernel: usbdevfs: USBDEVFS_BULK failed
dev 2 ep 0x85 len 512 ret -110
Apr 9 18:55:31 ganp571 Speedmgmt[1286]: Preceding (timeout) error
messages are normal.
Apr 9 18:55:31 ganp571 kernel: PPP generic driver version 2.4.1
Apr 9 18:55:35 ganp571 kernel: usb_control/bulk_msg: timeout
Apr 9 18:55:46 ganp571 pppd[1289]: Plugin /usr/lib/pppd/plugins/pppoatm.so
loaded.
Apr 9 18:55:46 ganp571 pppd[1289]: PPPoATM plugin_init
Apr 9 18:55:46 ganp571 pppd[1289]: PPPoATM setdevname_pppoatm
Apr 9 18:55:46 ganp571 pppd[1289]: PPPoATM setdevname_pppoatm
- SUCCESS
Apr 9 18:55:46 ganp571 pppd[1290]: pppd 2.4.0 started by root,
uid 0
Apr 9 18:55:46 ganp571 pppd[1290]: Using interface ppp0
Apr 9 18:55:46 ganp571 pppd[1290]: Connect: ppp0 <-->
Apr 9 18:55:49 ganp571 Speedmgmt[1286]: Modem initialised at 608
kbit/s downstream and 160 kbit/s upstream
Apr 9 18:55:54 ganp571 kernel: PPP BSD Compression module registered
Apr 9 18:55:54 ganp571 kernel: PPP Deflate Compression module
registered
Apr 9 18:55:54 ganp571 pppd[1290]: local IP address 212.194.17.135
Apr 9 18:55:54 ganp571 pppd[1290]: remote IP address 212.194.12.1
Apr 9 18:55:54 ganp571 pppd[1290]: primary DNS address
194.117.200.15
Apr 9 18:55:54 ganp571 pppd[1290]: secondary DNS address 194.117.200.10
To end the connection, or
in any case before I shut down my computer (because otherwise the kernel
'panics' and 'shuts down interrupts' or something like that...anyway I
ended up having to pull the plug rather violently ;-)
I 'kill' pppd (as F proposes):
ps -C
pppd
kill jobid
where 'jobid' is the number
of the process under which pppd is running, returned by 'ps'.
6. Additional
remarks
Just to make things a little
more complicated, at the lab I use my laptop on a LAN via the internal
Ethernet card. This means that my machine has a fixed IP address at the
lab, and a totally different 'dynamic' IP given by my ISP when I connect
at home. This means that I already had an /etc/resolve.conf
file with the DNS servers of my lab's LAN in it. Also, at start-up of
the ADSL connection I got a message in the /var/log/messages file about
"default IP address of ganp571 not changed", in other words there was some
serious interference between my two configured network protocols. When I
first connected, I found I couldn't actually open any web-pages or communicate
with the outside world.
I have resolved this problem (for the moment) by going into interactive
start-up mode when I boot, and stopping the 'isdn' and 'network' services
from starting up. I also made a copy of the /etc/resolv.conf file, let's
call it /etc/resolv.conf.lab, and made a new one called /etc/resolv.conf.adsl.
Then I made a symbolic link /etc/resolv.conf which for the moment points
to /etc/resolv.conf.adsl. I manually switch between the two resolv.conf
files depending on if I'm at home or at work. This works, but if somebody
knows of an easier (preferably with a nice graphical interface) way to manage
different internet profiles on a RedHat box, I'm interested!