Difference between revisions of "SpeedTouch ADSL Modem"

From ArchWiki
Jump to: navigation, search
(18 intermediate revisions by 6 users not shown)
Line 1: Line 1:
 +
[[Category:Modems]]
 +
 
This article will hopefully enable you to connect to the internet using your SpeedTouch modem. If you did not already know, the process is not exactly easy, and this guide is here to help you.
 
This article will hopefully enable you to connect to the internet using your SpeedTouch modem. If you did not already know, the process is not exactly easy, and this guide is here to help you.
  
Line 8: Line 10:
 
The kernel driver that is used by the SpeedTouch modem will not work without some firmware. To find out which firmware you need, run the following command:
 
The kernel driver that is used by the SpeedTouch modem will not work without some firmware. To find out which firmware you need, run the following command:
  
awk '/4061/ { print $5 }' /proc/bus/usb/devices
+
awk '/4061/ { print $5 }' /proc/bus/usb/devices
  
Which should give you the revision number of your modem. If your modem is revision [b]0[/b] or [b]2[/b] you will need the KQD6_3.012 file. If your modem is revision [b]4[/b], then you will require the ZZZL_3.012 file. Both of these files can be located in this tarball here: http://www.speedtouch.com/download/drivers/USB/SpeedTouch330_firmware_3012.zip
+
Which should give you the revision number of your modem. If your modem is revision '''0''' or '''2''' you will need the '''KQD6_3.012''' file. If your modem is revision '''4''', then you will require the '''ZZZL_3.012''' file. Both of these files can be located in this tarball [http://www.speedtouch.com/download/drivers/USB/SpeedTouch330_firmware_3012.zip here].
  
You will, later, need the firmware-extractor too, which can be found here:
+
You will, later, need the firmware-extractor too, which can be found [http://www.linux-usb.org/SpeedTouch/firmware/firmware-extractor here].
http://www.linux-usb.org/SpeedTouch/firmware/firmware-extractor
+
  
Finally you should check this page to find out the VPI/VCI numbers for your country or ISP:
+
Finally you should check [http://www.linux-usb.org/SpeedTouch/faq/index.html#q12 this] page to find out the VPI/VCI numbers for your country or ISP.
http://www.linux-usb.org/SpeedTouch/faq/index.html#q12
+
  
Now you have it all, save a copy of this guide too (in text helps), and copy everything to a USB flash drive, floppy disk (if it fits), or a USB external hard drive or something, so you can use them while offline.
+
Now you have everything, save a copy of this guide too (in text helps), and copy everything to a USB flash drive, floppy disk (if it fits), or a USB external hard drive, so you can use them while offline.
  
NOTE: Unzip isn't supported in a basic Arch Linux installation, you should unzip any .zip files using another computer or operating system first.
+
'''NOTE:''' Unzip isn't supported in a basic Arch Linux installation, you should unzip any .zip files using another computer or operating system first.
  
 
== Installing everything... ==
 
== Installing everything... ==
Boot into your Arch Linux installation. Now you should copy everything to your home directory. Mount the drive, cp, etc, you'll know what to do.
+
Boot into your Arch Linux installation. You should now copy everything to your home directory. Mount the drive, cp, etc, you'll know what to do.
  
 
I assume a speedtouch folder has been created in your home directory containing these files, and that you are currently in that folder.
 
I assume a speedtouch folder has been created in your home directory containing these files, and that you are currently in that folder.
  
 
You should also change to root user for the time of installing and configuring your modem:
 
You should also change to root user for the time of installing and configuring your modem:
su
+
su
[password]
+
[password]
  
 
Now in that folder, you should have firmware-extractor, and your choice of firmware depending on your modem (KQD6_3.012 or ZZZL_3.012). You will need to split the firmware with the following command:
 
Now in that folder, you should have firmware-extractor, and your choice of firmware depending on your modem (KQD6_3.012 or ZZZL_3.012). You will need to split the firmware with the following command:
  
 
For revision 0 or 2:
 
For revision 0 or 2:
chmod +x firmware-extractor && firmware-extractor KQD6_3.012
+
chmod +x firmware-extractor && firmware-extractor KQD6_3.012
  
 
For revision 4:
 
For revision 4:
chmod +x firmware-extractor && firmware-extractor ZZZL_3.012
+
chmod +x firmware-extractor && firmware-extractor ZZZL_3.012
  
 
If all went well, you should now have two new files in your directory: speedtch-1.bin and speedtch-2.bin.
 
If all went well, you should now have two new files in your directory: speedtch-1.bin and speedtch-2.bin.
  
 
Now (as root remember), copy the firmware to the right place:
 
Now (as root remember), copy the firmware to the right place:
cp speedtch* /lib/firmware
+
cp speedtch* /lib/firmware
  
 
Now your firmware is installed! Continue to 'Initial Configuration' for more information.
 
Now your firmware is installed! Continue to 'Initial Configuration' for more information.
Line 50: Line 50:
 
This could either be pap-secrets or chap-secrets. Not knowing, we will create both, as it does no harm.
 
This could either be pap-secrets or chap-secrets. Not knowing, we will create both, as it does no harm.
  
Create a file (I used nano) with the following, making sure you amend it for your information:
+
Create a file (I used nano) with the following text, making sure you amend it with your information:
 
+
"username@isp" "*" "password"
"username@isp" "*" "password"
+
 
+
 
(This line needs to be in exactly the same layout as above, just change what is in the first and last set of quotation marks.)
 
(This line needs to be in exactly the same layout as above, just change what is in the first and last set of quotation marks.)
  
 
Save it as secrets in your speedtouch folder. Now you will need to place it in the correct places:
 
Save it as secrets in your speedtouch folder. Now you will need to place it in the correct places:
install -m 600 secrets /etc/ppp/chap-secrets &&
+
install -m 600 secrets /etc/ppp/chap-secrets &&
install -m 600 secrets /etc/ppp/pap-secrets
+
install -m 600 secrets /etc/ppp/pap-secrets
 
+
Next, we need a configuration file. For PPP over ATM, use this template. Remember to change your username, and your VPI/VCI numbers!
+
 
+
noipdefault
+
defaultroute
+
user 'username@isp'
+
noauth
+
updetach
+
usepeerdns
+
plugin pppoatm.so
+
0.00
+
 
+
### If the firmware loads but pppd won't
+
### connect, uncomment this option to make
+
### pppd be more verbose in the system log
+
 
+
# debug
+
  
### For more details (and more options)
+
Next, we need a ppp configuration file. For PPP over ATM, use this template. Remember to change your username, and your VPI/VCI numbers!
### Read man pppd
+
  
 +
noipdefault
 +
defaultroute
 +
user 'username@isp'
 +
noauth
 +
updetach
 +
usepeerdns
 +
plugin pppoatm.so
 +
0.00 # Change these!
 +
 +
### If the firmware loads but 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
 +
 
Save and call the file speedtch. Now install it to the correct place:
 
Save and call the file speedtch. Now install it to the correct place:
install -m 600 speedtch /etc/ppp/peers
+
install -m 600 speedtch /etc/ppp/peers
  
 
Create a final symlink:
 
Create a final symlink:
ln -sf ppp/resolv.conf /etc/resolv.conf
+
cp /etc/resolv.conf /etc/ppp
 +
ln -sf /etc/ppp/resolv.conf /etc/resolv.conf
  
 
And your connection setup is done!
 
And your connection setup is done!
  
 
You can now connect using:
 
You can now connect using:
pppd call speedtch
+
pppd call speedtch
  
 
Refer to 'Further Configuration' for more Arch-specific information.
 
Refer to 'Further Configuration' for more Arch-specific information.
Line 96: Line 95:
 
We will need to set up the connection to start on boot. This involves creating some scripts.
 
We will need to set up the connection to start on boot. This involves creating some scripts.
  
This is the method I used. It works for me, and should work for you. Some alternative methods could probably be used. But I don't know them!
+
This is the method I used. It works for me, and should work for you. Some alternative methods could probably be used. But I do not know them!
  
Anyway, create a file called start_internet with the following contents:
+
Anyway, create a file called start_internet with the following content:
 
+
#!/bin/sh
<source>
+
# Speedtouch connection script
#!/bin/sh
+
# Speedtouch connection script
+
count=0
 
+
while [[ $((count++)) -lt 40 ]]
count=0
+
do
while [[ $((count++)) -lt 40 ]]
+
  sync=$(dmesg | grep 'ADSL line is up')
do
+
  if [ ! -z "$sync" ]
  sync=$(dmesg | grep 'ADSL line is up')
+
  then
  if [ ! -z "$sync" ]
+
      pppd call speedtch
  then
+
      exit 0
    pppd call speedtch
+
  fi
    exit 0
+
  sleep 1
  fi
+
done
  sleep 1
+
echo "The SpeedTouch firmware did not load"
done
+
exit 1
echo "The SpeedTouch firmware did not load"
+
exit 1
+
</source>
+
  
 
Now install this to the /usr/bin directory:
 
Now install this to the /usr/bin directory:
chmod +x start_internet &&
+
chmod +x start_internet &&
cp start_internet /usr/bin/
+
cp start_internet /usr/bin/
  
 
Now we will create another script. Save this as speedtouch:
 
Now we will create another script. Save this as speedtouch:
 
+
#!/bin/bash  
#!/bin/bash
+
 
+
. /etc/rc.conf
. /etc/rc.conf
+
. /etc/rc.d/functions
. /etc/rc.d/functions
+
 
+
case "$1" in
case "$1" in
+
  start)
  start)
+
    stat_busy "Starting SpeedTouch Connection"
    stat_busy "Starting SpeedTouch Connection"
+
    start_internet &>/dev/null
    start_internet &>/dev/null
+
    if [ $? -gt 0 ]; then
    if [ $? -gt 0 ]; then
+
      stat_fail
      stat_fail
+
    else
    else
+
      add_daemon speedtch
      add_daemon speedtch
+
      stat_done
      stat_done
+
    fi
    fi
+
    ;;
    ;;
+
  stop)
  stop)
