ADSL USB modem on Linux

This is to help anyone who is trying to setup a USB modem to be used with an ADSL Internet connection under Linux.

There is now a great tutorial on the ECIADSL website, so follow this tutorial and if you get stuck, you might find something useful below.

EciAdsl Tutorial

My ADSL setup

My experience comes from recently setting up my D-Link DSL-200 ADSL USB modem (see the picture of the modem below). I set this modem up on my RedHat 8.0 system, connecting to Pacific Internet's home ADSL service.

I used the pppd linux deamon (version 2.4) along with the eciadsl usermode usb drivers (version 5) to achieve this connection.

Step 1 - Kernel check

First, make sure your Linux kernel version is greater or equal to version 2.4.7-10. You can test this by running the command "uname -r". I am using the RedHat 8.0 default kernel version, which is 2.4.18-14. I recommend using the most recent kernel version, as this will support more devices and likely have better system functionality.

Step 2 - Download the Eciadsl Usermode program

The eciadsl project provides a program called Usermode, which is an application that was written especially for ADSL connections. It supports a lot of different network devices (USB, PCI, modems, network cards) and supporting different ADSL network protocol types (pppoe, pppoa etc...).

You can download usermode from the eciadsl website, or just simply use this link for the rpm eciadsl-usermode-0.5-2.i586.rpm.

Note for RedHat 8.0: the eciadsl-usermode-0.5-2.rpm is likely to be already installed. You can check this by running the command: "rpm -qa | grep eciadsl".

Now, if your serivce provider uses the DMT adsl protocol (such as Telstra and Pacific Internet in Australia) you will have to copy the following file:
cp /etc/eciadsl/eci_wan3.dmt.bin /etc/eciadsl/eci_wan3.bin

Step 3 - Remove dabusb module

By default, eciadsl/usermode is installed to /etc/eciadsl/, with the binaries (executables) in the /usr/local/bin/ folder.

After installation, eciadsl recommends you remove the dabusb module (if it's installed) to be able to install the driver and make the modem work.. You can check this by running the following command: "lsmod | grep dabusb". If your system is using the dabusb module, then you can do the following:

  1. rmmod dabusb
  2. find /lib/modules/`uname -r`/ -name "dabusb.o*" -exec rm -rf {} \;
  3. depmod -a

Note: If you move or copy the dabusb.o file, make sure no copies are located in the /lib/modules directory (regardless of the new name), as it may be automatically loaded at the next boot.

Step 4 - pppd adsl configuration script

After Usermode is installed, you should have a file called "adsl" in the /etc/ppp/peers/ folder (if not, then copy the default one from /etc/eciadsl).

It should look something like this:

# ... Comments ...
# 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
kdebug 1
pty "/usr/local/bin/pppoeci -vpi 8 -vci 35"
user "adsl@adsl"
holdoff 1
maxfail 0
#lcp-echo-interval 600
#lcp-echo-failure 10

Change the username for your own account in the adsl file:
Replace user "adsl@adsl" with your own username "your_login@your.isp.com"
example: user "jjsmith@dsl.pacific.net.au"

Step 5 - pppd authentication files

There are two different files that need to contain your password that matches with your adsl account username. These files are:

Both files use exactly the same syntax. You must create a line like the following:

# Secrets for authentication using PAP
# client server password IP addresses
"jjsmith@dsl.pacific.net.au" * "your_password" *

The first fields is your username (which must match your username in the adsl file)!
The second fields is the server name, you can leave this as a * (star).
The third field is your password.
The forth fields is your ip address, leave this as a * (star) to obtain your IP address via the login process (DHCP).
Note: "*" are important fields within these files. Fields are seperated with either tabs or spaces

Step 6 - Connection procedure

All distributions using a VIA or INTEL motherboard ChipSet (most people use these), you need to remove any modules that have control of your USB device:

  • rmmod usb-uhci
  • modprobe usb-uhci
  • mount -t usbdevfs none /proc/bus/usb
  • /usr/local/bin/startmodem

For a motherboard using an ALI Aladin chip, use the same procedure as above but replace references to usb-uhci by usb-ohci.

Once you run startmodem, you should have a lot of output printing to the screen, which shoul eventually end with it saying you are connected to the network with such and such IP address. You should also be able to see your ppp0 network in ifconfig.

Toubleshooting - When things don't work :(

Problem 1

eci-load2 can't manage to synchronize // hangs at packet 259 or before

  • The driver can't achieve synchronization, it must be restarted. To restart the driver, we advise you to restart from the beginning of Step 6.
  • Else, try unpluging and re-pluging in the modem.
  • Also, try running the "startmodem" command from a tty console (that's the console/login when you hit <CTRL>-<ALT>-<F1>. You can return to the desktop environment by hitting <ALT>-<F7>)

Problem 2

pppd stops with error: LCP timeout

Case 1 : you have a timeout problem on the PPP connection: Edit
etc/ppp/peers/adsl Un-Comment the 2 last lines:
lcp-echo-interval 600
lcp-echo-failure 10

Case 2 : you have an authentication problem (PPP doesn't always say it
explicitly). Check your scripts:
/etc/ppp/chap-secrets & /etc/ppp/pap-secrets

Problem 3

You get this error message: Can't find your ECI Telecom USB ADSL Loader

[root@hwi usermode]# ./startmodem
/proc/bus/usb: No such file or directory
Can't find your ECI Telecom USB ADSL Loader
ECI Load 1 : failed!
/proc/bus/usb: No such file or directory
Can't find your ECI Telecom USB ADSL WAN Modem
ECI Load 2 : failed!

If you get a message that looks like this, it means that you haven't mounted the usb file system, so run the following command "mount -t usbdevfs none /proc/bus/usb"

Problem 4

The PPP connection is OK and I can see ppp0 in ifconfig, but I can't go on the Internet.

Verify that your DNS are recognized:
check in /etc/resolv.conf that there are lines beginning with nameserver.

Other problems

Visit the eciadsl website for up-to-date information, also see there howto page for other configurations and ideas.