LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 1102|回复: 1

Alcatel USB adsl 驱动方法

[复制链接]
发表于 2003-7-15 16:32:39 | 显示全部楼层 |阅读模式
http://www.linux.ie/articles/tutorials/adsl-howto.php

For The Hardware:
The speedmgmt application from Alcatel; http://www.speedtouchdsl.com
The Open Source Kernel Module written and maintained by John Verrept; http://linux-usb.sourceforge.net/SpeedTouch
The SARLib; http://sarlib.sourceforge.net
A linux kernel, 2.4.2 or above.; http://ftp.kernel.org/pub/linux/kernel/v2.4

For PPPoE:
A PPPoE aware daemon; http://skyhawk.redbrick.dcu.ie/Adsl/ppp-2.4.0-pppoe4.tgz

The RFC2684 Bridging kernel patch and configuration utility
http://skyhawk.redbrick.dcu.ie/Adsl/br2684-against2.4.17.diff
http://skyhawk.redbrick.dcu.ie/Adsl/brctl-010226.c

The versions I used of these packages are available here


http://www.redbrick.dcu.ie/~skyhawk/Adsl/

Firstly you must patch the kernel:
Change to the directory where you will be untarring the kernel
cd /usr/src

Untar the kernel source:

tar zxvf linux-2.4.x.tar.gz

Your source may be in .tar.bz2 format
If so do this

bunzip2 linux-2.4.x.tar.bz2
tar xvf linux-2.4.x.tar

Now to apply the PPPoE patch:

cd /usr/src/linux
patch -p1 -s -E < /pathTo/br2684-against2.4.17.diff

Now you must configure the kernel:
choose your preferred kernel config program
e.g make menuconfig, make xconfig

The Following options must be set for the adsl to work:
Code Maturity Level Options
Prompt for development and/or incomplete code/drivers [Y]

Loadable Module Support
Enable Loadable Module Support [Y]

Processor type and features
Symmetric multi-processing support [N]

Networking Options
Packet Socket [Y]
Asynchronus Transfer Mode (ATM) (EXPERIMENTAL) [Y]
RFC 1482/2684 Bridged protocols [Y]

Network Device Support
PPP (Point-to-Point Protocol) Support [Y]
PPP Deflate Compression [Y]
PPP over Ethernet (EXPERIMENTAL)

USB Support
Support for USB [Y]
Preliminary USB Device Filesystem [Y]
UHCI (Intel PIIX4, VIA,...) Support [M]
OHCI (Compag, iMacs, Opti, SiS, Ali,...) support [M]


NOTE:These are merely the options needed to get the adsl functioning
Don't forget to select the other modules needed for your systems
correct operation.

Once your selections have been made save your new kernel configuration
and compile your new kernel.

make dep
make bzImage
make modules
make modules_install
make install

If all goes to plan you should now have a new kernel.
Reboot for the changes to take effect.

On reboot type uname -a to verify the new kernel version.


Next the Speedtouch module must be compiled:
Untar and build the SARLib:

tar xvzf sarlib-0.2.x.tgz
ln -s sarlib-0.2.x sarlib
cd sarlib
make

Now the SpeedTouch module:

tar xvzf speedtouch-1.x.tar.gz
cd SpeedTouch
make
make install

You should now have the required kernel module.

Next we need to install the Binary Management Application:

tar xvzf speedmgmt-1.x.gz
cd mgmt
cp speedmgmt /usr/sbin

DO NOT compile these files, we only need the firmware application itself.

Next you need to install PPPoE support:
Firstly the ATM Package:

tar xvzf atm-0.78.tar.gz
cd atm
make
make install

Next compile the br2684 utility

cc -o br2684ctl brctl-010226.c -latm
cp br2684ctl /usr/sbin

Lastly install the PPPoE daemon:

tar xvzf ppp-2.4.0-pppoe4.tgz
cd ppp-2.4.0.pppoe4
./configure
make
make install

That completes the installation of the required packages.
Now all thats left is to configure the system.

Configuring the usb system
Add this line to /etc/fstab

/dev/usb /proc/bus/usb usbdevfs defaults 0 0

This will mount your usb filesystem at boot-time

Configuring PPPoE

Edit your /etc/ppp/options file and replace it with:
lock
defaultroute
noipdefault
noauth
passive
asyncmap 0
name yourIstreamName@eircom.net
user yourIstreamName@eircom.net
lcp-echo-interval 2
lcp-echo-failure 7
plugin /usr/lib/pppd/plugins/pppoe.so
nas0

Next edit /etc/ppp/chap-secrets and /etc/ppp/pap-secrets and add the following
"yourIstreamName@eircom.net" * "yourIstreamPass"


And finally testing the system:

Make sure your usb modules and speedtouch modules are active
type modconf
go to /kernel/drivers/usb
and select the speedtch module and your required usb module/s
Verify the modules have taken by typing lsmod.

Now the moment of truth
Firstly bring up the Ethernet bridge

br2684ctl -b -c 0 -a 8.35
Next bring up the nas0 interface

ifconfig nas0 up
Now initialise the modem with the binary application
speedmgmt
And lastly initialise your ppp daemon
pppd

IF all goes well you should see the following in /var/log/syslog


pulsar pppd[245]: Plugin /usr/lib/pppd/plugins/pppoe.so loaded.
pulsar pppd[245]: PPPoE Plugin Initialized
pulsar pppd[246]: pppd 2.4.0 started by root, uid 0
pulsar pppd[246]: Sending PADI
pulsar pppd[246]: HOST_UNIQ successful match
pulsar pppd[246]: HOST_UNIQ successful match
pulsar pppd[246]: Got connection: f41
pulsar pppd[246]: Connecting PPPoE socket: 00:02:3b:01:de:88 410f nas0
pulsar pppd[246]: Using interface ppp0
pulsar pppd[246]: Connect: ppp0 <--> nas0
pulsar pppd[246]: Remote message: CHAP authentication success, unit 38
pulsar pppd[246]: local IP address 159.134.96.31
pulsar pppd[246]: remote IP address 159.134.96.1

CONGRATULATIONS your adsl line is working.

There are a lot of ways in which things can go wrong whilst attempting this.
It took me countless recompiles and reboots to finally get it going.
If you are having problems feel free to drop me a mail and hopefully
it's an error that I may have come across during my ordeal in getting this
working.
                                                                     
发表于 2003-7-17 08:23:50 | 显示全部楼层
ibn兄,这个办法可以试一下,这里就说的是ALCATEL的驱动办法.
您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表