Speedtouch Links

Home
Firmware Extractor
Fedora Core
Ubuntu
Mandriva
SuSE
Linux From Scratch
Gentoo
Xbox and PS2 Masquerading
FAQ
Help (mailing list)
Tux riding the SpeedTouch
SourceForge Logo

The Linux Kernel Speedtouch Driver on Slackware 10.1

Kernel Compiling

The Slack kernels are not compiled with support for the Speedtouch modem in mind so to use the kernel drivers you'll need to compile a new kernel. Kernel compiling is not for the faint hearted as it has the potential to render your system unbootable. A full treatment of how to recompile a kernel is beyond the scope of this page (but you could do worse than read this). I'm going to assume that you (and Google) know how to build a kernel that supports all the other hardware you have. On this page I will just discuss the options you need to enable to get the Speedtouch kernel driver working.

You should compile a 2.6.10 kernel (or later) so it will be able to load the firmware without the assistance of modem_run.

Modules?

When you configure the kernel, with many options you get the choice to compile the feature into the kernel or build it as a loadable module. If you're preparing a distribution like Mandrake or SuSE then modules make a lot of sense as they allow you to compile a small kernel that has many modules available that can be dynamically loaded so the kernel can adjust to whatever hardware it's installed on.
But you're not compiling a kernel to run on any machine. You're compiling a kernel to run on your own computer. If you need a feature, compile it into the kernel. If you don't need it, don't waste time compiling the module. Modules can cause problems, particularly if you use udev.

UHCI or OHCI?

you need to know what sort of USB controller you have. It should tell you in the file /proc/bus/usb/devices

cat /proc/bus/usb/devices | grep USB

If it mentions EHCI as well as UHCI or OHCI then you can enable support for EHCI too. But the main thing is to enable support for either UHCI or OHCI, not both.

You'll need to know if your ISP uses PPPoA or PPPoE. When you get to configuring PPP you'll need to know the VPI/VCI numbers for your country/ISP. Those details can be found on this table

make menuconfig

cd into the kernel source and make menuconfig. Traditionally the kernel source was kept in /usr/src/linux but you don't have to do it there. I find it more convenient to work on my Gnome desktop.
You will need to enable these options

When you've finished, save the .config file then execute make. When it's done copy arch/i386/boot/bzImage to /boot. If you ignored my advice and compiled some modules you'll need to run make modules_install and copy the file System.map into the same folder as your kernel. You might need to edit Grub's menu.lst to point to your new kernel.

cp arch/i386/boot/bzImage /boot/vmlinuz &&
cp System.map /boot &&
make modules_install

Linux-ATM

Download a copy of linux-atm-2.4.1. Untar linux-atm, cd into it, configure and make it

tar xzf linux-atm-2.4.1.tar.gz &&
cd linux-atm-2.4.1 &&
./configure --prefix=/usr --sysconfdir=/etc &&
make &&
su

Enter roots password then

make install

PPP-2.4.3

Download a copy of PPP-2.4.3, untar ppp, cd into it, configure and make it

tar xzf ppp-2.4.3.tar.gz &&
cd ppp-2.4.3 &&
./configure --prefix=/usr &&
make &&
su

Enter roots password then

make install

The Firmware

Download a copy of the firmware-extractor.
If you have a copy of the firmware that you know works with your modem, stick with that, otherwise

If you're not sure what revision your modem is, use the command
grep -B 1 "THOMSON
ALCATEL" /proc/bus/usb/devices

At the end of the first line it should say Rev= X.00
Where X is the version of the modem you have.

Put a copy of your firmware next to the firmware-extractor.tar.gz and rename it mgmt.o

tar xzf firmware-extractor.tar.gz &&
cd firmware-extractor &&
cp ../mgmt.o mgmt.o &&
./configure &&
make &&
su

That will split the firmware into speedtch-1.bin and speedtch-2.bin. To copy it into hotplugs firmware folder, enter roots password then

make install