+
    stat_busy "Stopping SpeedTouch Connection"
    stat_busy "Stopping SpeedTouch Connection"
+
    poff speedtch &>/dev/null
    poff speedtch &>/dev/null
+
    if [ $? -gt 0 ]; then
    if [ $? -gt 0 ]; then
+
      stat_fail
      stat_fail
+
    else
    else
+
      rm_daemon speedtch
      rm_daemon speedtch
+
      stat_done
      stat_done
+
    fi
    fi
+
    ;;
    ;;
+
  restart)
  restart)
+
    $0 stop
    $0 stop
+
    sleep 1
    sleep 1
+
    $0 start
    $0 start
+
    ;;
    ;;
+
  *)
  *)
+
    echo "usage: $0 {start|stop|restart}"   
    echo "usage: $0 {start|stop|restart}"   
+
esac
esac
+
exit 0
exit 0
+
  
 
Install this in the directory /etc/rc.d:
 
Install this in the directory /etc/rc.d:
chmod +x speedtouch &&
+
chmod +x speedtouch &&
cp speedtouch /etc/rc.d/
+
cp speedtouch /etc/rc.d/
  
 
Now edit your rc.conf:
 
Now edit your rc.conf:
 
+
nano /etc/rc.conf
nano /etc/rc.conf
+
  
 
In the daemons line, add speedtouch after network. Eg:
 
