Sunday, July 6, 2008

getting ADSL USB modem working on Ubuntu Linux

Here are the steps I took to get my ADSL USB modem to work on Ubuntu.

Details:
Country = Sri Lanka (ISP = SLT; uses PPPoE)
Modem = Aztech ADSL USB Modem (DSL206U) (chipset = ADI Eagle II)
OS = Ubuntu Linux 8.04 (Hardy)

Steps:
* first have a terminal open and tail the syslog. (to see whats going on)
$ tail -f /var/log/syslog

* using synaptic package manager install br2684ctl (required since my ISP uses PPPoE)
(search for br2684)

* find and download the firmware for the modem chipset (Eagle-II in my case)
--- deprecated; use the .deb below instead ---
(firmware => ueagle-data-1.1.tar.gz)
(http://eagle-usb.org/ueagle-atm/non-free/ueagle-data-1.1.tar.gz)
* install firmware:
$ tar -xvzf ueagle-data-1.1.tar.gz
$ sudo mkdir /lib/firmware/ueagle-atm
$ cd ueagle-data-1.1/
$ sudo cp -a * /lib/firmware/ueagle-atm
--- update(17-Nov-08) ---:
Now there's a .deb which can be directly installed.
http://eagle-usb.org/ueagle-atm/non-free/ueagle-data_1.1-2_all.deb

* plug-in the modem; check if the firmware loads (in the syslog tail output).

* edit the connection file:
$ sudo gedit /etc/ppp/peers/ueagle-atm
type in the following:
user "myusername"
password "mypassword"
plugin rp-pppoe.so
nas0
noipdefault
usepeerdns
defaultroute
persist
noauth

* edit chap:
$ sudo gedit /etc/ppp/chap-secrets
add this line:
myusername * mypassword *

* edit pap:
$ sudo gedit /etc/ppp/pap-secrets
add this line (same as for chap):
myusername * mypassword *

* now create dial script to dial the modem.
$ gedit dialSLT
type in the following:
#!/bin/bash
sudo modprobe ppp_generic
sudo modprobe pppoatm
sudo modprobe br2684
sudo br2684ctl -b -c 0 -a 8.35
sleep 3
sudo ifconfig nas0 192.168.0.1 netmask 255.255.255.0 up
sleep 5
sudo pon ueagle-atm

* set exec permisions for the dial script and we're done!
$ chmod u+x dialSLT

* now to dial the modem just type:
$ ./dialSLT

// -----------------------------------------
important:
* in case the connection drops, do the following before redialing:
$ sudo poff ueagle-atm
$ sudo ifconfig nas0 down
$ sudo killall br2684ctl

No comments: