b-lux HOWTO/embedding Linux on network devices

|||| Contact us |||| Search : Google


b-lux HOWTO - DSL modems on Linux -A

The Speedtouch 330 ADSL USB modem on SuSE Linux/Kernel2.4

The Speedtouch 330 USB ADSL modem made by Alcatel/Thomson is promoted as compatible for usage with computers running Windows, Linux and MacOS. This is a USB-based device and Linux machines have excellent USB 1.1 and 2.0 capability with standard kernels. For this modem family, two types of device drivers are available for Linux machines; kernel mode drivers and user-space device drivers. At the time of writing however (July2004) the kernel mode driver sources seem not to have been updated for about a year.

The modem is sold with a CDROM containing the Windows drivers and microcode. Many such modems are bundled with various ISP ADSL services in Britain. Some versions (provided freely by some ISP's seem to be flash-programmed to work only with Windows). Normal modems provided by Alcatel/Thomson, should ( for x86-based machines) work for both Windows and Linux.

In principle the microcode should be download-able after 'registration' from the Speedtouch website. It was also until recently possible to install the Windows drivers and copy the microcode (alias firmware) to Linux. In addition, the new revision 4 modems (silver colour) have been produced after distributions such as SuSE9.0 (and even SuSE9.1) were released. The said distributions also provide kernel mode drivers. These too were built before the revision 4 modems were available. The modem is therefore normally identified (even to the point of serial number in SuSE9.1) on booting. On a prototype machine, modem presence is shown with a YAST hardware-scan in figure 1 below.


Figure 1: Example of YAST hardware scan showing Speedtouch ADSL modem.


However inspite of kernel recognition, the microcode problem mentioned above renders the newest ( revision 4 ) modems non-functional in distributions such as SuSE9.0/9.1.

top

This brief article is written to help those who use SuSE Linux9.0 install the user-space driver for Speedtouch 330; revision 4/silver USB ADSL modem. (One reason why SuSE9.0/and not SuSE9.1 was chosen, is because the latter (kernel-2.6-based) uses the newer USB kernel-module names and the Speedtouch drivers uses the older kernel-module names (such as usb-ohci, uhci, usb-uhci.). If time permits a report will be made for SuSE9.1.

PART 1: Installing the 'user-space driver'

1.If not already installed, install the the C/C++ compiler and tools using YAST. It is also not a bad idea to install the kernel sources.)
2.Download the speedtouch-1.x tarball from the Speedtouch Linux site.
3.Download the firmware for the speedtouch rev4 modem from the Thomson site or here.
4.Unpack the tarball with:-
tar xvzf speedtouch-xxx.tar.gz (OR tar xjzf speedtouch-xxx.tar.bz2)
Go (i.e. cd) into the new speedtouch-1.x directory;compile and install the drivers with:-
./configure
make
make install
The successful installation will lodge the binaries in /usr/local/sbin (shown in figure 2 below).


Figure 2: The executable binaries made after compilation of speedtouch-1.x.


5.Edit the /etc/ppp/options file to contain the following:
noauth
usepeerdns
lock
noipdefault
(You can either backup the existing file /etc/ppp/options, (i.e. as root do cp /etc/ppp/options /etc/ppp/optionsBAK for example) and insert the lines in a 'clean' file or edit the very elaborate one provided by SuSE.

6.Create an /etc/ppp/peers/adsl ( a file to use with the ppp daemon):

The procedure below is taken/modified from the 'SpeedTouch-HOWTO-en.html (in the doc-Linux directory in the speedtouch-1.x directory). You can cut and paste from line one to the end in a root shell, or you can type out the file excluding lines one and final.
cat > /etc/ppp/peers/adsl << "EOF"
#
# This file could be renamed but its place is under /etc/ppp/peers
# To connect to Internet using this configuration file
# pppd call adsl, where "adsl" stands for the name of this file
#

debug
kdebug 1
noipdefault
defaultroute
pty "/usr/local/sbin/pppoa3 -m 1 -e 1 -c -vpi 0 -vci 38"
#the vpi and vci above are for Britain, outside Britain you must substitute these numbers- see Table 1 below

sync
user "(username)@provider.com"
# nb please substitute your (username ) and provider
noauth
noaccomp
nopcomp
noccp
novj
holdoff 4
persist
maxfail 25
usepeerdns
EOF

Table 1: Some vpi and vci numbers for current ADSL services:

Country

vpi

vci

France,Belgium,Spain/Retvision, Sweden,USA

8

35

Spain/Telefonica

8

32

Netherlands

8

48

Britain

0

38

Poland,Portugal

0

35

Finland

0

100

Germany,Hungary

1

32

top


7.Edit /etc/ppp/chaps-secrets and /etc/ppp/pap-secrets as follows:-
# client server secret IP addresses
"username@provider.com" "*" "password"
-noting that there is a tab between each entry.

8. Edit /etc/modules.conf (you can cut and paste the following in a root shell (in /etc/modules)):-
alias char-major-108 ppp_generic
alias /dev/ppp ppp_generic
alias tty-ldisc-3 ppp_async
alias tty-ldisc-13 n_hdlc
alias tty-ldisc-14 ppp_synctty
alias ppp-compress-21 bsd_comp
alias ppp-compress-24 ppp_deflate
alias ppp-compress-26 ppp_deflate
9.Load essential kernel modules with the commands below; you can cut and past the following in a root shell:-
modprobe ppp_generic
modprobe ppp_synctty
modprobe n_hdlc

10. Then, check that usbdevfs is mounted with the following:-
modprobe usbcore mount none /proc/bus/usb -t usbdevfs
modprobe usb-uhci
or modprobe usb-ohci
or modprobe uhci
11.Unzip the firmware file to give file such as ZZZLP2.eni.

12. If two such files are obtained, concatenate both parts of the firmware as:-
cat ZZZLP1.eni ZZZLP2.eni > ZZZL.eni

top


Part 2: Using the modem:

13. Load the microcode to the modem with an expression such as the following:-
/usr/local/sbin/modem_run -f ZZZL.eni
Please consult the man pages (man modem_run) for modem_run options. Please also note the name of your microcode file may vary depending on its provenance.

14.If your ISP updates the DNS server(s) IP addresses dynamically the following may be useful.
As root do:
rm -f /etc/resolv.conf
ln -sf /etc/ppp/resolv.conf /etc/resolv.conf

15: Dial-out ADSL with
pppd call adsl

The connection can be tested my issuing the ifconfig command (as root) to verify if a pppN device exist. An example is show below in figure 3:


Figure 3: A example of verifying the ppp connection with the ifconfig command.


Steps 13 and 15 can be combined in a small executable script file.

top


page made: july2004 updated Feb05


Contact Us:


Basis Volume Limited supplies network routers/firewalls some of which can be loaded with SuSE Linux and the Speedtouch 330 modem. For more information please browse the firm's website

Our training group here b-lux.net provides training courses on embedded Linux amd Linux-networking including embedded network computing devices; parts of which include usage of modern ADSL modems and modern Linux distributions. For more information please contact us via the contact-us link above.

Copyright © b-linuxusergroup/basisvolumelimited 1999-2006: Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the gnu free documentation license is available at the URL: http://www.gnu.org/copyleft/fdl.html


1999/2006 by © b-linuxusergroup contact us regarding this website

eXTReMe Tracker