In the daemons line, add speedtouch after network. Eg:
 +
DAEMONS=(syslog-ng network speedtch firestarter netfs crond alsa hal fam)
  
DAEMONS=(syslog-ng network speedtch firestarter netfs crond alsa hal fam)
+
Right. All configuration files are there. Delete anything you do not need from your home directory (scripts etc.), double check everything is in place, and reboot.
  
Right. All configuration files are there. Delete anything you don't need from your home directory (scripts etc.), double check everything is in place, and reboot.
+
As it starts up, your modem should automatically sync, and you should automatically be connected.
  
As it starts up, your modem should automatically sync, and you should be automatically connected.
+
Now, any connection management can be used with /etc/rc.d/speedtouch:
 
+
/etc/rc.d/speedtouch start
Now, any connection management can be used with /etc/rc.d/speedtouch.
+
/etc/rc.d/speedtouch stop
 
+
/etc/rc.d/speedtouch restart
/etc/rc.d/speedtouch start
+
/etc/rc.d/speedtouch stop
+
/etc/rc.d/speedtouch restart.
+
  
 
== Further Information ==
 
== Further Information ==
 
 
A lot of this guide used information from http://www.linux-usb.org. Visit there for more information.
 
A lot of this guide used information from http://www.linux-usb.org. Visit there for more information.
  

Revision as of 11:26, 13 June 2012


This article will hopefully enable you to connect to the internet using your SpeedTouch modem. If you did not already know, the process is not exactly easy, and this guide is here to help you.

Obviously, this has been built using my own experience (with a SpeedTouch 330) and knowledge from elsewhere. If you feel anything should be contributed, feel free to add or edit any information you see fit.

If you are like me, you will probably want to connect when you first finish installing Arch Linux. This means you will require another internet-connected computer, or a Windows installation to proceed with downloading the necessary files.

The Files...

The kernel driver that is used by the SpeedTouch modem will not work without some firmware. To find out which firmware you need, run the following command:

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

Which should give you the revision number of your modem. If your modem is revision 0 or 2 you will need the KQD6_3.012 file. If your modem is revision 4, then you will require the ZZZL_3.012 file. Both of these files can be located in this tarball here.

You will, later, need the firmware-extractor too, which can be found here.

Finally you should check this page to find out the VPI/VCI numbers for your country or ISP.

Now you have everything, save a copy of this guide too (in text helps), and copy everything to a USB flash drive, floppy disk (if it fits), or a USB external hard drive, so you can use them while offline.

