Difference between revisions of "SpeedTouch ADSL Modem"

From ArchWiki
Jump to: navigation, search
(New page: 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 ...)
 
Line 100: Line 100:
 
Anyway, create a file called start_internet with the following contents:
 
Anyway, create a file called start_internet with the following contents:
  
 +
<source>
 
#!/bin/sh
 
#!/bin/sh
 
# Speedtouch connection script
 
# Speedtouch connection script
Line 116: Line 117:
 
echo "The SpeedTouch firmware did not load"
 
echo "The SpeedTouch firmware did not load"
 
exit 1
 
exit 1
 +
</source
  
 
Now install this to the /usr/bin directory:
 
Now install this to the /usr/bin directory:

Revision as of 17:18, 17 December 2007

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 [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

You will, later, need the firmware-extractor too, which can be found 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: 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.

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. Now you should 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, making sure you amend it for 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 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

      1. If the firmware loads but pppd won't
      2. connect, uncomment this option to make
      3. pppd be more verbose in the system log
  1. debug
      1. For more details (and more options)
      2. 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: ln -sf 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 don't know them!

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

<source>

  1. !/bin/sh
  2. 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 </source

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:

  1. !/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 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 be automatically 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!