FIRMWARE_DIR, the place where hotplug keeps it's firmware, is defined in the script /etc/hotplug/firmware.agent
The default is /lib/firmware, you can check if the speedtch-{1,2}.bin files are there with the command

ls /lib/firmware

Secrets

Become root, move /etc/ppp out of the way then create the folder /etc/ppp/peers

mv /etc/ppp /etc/ppp.orig
mkdir -p /etc/ppp/peers

Now create a plain text file called either /etc/ppp/chap-secrets or /etc/ppp/pap-secrets with a text editor. If you don't know if your ISP uses chap or pap authentication put your a line like this in both files, it won't do any harm.

"username@isp" * "password"

username@isp should be the username your ISP knows you by. Usually (but not always) it has an @isp bit at the end (it might be @bt, for example). Change password for the password you chose when you set up your internet account.

If your ISP is PPPoE skip down to the PPPoE section

PPPoA

Copy and paste this into a text editor then save it as /etc/ppp/peers/speedtch

lcp-echo-interval 10
lcp-echo-failure 3
noipdefault
defaultroute
user "username@isp"
noauth
noaccomp
nopcomp
noccp
novj
holdoff 4
persist
maxfail 25
updetach
usepeerdns
plugin pppoatm.so
0.00

Change username@isp for the username your ISP knows you by and change the 0.00 on the last line for the VP/VC values for your country/isp. In Britain it's 0.38, for example

Tidying Up

When you reboot the kernel will detect the hardware and get hotplug to load the firmware. All that's left to do is to get pppd to call your ISP. This can be done with a line in /etc/rc.d/rc.local. As root open /etc/rc.d/rc.local in a text editor then add this line

/usr/sbin/pppd call speedtch

Now, change the permissions on /etc/ppp/{chap-secrets,pap-secrets,peers/speedtch} and make a symbolic link from /etc/resolv.conf pointing at /etc/ppp/resolv.conf. Open a root shell and copy this into it

chmod 600 /etc/ppp/{chap-secrets,pap-secrets,peers/speedtch} &&
rm -f /etc/resolv.conf &&
ln -s ppp/resolv.conf /etc/resolv.conf

When you reboot it should connect you to the web.
Please report any problems to the mailing list


PPPoE

For PPPoE over ATM things are a slightly different because you'll need a copy of the br2684ctl bridging utility. Compile it with the command

cc -o br2684ctl brctl-010226.c -latm &&
su

Enter roots password and copy it to /usr/sbin

cp br2684ctl /usr/sbin

Copy and paste this into a text editor then save it as /etc/ppp/peers/speedtch

lcp-echo-interval 10
lcp-echo-failure 3
noipdefault
defaultroute
user "username@isp"
noauth
noaccomp
nopcomp
noccp
novj
holdoff 4
persist
maxfail 25
updetach
usepeerdns
plugin rp-pppoe.so
nas0

Change username@isp for the username your ISP knows you by.

Tidying Up

When you reboot the kernel will detect the hardware and get hotplug to load the firmware. You'll need to use the br2684ctl to create a bridging connection, configure it with ifconfig then get pppd to call your ISP. As root open /etc/rc.d/rc.local in a text editor and add this to the end of it.
Change VP.VC for the VPI/VCI numbers for your country/ISP. For example in South Africa it's 8.35

br2684ctl -b -c 0 -a VP.VC &&
sleep 5 &&
ifconfig nas0 192.168.0.1 netmask 255.255.255.0 &&
sleep 10 &&
/usr/sbin/pppd call speedtch

Now, change the permissions on /etc/ppp/{chap-secrets,pap-secrets,peers/speedtch} and make a symbolic link from /etc/resolv.conf pointing at /etc/ppp/resolv.conf. Open a root shell and copy this into it

chmod 600 /etc/ppp/{chap-secrets,pap-secrets,peers/speedtch} &&
rm -f /etc/resolv.conf &&
ln -s ppp/resolv.conf /etc/resolv.conf

When you reboot it should connect you to the web.
Please report any problems to the mailing list