NOTE: Unzip isn't supported in a basic Arch Linux installation, you should unzip any .zip files using another computer or operating system first.

Installing everything...

Boot into your Arch Linux installation. You should now copy everything to your home directory. Mount the drive, cp, etc, you'll know what to do.

I assume a speedtouch folder has been created in your home directory containing these files, and that you are currently in that folder.

You should also change to root user for the time of installing and configuring your modem:

su
[password]

Now in that folder, you should have firmware-extractor, and your choice of firmware depending on your modem (KQD6_3.012 or ZZZL_3.012). You will need to split the firmware with the following command:

For revision 0 or 2:

chmod +x firmware-extractor && firmware-extractor KQD6_3.012

For revision 4:

chmod +x firmware-extractor && firmware-extractor ZZZL_3.012

If all went well, you should now have two new files in your directory: speedtch-1.bin and speedtch-2.bin.

Now (as root remember), copy the firmware to the right place:

cp speedtch* /lib/firmware

Now your firmware is installed! Continue to 'Initial Configuration' for more information.

Initial Configuration

We need to create a secrets file, containing the username and password you usually dial with. This could either be pap-secrets or chap-secrets. Not knowing, we will create both, as it does no harm.

Create a file (I used nano) with the following text, making sure you amend it with your information:

"username@isp" "*" "password"

(This line needs to be in exactly the same layout as above, just change what is in the first and last set of quotation marks.)

Save it as secrets in your speedtouch folder. Now you will need to place it in the correct places:

install -m 600 secrets /etc/ppp/chap-secrets &&
install -m 600 secrets /etc/ppp/pap-secrets

Next, we need a ppp configuration file. For PPP over ATM, use this template. Remember to change your username, and your VPI/VCI numbers!

noipdefault
defaultroute
user 'username@isp'
noauth
updetach
usepeerdns
plugin pppoatm.so
0.00 # Change these!

### If the firmware loads but 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

Save and call the file speedtch. Now install it to the correct place:

install -m 600 speedtch /etc/ppp/peers

Create a final symlink:

cp /etc/resolv.conf /etc/ppp
ln -sf /etc/ppp/resolv.conf /etc/resolv.conf

And your connection setup is done!

You can now connect using:

pppd call speedtch

Refer to 'Further Configuration' for more Arch-specific information.

Further Configuration

We will need to set up the connection to start on boot. This involves creating some scripts.

This is the method I used. It works for me, and should work for you. Some alternative methods could probably be used. But I do not know them!

Anyway, create a file called start_internet with the following content:

#!/bin/sh
# Speedtouch connection script

count=0
while  $((count++)) -lt 40 
do
  sync=$(dmesg | grep 'ADSL line is up')
  if [ ! -z "$sync" ]
  then
     pppd call speedtch
     exit 0
  fi
  sleep 1
done
echo "The SpeedTouch firmware did not load"
exit 1

Now install this to the /usr/bin directory:

chmod +x start_internet &&
cp start_internet /usr/bin/

Now we will create another script. Save this as speedtouch:

#!/bin/bash 

. /etc/rc.conf
. /etc/rc.d/functions

case "$1" in
  start)
    stat_busy "Starting SpeedTouch Connection"
    start_internet &>/dev/null
    if [ $? -gt 0 ]; then
      stat_fail
    else
      add_daemon speedtch
      stat_done
    fi
    ;;
  stop)
    stat_busy "Stopping SpeedTouch Connection"
    poff speedtch &>/dev/null
    if [ $? -gt 0 ]; then
      stat_fail
    else
      rm_daemon speedtch
      stat_done
    fi
    ;;
  restart)
    $0 stop
    sleep 1
    $0 start
    ;;
  *)
    echo "usage: $0 {start|stop|restart}"  
esac
exit 0

Install this in the directory /etc/rc.d:

chmod +x speedtouch &&
cp speedtouch /etc/rc.d/

Now edit your rc.conf:

nano /etc/rc.conf

In the daemons line, add speedtouch after network. Eg:

DAEMONS=(syslog-ng network speedtch firestarter netfs crond alsa hal fam)

Right. All configuration files are there. Delete anything you do not need from your home directory (scripts etc.), double check everything is in place, and reboot.

As it starts up, your modem should automatically sync, and you should automatically be connected.

Now, any connection management can be used with /etc/rc.d/speedtouch:

/etc/rc.d/speedtouch start
/etc/rc.d/speedtouch stop
/etc/rc.d/speedtouch restart

Further Information

A lot of this guide used information from http://www.linux-usb.org. Visit there for more information.

This guide doesn't use PPPoE. I will add this when I have more time.

Any comments or questions, try the discussion page.

Hope you found this helpful and feel free to improve it!