Speedtouch Links

En Español

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

The Linux Kernel Speedtouch Driver on Mandriva

Mandriva used to be called Mandrake but they changed their name, partly because of legal issues in France and partly because the merged with Conectiva. Between Mandrake and Mandriva, more than just the name changed.
The new kernel used by Mandrive loads the firmware itself without modem_run so the firmware needs to be handled differently. If you are using Mandrake 10.1 you'll need to follow the old Mandrake page.

Things you'll need

The firmware

If you have firmware you know works with your modem then stick with that. Otherwise, most people will use the firmware in this zipfile SpeedTouch330_firmware_3012.zip. When you've unzipped it you will get two files, KQD6_3.012 and ZZZL_3.012.

Sometimes the revision 0 modems work better with the mgmt.o firmware in this tarball. Use whatever works for you.

If you're not sure what revision your modem is, copy this command into a terminal

awk '/4061/ { print $5 }' /proc/bus/usb/devices

The Firmware Extractor

The firmware will need to be split into two parts with a binary called firmware-extractor so save a copy of that.

VPI/VCI Numbers

If you don't know the VPI/VCI numbers for your country/ISP then look in this table or ask Google. While you're looking at that table, see if your ISP uses PPPoE or PPPoA.

br2684ctl

A copy of br2684ctl is not necessary for PPPoA. The br2684ctl bridging utility is needed to be able to set up a PPPoE connection over ATM, so you'll only need it if your ISP uses PPPoE

Reboot into Mandriva

Gather together all the bits you'll need on a floppy disk, USB flash stick, partition of your hard drive or whatever works for you. Save a copy of this page at the same time then reboot into Mandriva, copy it all into your home folder and open this page in a browser.

Install The Firmware

Make the firmware-extractor executable then use it to split the firmware into two parts with these commands. If you get an error that says "No such file or directory" you may have forgotten to copy the things into your home folder, you may have misspelt something, or the terminal may have started in a different folder (like your desktop). You can move to your home folder with the command 'cd'

If you have a revision 0 or revision 2 modem use the KQD6_3.012 firmware

unzip SpeedTouch330_firmware_3012.zip &&
chmod +x firmware-extractor &&
./firmware-extractor KQD6_3.012

For a revision 4 modem it's basically the same but with the ZZZL_3.012 firmware

unzip SpeedTouch330_firmware_3012.zip &&
chmod +x firmware-extractor &&
./firmware-extractor ZZZL_3.012

If you've got some other firmware file you want to try, split it in two with the firmware-extractor in the same way

chmod +x firmware-extractor &&
./firmware-extractor /path/to/your/firmware

That will create two files, speedtch-1.bin and speedtch-2.bin. You'll need to install them in /lib/hotplug/firmware but to write there, you need to become root with the su command

su -c 'cp speedtch* /lib/firmware'

Enter the root password

If your ISP uses PPPoE skip down to the PPPoE section. The Mandriva CDs don't come with the br2684ctl bridging utility so it's not possible to configure a PPPoE over ATM connection with the Mandriva Control Centre.


PPPoA

Open the Mandriva Control Centre go to the Network & Internet tab and click on "Set up a new network interface (LAN, ISDN, ADSL, ...)"

Network tab

Choose DSL

DSL

If your SpeedTouch is plugged in it should have been detected and you should be offered the option "Alcatel|USB ADSL Modem (Speed Touch)"

Alcatel|USB ADSL Modem (Speed Touch)

If your ISP is on the list, choose it. If not, pick an ISP with the same VPI/VCI numbers

Country and ISP

Choose PPP over ATM. If you need to use PPPoE, see the PPPoE section

PPP over ATM

Enter your username and password.

Username and Password

Start the connection at boot.

Connect on boot

Don't start it now.

Later

Put in the first CD, let it install some things then close the Control Centre and reboot. It should connect you to the net.

If not, check your username and password. Also, check that you've put the correct firmware in /lib/firmware. If the firmware loads correctly the right LED on the modem will flash eight or nine times during the boot process.
Please report any problems to the mailing list


PPPoE

PPP Plugins

pppd will need some extra plugins (shared libraries) to work over ATM. You can install these from your Mandriva CD's using the Control Centre

Kernel Modules

To enable the kernel to perform certain functions you'll need to load some modules into the kernel. A simple way of doing this is to add them to the list of modules that get loaded when the kernel boots. Copy and paste this into a terminal.

su -c 'cat >> /etc/modprobe.preload << "EOF"
ip_tables
iptable_filter
ip_conntrack
ip_conntrack_ftp
ipt_state
pppoatm
br2684
EOF'

Again, enter the root password

Most of those modules are to get the firewall working.

Firewall

The default settings for the Mandriva firewall do not allow you to access the internet. You can alter them with Mandriva's graphical point and click tools but I find them too complicated and difficult to understand. If you only have a single computer connected to the internet through your Speedtouch then this simple script will work fine. Copy and paste this into a text editor and save it in your home folder. Call it shorewall

#!/bin/bash

# Set some sensible default policies
iptables -P INPUT DROP
iptables -P FORWARD DROP
iptables -P OUTPUT ACCEPT

# Open the loopback interface
iptables -A INPUT -i lo -j ACCEPT

# This is the rule that does the work
iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT

Use these commands to make a backup of your existing firewall bootscript and then replace it.

su -c 'mv /etc/rc.d/init.d/shorewall{,.old}
install -m 744 shorewall /etc/rc.d/init.d/shorewall'

If you want to run some sort of server like a peer to peer application you will need to add a rule to open some ports then configure the server to listen on those ports (Google for the details).
If you need your computer to act as a gateway for other computers on an ethernet local area network, have a look at the Xbox and PS2 Masquerading page and, of course, ask Google.

Secrets

Now you need to create a file called either chap-secrets or pap-secrets. If you don't know whether your ISP uses chap or pap authentication then change both files. It won't do any harm. Open a text editor and put just one line in it like this

"username@isp" "*" "password"

Change username@isp for the username your ISP gave you and change password for the password you got when you set up your account with your ISP. Don't miss out the spaces in the " "*" " bit.
Save the file in your home folder and call it secrets. Now copy it into /etc/ppp

su -c 'install -m 600 secrets /etc/ppp/chap-secrets &&
install -m 600 secrets /etc/ppp/pap-secrets'

To configure your ppp connection create a plain text file called speedtch
Open the text editor and copy and paste this

noipdefault
defaultroute
user 'username@isp'
noauth
updetach
usepeerdns
plugin rp-pppoe.so
nas0

### If the firmware loads and pppd won't
### connect uncomment this option to make
### pppd be more verbose in the system log

# debug

### For more details (and more options)
### read man pppd

Change username@isp for the username your ISP knows you by. Often (but not always) it has an @isp bit at the end. Save it in your home folder and call it speedtch. Now, as root, copy it to /etc/ppp/peers/speedtch

su -c 'install -m 600 speedtch /etc/ppp/peers/speedtch'

br2684ctl

As root install the br2684ctl binary in /usr/sbin

su -c 'install -m 700 br2684ctl /usr/sbin'

Tidying Up

When you reboot the kernel will detect the hardware and get udev to load the firmware. You'll need to use the br2684ctl to create a bridging connection and configure it with ifconfig then use ppp to call your ISP.
Open a text editor and use it to create a bootscript. Copy and paste this into it, save it in your home folder and call it dial. Change VP.VC for the VPI/VCI numbers for your country/ISP.

#!/bin/bash
count=0
while [[ $((count++)) -lt 40 ]]
do
  sync=$(dmesg | grep 'ADSL line is up')
  if [ ! -z "$sync" ]
  then
    br2684ctl -b -c 0 -a VP.VC
    sleep 3
    ifconfig nas0 192.168.0.1 netmask 255.255.255.0
    sleep 10
    pppd call speedtch
    exit 0
  fi
  sleep 1
done
echo "The SpeedTouch firmware did not load"

Save it in your home folder and call it dial. Now, as root, copy it to /etc/rc.d/init.d, make it executable and make a symbolic link pointing at it from /etc/rc.d/rc5.d (so it gets run on boot).

su -c 'install -m 744 dial /etc/rc.d/init.d/dial &&
ln -s ../init.d/dial /etc/rc.d/rc5.d/S96dial'

Reboot and you should be online.
If not, check your firewall and check the details you put in /etc/ppp/*-secrets and /etc/ppp/peers/speedtch. If the firmware is loading OK the right LED will flash eight or nine times and then stay green. If ppp can't connect with your ISP try adding the option 'debug' to /etc/ppp/peers/speedtch, it will then be more verbose in the system log (/var/log/syslog).
Please report any problems to the mailing list