个人工具

“UsbAdslModem/e-techV2”的版本间的差异

来自Ubuntu中文

跳转至: 导航, 搜索
(新页面: This howto will help you to set up a e-tech V2 ADSL USB modem. ===== Item 1 - drivers for the USB modem ===== ====== Step 1: obtain the drivers ====== A group of people in the sourcefo...)
 
(UsbAdsl猫/针对accessrunner芯片)
第1行: 第1行:
This howto will help you to set up a e-tech V2 ADSL USB modem.
+
<p>This howto will help you to set up a e-tech V2 ADSL USB modem.
 
+
</p>
===== Item 1 - drivers for the USB modem =====
+
<h5> Item 1 - drivers for the USB modem </h5>
 
+
<h6> Step 1: obtain the drivers </h6>
====== Step 1: obtain the drivers ======
+
<p>A group of people in the sourceforge project is developing drivers for many USB ADSL modems. For my USB DSL modem (e-tech-V2 usb) with the conexant chip I found the following files (http://accessrunner.sourceforge.net/index.shtml):
 
+
</p><p>/drivers/usb/atm/cxacru.c
A group of people in the sourceforge project is developing drivers for many USB ADSL modems. For my USB DSL modem (e-tech-V2 usb) with the conexant chip I found the following files (http://accessrunner.sourceforge.net/index.shtml):
+
</p><p>/drivers/usb/atm/Kbuild
 
+
</p><p>/drivers/usb/atm/Kconfig
/drivers/usb/atm/cxacru.c
+
</p><p>/drivers/usb/atm/usbatm.c
 
+
</p><p>/drivers/usb/atm/usbatm.h
/drivers/usb/atm/Kbuild
+
</p><p><br />
 
+
</p>
/drivers/usb/atm/Kconfig
+
<h6> Step 2: obtain firmware for the modem </h6>
 
+
<p>Most USB modems contain a microprocessor (a 'simple' computer), which is programmable and therefore can do many different things, so it is sold a lot and can be cheap. The above driver (cxacru) will try to 'upload' a small program to the modem, allowing the microprocessor to do the 'modem-work'. This small program (called <b>firmware</b>) is often licensed.  
/drivers/usb/atm/usbatm.c
+
</p><p>The drivers (downloaded in Step 1) do not contain theis firmware (otherwise it would be illegal), but you probably got a CD with the modem, which contains many files, in which the firmware is also contained. If you have the modem working for Windows, the firmware is in the Windows partition. So you already have a legal copy of the firmware, the only problem is finding the firmware. The sourceforge site gives you some intsructions. I have found a programm called cxacru-fw.c (I lost the URL name, but you can trace it with Google). After compiling cxacru-fw.c (the URL gives you clear instructions), cxacru-fw can extract the firmware from a file called CnxEtU.sys on the modem CD, or the Windows partition. Make sure that you name the firmware file <i>cxacru-fw.bin</i>
 
+
</p><p>Place the file cxacru-fw.bin in:
/drivers/usb/atm/usbatm.h
+
</p><p>/lib/hotplug/firmware  
 
+
</p><p><b>Note:</b> this is Ubuntu specific - other Linux distributions use other locations.
 
+
<b>Note 2:</b> the file cxacru-fw.bin is licensed, do not redistribute it.
====== Step 2: obtain firmware for the modem ======
+
</p>
 
+
<h6> Step 3: recompile the linux-kernel  </h6>
Most USB modems contain a microprocessor (a 'simple' computer), which is programmable and therefore can do many different things, so it is sold a lot and can be cheap. The above driver (cxacru) will try to 'upload' a small program to the modem, allowing the microprocessor to do the 'modem-work'. This small program (called '''firmware''') is often licensed.  
+
<p>(unfortunately this is difficult without an internet connection)
 
+
</p><p><b>Step 3a:</b> There is a HOWTO "Kernel Compilation for Newbies" at ubuntuforums.org. You need to do all obligatory steps mentioned there to recompile the kernel. The HOWTO aims at recompilation of the kernel to get a video card working, so a number of optional steps can be skipped.  
The drivers (downloaded in Step 1) do not contain theis firmware (otherwise it would be illegal), but you probably got a CD with the modem, which contains many files, in which the firmware is also contained. If you have the modem working for Windows, the firmware is in the Windows partition. So you already have a legal copy of the firmware, the only problem is finding the firmware. The sourceforge site gives you some intsructions. I have found a programm called cxacru-fw.c (I lost the URL name, but you can trace it with Google). After compiling cxacru-fw.c (the URL gives you clear instructions), cxacru-fw can extract the firmware from a file called CnxEtU.sys on the modem CD, or the Windows partition. Make sure that you name the firmware file ''cxacru-fw.bin''
+
 
+
Place the file cxacru-fw.bin in:
+
 
+
/lib/hotplug/firmware  
+
 
+
'''Note:''' this is Ubuntu specific - other Linux distributions use other locations.
+
'''Note 2:''' the file cxacru-fw.bin is licensed, do not redistribute it.
+
 
+
====== Step 3: recompile the linux-kernel  ======
+
(unfortunately this is difficult without an internet connection)
+
 
+
'''Step 3a:''' There is a HOWTO "Kernel Compilation for Newbies" at ubuntuforums.org. You need to do all obligatory steps mentioned there to recompile the kernel. The HOWTO aims at recompilation of the kernel to get a video card working, so a number of optional steps can be skipped.  
+
 
However, the HOWTO assumes Ubuntu has a working internet connection.  
 
However, the HOWTO assumes Ubuntu has a working internet connection.  
 
+
</p><p><b>Step 3b:</b> This means that you cannot install all the packages you need to recompile the kernel. The files you need are somewhere in http://archive.ubuntu.com/ubuntu/
'''Step 3b:''' This means that you cannot install all the packages you need to recompile the kernel. The files you need are somewhere in http://archive.ubuntu.com/ubuntu/
+
 
One of the packages you need is libncurses5-dev
 
One of the packages you need is libncurses5-dev
 
A trick to find the location is as follows:
 
A trick to find the location is as follows:
第43行: 第29行:
 
Search for libncurses5-dev
 
Search for libncurses5-dev
 
Now you get a reference to a location in the Debian FTP-archive. The Ubuntu archive has the same structure, so you can find libncurses5-dev in a similar location in the ubuntu archive.
 
Now you get a reference to a location in the Debian FTP-archive. The Ubuntu archive has the same structure, so you can find libncurses5-dev in a similar location in the ubuntu archive.
 
+
</p><p>The packages downloaded this way wil have the extension .deb. They can be installed manually through the command:
The packages downloaded this way wil have the extension .deb. They can be installed manually through the command:
+
</p>
<pre><nowiki>
+
<pre>
 
dpkg -i (package.deb)
 
dpkg -i (package.deb)
</nowiki></pre>
+
</pre>
To get a feeling for how to use this workaround, read the section 'compile from a vanila kernel' in HOWTO "Kernel Compilation for Newbies"
+
<p>To get a feeling for how to use this workaround, read the section 'compile from a vanila kernel' in HOWTO "Kernel Compilation for Newbies"
 
+
</p><p><b>Step 3c:</b> If you finished step 3 HOWTO "Kernel Compilation for Newbies" (congratulations if you got here), first exit menuconfig.
'''Step 3c:''' If you finished step 3 HOWTO "Kernel Compilation for Newbies" (congratulations if you got here), first exit menuconfig.
+
 
Look for the place where usb_atm.c is in the source tree. This is provbably
 
Look for the place where usb_atm.c is in the source tree. This is provbably
 
/usr/src/linux/drivers/usb/atm/usb_atm.c
 
/usr/src/linux/drivers/usb/atm/usb_atm.c
 
Here, rename the files usb_atm.c, usb_atm.h, Kbuild and Kconfig (add something like .old).
 
Here, rename the files usb_atm.c, usb_atm.h, Kbuild and Kconfig (add something like .old).
 
Copy the new drivers to this location:
 
Copy the new drivers to this location:
 
+
</p><p>/drivers/usb/atm/cxacru.c
/drivers/usb/atm/cxacru.c
+
</p><p>/drivers/usb/atm/Kbuild
 
+
</p><p>/drivers/usb/atm/Kconfig
/drivers/usb/atm/Kbuild
+
</p><p>/drivers/usb/atm/usbatm.c
 
+
</p><p>/drivers/usb/atm/usbatm.h
/drivers/usb/atm/Kconfig
+
</p><p>I renamed usbatm.c and usbatm.h to usb_atm.c and usb_atm.h, but I am not sure whether this is necessary.
 
+
</p><p>Now, type again
/drivers/usb/atm/usbatm.c
+
</p>
 
+
<pre>
/drivers/usb/atm/usbatm.h
+
 
+
I renamed usbatm.c and usbatm.h to usb_atm.c and usb_atm.h, but I am not sure whether this is necessary.
+
 
+
Now, type again
+
<pre><nowiki>
+
 
sudo make menuconfig
 
sudo make menuconfig
</nowiki></pre>
+
</pre>
Now, in the submenu drivers-usb-atm I selected cxacru (the new driver!) and typed m (maybe * will do, I am not sure).  
+
<p>Now, in the submenu drivers-usb-atm I selected cxacru (the new driver!) and typed m (maybe * will do, I am not sure).  
 
Exit menuconfig and compile the kernel.
 
Exit menuconfig and compile the kernel.
 
+
</p><p><b>Step 3d (optional):</b> Everything should go well, but it did not in my case. I got the error-message:
'''Step 3d (optional):''' Everything should go well, but it did not in my case. I got the error-message:
+
</p>
<pre><nowiki>
+
<pre>
 
Inconsistent kallsyms data
 
Inconsistent kallsyms data
 
Try setting CONFIG_KALLSYMS_EXTRA_PASS
 
Try setting CONFIG_KALLSYMS_EXTRA_PASS
 
make: *** [vmlinux] Fout 1
 
make: *** [vmlinux] Fout 1
</nowiki></pre>
+
</pre>
I don't know how to set CONFIG_KALLSYMS_EXTRA_PASS, so I did a bad thing, namely edit the Makefile. I looked for the place in Makefile that checks the parameter CONFIG_KALLSYMS_EXTRA_PASS, and changed the IF statement such that it acts as if CONFIG_KALLSYMS_EXTRA_PASS is true. This worked.  
+
<p>I don't know how to set CONFIG_KALLSYMS_EXTRA_PASS, so I did a bad thing, namely edit the Makefile. I looked for the place in Makefile that checks the parameter CONFIG_KALLSYMS_EXTRA_PASS, and changed the IF statement such that it acts as if CONFIG_KALLSYMS_EXTRA_PASS is true. This worked.  
 
(I hope somebody edits this, and explains how to do this nicely)
 
(I hope somebody edits this, and explains how to do this nicely)
 
+
</p><p><b>Step 3e (optional):</b> Further in the proces I got the error message:
'''Step 3e (optional):''' Further in the proces I got the error message:
+
</p>
<pre><nowiki>
+
<pre>
 
dpkg-gencontrol: error: package kernel-image-2.6.12-accessrunner not in control info
 
dpkg-gencontrol: error: package kernel-image-2.6.12-accessrunner not in control info
 
make[1]: *** [real_stamp_image] Fout 255
 
make[1]: *** [real_stamp_image] Fout 255
 
make[1]: Leaving directory `/usr/src/linux-source-2.6.12-10.25'
 
make[1]: Leaving directory `/usr/src/linux-source-2.6.12-10.25'
 
make: *** [kernel-image-deb] Fout 2
 
make: *** [kernel-image-deb] Fout 2
</nowiki></pre>
+
</pre>
Here also I did a probably bad thing: I added something like this to debian/control
+
<p>Here also I did a probably bad thing: I added something like this to debian/control
<pre><nowiki>
+
</p>
 +
<pre>
 
Package: kernel-image-2.6.12-accessrunner
 
Package: kernel-image-2.6.12-accessrunner
 
Architecture: all
 
Architecture: all
第100行: 第80行:
 
Provides: ${kt-provides}
 
Provides: ${kt-provides}
 
Description: Linux kernel image
 
Description: Linux kernel image
</nowiki></pre>
+
</pre>
I had to do this for two packages.
+
<p>I had to do this for two packages.
 
(I hope somebody edits this, and explains how to do this nicely)
 
(I hope somebody edits this, and explains how to do this nicely)
 
+
</p><p><b>Step 3f:</b> Eventually you have new kernel packages. If you couldn't do it, send me a line at [email protected], and I will e-mail the two package files (25 MB)
'''Step 3f:''' Eventually you have new kernel packages. If you couldn't do it, send me a line at [email protected], and I will e-mail the two package files (25 MB)
+
</p><p><b>Step 4:</b> Install the kernel-packages (see the HOWTO "Kernel Compilation for Newbies"). If you restart the computer, GRUB will give you the option to start the new kernel. After starting the new kernel and loggin in, check in Applications - System tools - System log. If everything went well you can see that the USB modem is detected and cxacru is activated. You also see messages from CXacru in /var/log/messages:
 
+
'''Step 4:''' Install the kernel-packages (see the HOWTO "Kernel Compilation for Newbies"). If you restart the computer, GRUB will give you the option to start the new kernel. After starting the new kernel and loggin in, check in Applications - System tools - System log. If everything went well you can see that the USB modem is detected and cxacru is activated. You also see messages from CXacru in /var/log/messages:
+
 
If everything went well you see
 
If everything went well you see
<pre><nowiki>
+
</p>
 +
<pre>
 
localhost kernel [4294759.585000] cxacru 1-1:1.0: ADSL line: training
 
localhost kernel [4294759.585000] cxacru 1-1:1.0: ADSL line: training
 
localhost kernel [4294764.599000] cxacru 1-1:1.0: ADSL line: channel analysis
 
localhost kernel [4294764.599000] cxacru 1-1:1.0: ADSL line: channel analysis
 
localhost kernel [4294769.585000] cxacru 1-1:1.0: ADSL line: up (384 Kib/s down | 128 Kib/s up)
 
localhost kernel [4294769.585000] cxacru 1-1:1.0: ADSL line: up (384 Kib/s down | 128 Kib/s up)
</nowiki></pre>
+
</pre>
'''Step 4a (optional):''' Initially I got errors:
+
<p><b>Step 4a (optional):</b> Initially I got errors:
<pre><nowiki>
+
</p>
 +
<pre>
 
localhost kernel [4300944.253000] cxacru 1-1:1.0: firmware unavailable (hotplug configuration problem?)
 
localhost kernel [4300944.253000] cxacru 1-1:1.0: firmware unavailable (hotplug configuration problem?)
 
localhost kernel [4295543.593000] cxacru 1-1:1.0: poll status: error -5
 
localhost kernel [4295543.593000] cxacru 1-1:1.0: poll status: error -5
</nowiki></pre>
+
</pre>
The 1. problem was I put the firmware in a wrong location.
+
<p>The 1. problem was I put the firmware in a wrong location.
 
The 2. problem may require newer firmware.
 
The 2. problem may require newer firmware.
 
+
</p><p><b>Closing remark:</b> Since USB ADSL modems are relatively cheap and easy to install, they will be used more and more. I hope that in future releases of Ubuntu (I installed version 2.6.10) the number of USB ADSL modems drivers in the 'default' setup will be increased, or at least that it will be easier to install the drivers. Recompiling the kernel without internet-connection is very difficult for a newby. On the other hand, placing the licensed firmware in the suitable location is relatively easy and can be done without complications by the user him- or herself.
'''Closing remark:''' Since USB ADSL modems are relatively cheap and easy to install, they will be used more and more. I hope that in future releases of Ubuntu (I installed version 2.6.10) the number of USB ADSL modems drivers in the 'default' setup will be increased, or at least that it will be easier to install the drivers. Recompiling the kernel without internet-connection is very difficult for a newby. On the other hand, placing the licensed firmware in the suitable location is relatively easy and can be done without complications by the user him- or herself.
+
</p><p><br />
 
+
<b>Note: the provider may assume that you logged in at the moment the firmware on the modem has connected to the network. This happens during linux startup. If you have to pay for the time being online, you have to dive in the details of cxacru to be able to logon and logoff at will.</b>
 
+
</p><p><br />
'''Note: the provider may assume that you logged in at the moment the firmware on the modem has connected to the network. This happens during linux startup. If you have to pay for the time being online, you have to dive in the details of cxacru to be able to logon and logoff at will.'''
+
</p>
 
+
<h5> Item 2 - connect the modem to the ethernet 'talk' of Ubuntu </h5>
 
+
<p>Dutch users (zonnet/versatel/tele2) should check this URL: http://www.dse.nl/~torch/usb_adsl_modem/
===== Item 2 - connect the modem to the ethernet 'talk' of Ubuntu =====
+
</p>
 
+
<h5> Setting up the bridge </h5>
Dutch users (zonnet/versatel/tele2) should check this URL: http://www.dse.nl/~torch/usb_adsl_modem/
+
<p>The ethernet 'talk' of Linux needs to be bridged to the modem and its connection to the network. If the modem is connected to the provider by the telephone network (using the ADSL-splitter), it probably uses a communication mode called <b>ATM</b> (Asynchronous Transfer Mode). In my case the drivers (see Item 1 - Step 1) had to be placed in a <i>atm</i> subdirectory. The fact that this subdirectory already exists in Ubuntu is a good sign: the connection to atm modems is already foreseen in Ubuntu.
 
+
</p><p>To start the 'bridge' between the ATM modem and Ubuntu type in a terminal:
===== Setting up the bridge =====
+
</p>
 
+
<pre>
The ethernet 'talk' of Linux needs to be bridged to the modem and its connection to the network. If the modem is connected to the provider by the telephone network (using the ADSL-splitter), it probably uses a communication mode called '''ATM''' (Asynchronous Transfer Mode). In my case the drivers (see Item 1 - Step 1) had to be placed in a ''atm'' subdirectory. The fact that this subdirectory already exists in Ubuntu is a good sign: the connection to atm modems is already foreseen in Ubuntu.
+
 
+
To start the 'bridge' between the ATM modem and Ubuntu type in a terminal:
+
 
+
<pre><nowiki>
+
 
sudo modprobe 2684
 
sudo modprobe 2684
</nowiki></pre>
+
</pre>
 
+
<p>There are various 'languages' that can be used to communicate through ATM, with names like 'AAL type 5'. Specific AAL5 dialects (encapsulation protocols) exist, such as LLC and VC-MUX.
There are various 'languages' that can be used to communicate through ATM, with names like 'AAL type 5'. Specific AAL5 dialects (encapsulation protocols) exist, such as LLC and VC-MUX.
+
</p><p>Remark further that more than one providers work through the same telecom-network, their datastreams are distuinguished by VPI.VCI codes.   
 
+
</p><p>The package to moderate the 'bridge' is the br2684ctl package. I couldn't find it in the Ubuntu-archive, but the br2684ctl package from debian works for me (see step 3b in Item 1 about acquiring and installing packages).
Remark further that more than one providers work through the same telecom-network, their datastreams are distuinguished by VPI.VCI codes.   
+
</p><p>My provider:
 
+
</p>
The package to moderate the 'bridge' is the br2684ctl package. I couldn't find it in the Ubuntu-archive, but the br2684ctl package from debian works for me (see step 3b in Item 1 about acquiring and installing packages).
+
<ul><li> uses LLC encapsualtion
 
+
</li><li> VPI.VCI code is 0.0.32
My provider:
+
</li></ul>
* uses LLC encapsualtion
+
<p>The syntax of the command is the following&nbsp;:
* VPI.VCI code is 0.0.32
+
</p>
 
+
<pre>
The syntax of the command is the following :
+
 
+
<pre><nowiki>
+
 
br2684ctl [-c n -e 0|1 -b 0|1 -s buf_size -a [itf].vpi.vci ]+
 
br2684ctl [-c n -e 0|1 -b 0|1 -s buf_size -a [itf].vpi.vci ]+
  
-a [itf].vpi.vci : ATM PVC number, VPI and VCI. Mandatory
+
-a [itf].vpi.vci&nbsp;: ATM PVC number, VPI and VCI. Mandatory
-c n : BR2684 interface number such as nas0,
+
-c n&nbsp;: BR2684 interface number such as nas0,
 
nas1,... Mandatory
 
nas1,... Mandatory
-e 0|1 : Encapsulation method. 0=LLC, 1=VC mux.
+
-e 0|1&nbsp;: Encapsulation method. 0=LLC, 1=VC mux.
 
default is 0, LLC
 
default is 0, LLC
-b 0|1 : Running background. 1=background,
+
-b 0|1&nbsp;: Running background. 1=background,
 
0=foreground. Default is 0
 
0=foreground. Default is 0
-s buf_size : send buffer size. Default is 8192.
+
-s buf_size&nbsp;: send buffer size. Default is 8192.
</nowiki></pre>
+
</pre>
 
+
<p>In my case the interface is created by:
In my case the interface is created by:
+
 
br2684ctl -b -e 0 -c 0 -a 0.0.32
 
br2684ctl -b -e 0 -c 0 -a 0.0.32
 
+
</p><p>Now an interface called <b>nas0</b> is created. This interface can be pictured as a software version of an ethernetcard in the PC.
Now an interface called '''nas0''' is created. This interface can be pictured as a software version of an ethernetcard in the PC.
+
</p>
 
+
<h5> Login </h5>
===== Login =====
+
<p>Once the bridge is working, you have to login. Again this is provider specific. I have detected three alternative procedures:
 
+
</p>
Once the bridge is working, you have to login. Again this is provider specific. I have detected three alternative procedures:
+
<ul><li> DHCP
 
+
</li><li> PPPoA
* DHCP
+
</li><li> PPPoE
* PPPoA
+
</li></ul>
* PPPoE
+
<p>For DHCP you typically do not have to give a username and password (I guess the provider recognises you through your telephone number). For both PPP procedures you will have to provide your username and pasword.
 
+
</p>
For DHCP you typically do not have to give a username and password (I guess the provider recognises you through your telephone number). For both PPP procedures you will have to provide your username and pasword.
+
<h6> DHCP </h6>
 
+
<p>If you use DHCP to login (this is used when you don't have to provide a password for connecting), use the <i>dhcpclient</i> command (in other linux distribution sthis is <i>dhcpcd</i>):
====== DHCP ======
+
</p>
 
+
<pre>
If you use DHCP to login (this is used when you don't have to provide a password for connecting), use the ''dhcpclient'' command (in other linux distribution sthis is ''dhcpcd''):
+
 
+
<pre><nowiki>
+
 
dhclient nas0
 
dhclient nas0
</nowiki></pre>
+
</pre>
 
+
<p>It worked for me, although I always get a few warning-messages at the end)
It worked for me, although I always get a few warning-messages at the end)
+
</p>
<pre><nowiki>
+
<pre>
 
sit0: unknown hardware address type 776
 
sit0: unknown hardware address type 776
 
sit0: unknown hardware address type 776
 
sit0: unknown hardware address type 776
第199行: 第167行:
 
DHCPACK from 82.172.112.1
 
DHCPACK from 82.172.112.1
 
bound to 82.172.112.235 -- renewal in 3125 seconds.
 
bound to 82.172.112.235 -- renewal in 3125 seconds.
</nowiki></pre>
+
</pre>
 
+
<p><br />
 
+
</p>
====== PPPoE and PPPoA ======
+
<h6> PPPoE and PPPoA </h6>
 
+
<p>Since I use DHCP, the following is fully untested. For your convenience, I copied this from another website. I gues it will not work for Ubuntu without modifications.
Since I use DHCP, the following is fully untested. For your convenience, I copied this from another website. I gues it will not work for Ubuntu without modifications.
+
</p><p><i>if PPPoA , download from http://accessrunner.sourceforge.net/debian-scripts/</i>
 
+
''if PPPoA , download from http://accessrunner.sourceforge.net/debian-scripts/
+
 
the peers-pppoa and put it in /etc/ppp/peers, edit that file especially the user
 
the peers-pppoa and put it in /etc/ppp/peers, edit that file especially the user
 
and the VPC/VCI peers.
 
and the VPC/VCI peers.
 
Add also your login password in the /etc/ppp/pap-secrets /etc/ppp/chap-secrets
 
Add also your login password in the /etc/ppp/pap-secrets /etc/ppp/chap-secrets
 
in the form
 
in the form
login * password *''
+
login * password *
<pre><nowiki>
+
</p>
 +
<pre>
 
insmod /lib/modules/2.6.10-5-386/kernel/net/atm/pppoatm.ko
 
insmod /lib/modules/2.6.10-5-386/kernel/net/atm/pppoatm.ko
 
pppd call peers-pppoa
 
pppd call peers-pppoa
</nowiki></pre>
+
</pre>
''if PPPoE
+
<p><i>if PPPoE</i>
 
Install
 
Install
 
apt-get install libatm1
 
apt-get install libatm1
 
+
</p><p>also you ll need to download 2 package from the ubuntu
also you ll need to download 2 package from the ubuntu
+
</p><p>br2684ctl_20040226-1_i386.deb
 
+
br2684ctl_20040226-1_i386.deb
+
 
atm-tools_2.4.1-16_i386.deb ( I m not sure if that one needed)
 
atm-tools_2.4.1-16_i386.deb ( I m not sure if that one needed)
 
+
</p><p>then install them with the command dpkg -i xxxxxfilexxxxx.deb
then install them with the command dpkg -i xxxxxfilexxxxx.deb''
+
</p><p><br />
 
+
<i>download from http://accessrunner.sourceforge.net/debian-scripts/</i>
 
+
''download from http://accessrunner.sourceforge.net/debian-scripts/
+
 
the peers-pppoe and put it in /etc/ppp/peers, edit that file especially the user.
 
the peers-pppoe and put it in /etc/ppp/peers, edit that file especially the user.
 
Add also your login password in the /etc/ppp/pap-secrets /etc/ppp/chap-secrets
 
Add also your login password in the /etc/ppp/pap-secrets /etc/ppp/chap-secrets
 
in the form
 
in the form
login * password *''
+
login * password *
 
+
</p><p><i>after that modify the /etc/network/interfaces and add&nbsp;:</i>
''after that modify the /etc/network/interfaces and add :
+
 
auto nas0
 
auto nas0
 
iface nas0 inet static
 
iface nas0 inet static
第243行: 第205行:
 
pre-up br2684ctl -b -c 0 -a 0.0.100
 
pre-up br2684ctl -b -c 0 -a 0.0.100
 
post-down kill $(cat /var/run/$IFACE.pid)
 
post-down kill $(cat /var/run/$IFACE.pid)
(the 0.0.100 is the form itf.vpi.vci you should set vpi/vci accordingly to what you have see your ISP for this infos.)''
+
(the 0.0.100 is the form itf.vpi.vci you should set vpi/vci accordingly to what you have see your ISP for this infos.)
 
+
</p><p><i>Restart the network to get the nas0 match the atm interface</i>
''Restart the network to get the nas0 match the atm interface
+
 
insmod /lib/modules/2.6.10-5-386/kernel/net/atm/br2684.ko
 
insmod /lib/modules/2.6.10-5-386/kernel/net/atm/br2684.ko
/etc/init.d/networking restart''
+
/etc/init.d/networking restart
 
+
</p><p><i>And finally connect</i>
''And finally connect
+
pppd call peers-pppoe
pppd call peers-pppoe''
+
</p><p><i>I m sorry it s a bit hard and maybe not well organized but it should give you a better</i>
 
+
idea of what you need to do.
''I m sorry it s a bit hard and maybe not well organized but it should give you a better
+
</p>
idea of what you need to do.''
+
<h6> Automated bridge and login </h6>
 
+
<p>With the procedures above the login is manually. If it works the procedure can be automated.  Presently I have a small executable text-file on my desktop:
====== Automated bridge and login ======
+
</p>
With the procedures above the login is manually. If it works the procedure can be automated.  Presently I have a small executable text-file on my desktop:
+
<pre>
 
+
<pre><nowiki>
+
 
#
 
#
 
sudo modprobe br2684
 
sudo modprobe br2684
第264行: 第223行:
 
sudo dhclient nas0
 
sudo dhclient nas0
 
sleep 5d
 
sleep 5d
</nowiki></pre>
+
</pre>
 
+
<p>If the connection is successfull the terminal window can be closed by typing Ctrl-C.
If the connection is successfull the terminal window can be closed by typing Ctrl-C.
+
</p><p><b>Note:</b> the provider may assume that you logged in at the moment the firmware on the modem has connected to the network. This happens during linux startup. If you have to pay for the time being online, you have to dive in the details of cxacru to be able to logon and logoff at will.
 
+
</p><p>Actually, the commands <i>modprobe ...</i>, <i>br2684ctl ..</i> and <i>dhclient or ppp...</i> can be executed during linux startup. I haven't tried it (yet), but you can check the site:
'''Note:''' the provider may assume that you logged in at the moment the firmware on the modem has connected to the network. This happens during linux startup. If you have to pay for the time being online, you have to dive in the details of cxacru to be able to logon and logoff at will.
+
</p><p>http://www.dse.nl/~torch/usb_adsl_modem/cxacru_auto.html
 
+
</p><p>(in Dutch)
Actually, the commands ''modprobe ...'', ''br2684ctl ..'' and ''dhclient or ppp...'' can be executed during linux startup. I haven't tried it (yet), but you can check the site:
+
</p><p><br />
 
+
</p>
http://www.dse.nl/~torch/usb_adsl_modem/cxacru_auto.html
+
<hr />
 
+
<p><br />
(in Dutch)
+
</p>
 
+
<hr />
 
+
<p><a href="等待翻译">等待翻译</a>
 
+
</p><a href="Category:CategoryDocumentation">Category:CategoryDocumentation</a> <a href="Category:CategoryNetworking">Category:CategoryNetworking</a> <a href="Category:CategoryCleanup">Category:CategoryCleanup</a>
----
+
[[category:CategoryDocumentation]] [[category:CategoryNetworking]] [[category:CategoryCleanup]]
+
 
+
 
+
----
+
[[等待翻译]]
+

2007年11月28日 (三) 15:35的版本

This howto will help you to set up a e-tech V2 ADSL USB modem.

Item 1 - drivers for the USB modem
Step 1: obtain the drivers

A group of people in the sourceforge project is developing drivers for many USB ADSL modems. For my USB DSL modem (e-tech-V2 usb) with the conexant chip I found the following files (http://accessrunner.sourceforge.net/index.shtml):

/drivers/usb/atm/cxacru.c

/drivers/usb/atm/Kbuild

/drivers/usb/atm/Kconfig

/drivers/usb/atm/usbatm.c

/drivers/usb/atm/usbatm.h


Step 2: obtain firmware for the modem

Most USB modems contain a microprocessor (a 'simple' computer), which is programmable and therefore can do many different things, so it is sold a lot and can be cheap. The above driver (cxacru) will try to 'upload' a small program to the modem, allowing the microprocessor to do the 'modem-work'. This small program (called firmware) is often licensed.

The drivers (downloaded in Step 1) do not contain theis firmware (otherwise it would be illegal), but you probably got a CD with the modem, which contains many files, in which the firmware is also contained. If you have the modem working for Windows, the firmware is in the Windows partition. So you already have a legal copy of the firmware, the only problem is finding the firmware. The sourceforge site gives you some intsructions. I have found a programm called cxacru-fw.c (I lost the URL name, but you can trace it with Google). After compiling cxacru-fw.c (the URL gives you clear instructions), cxacru-fw can extract the firmware from a file called CnxEtU.sys on the modem CD, or the Windows partition. Make sure that you name the firmware file cxacru-fw.bin

Place the file cxacru-fw.bin in:

/lib/hotplug/firmware

Note: this is Ubuntu specific - other Linux distributions use other locations.

Note 2: the file cxacru-fw.bin is licensed, do not redistribute it.

Step 3: recompile the linux-kernel

(unfortunately this is difficult without an internet connection)

Step 3a: There is a HOWTO "Kernel Compilation for Newbies" at ubuntuforums.org. You need to do all obligatory steps mentioned there to recompile the kernel. The HOWTO aims at recompilation of the kernel to get a video card working, so a number of optional steps can be skipped.

However, the HOWTO assumes Ubuntu has a working internet connection.

Step 3b: This means that you cannot install all the packages you need to recompile the kernel. The files you need are somewhere in http://archive.ubuntu.com/ubuntu/

One of the packages you need is libncurses5-dev A trick to find the location is as follows: goto http://ftp.se.kde.org/ftpsearch.html Search for libncurses5-dev Now you get a reference to a location in the Debian FTP-archive. The Ubuntu archive has the same structure, so you can find libncurses5-dev in a similar location in the ubuntu archive.

The packages downloaded this way wil have the extension .deb. They can be installed manually through the command:

dpkg -i (package.deb)

To get a feeling for how to use this workaround, read the section 'compile from a vanila kernel' in HOWTO "Kernel Compilation for Newbies"

Step 3c: If you finished step 3 HOWTO "Kernel Compilation for Newbies" (congratulations if you got here), first exit menuconfig.

Look for the place where usb_atm.c is in the source tree. This is provbably /usr/src/linux/drivers/usb/atm/usb_atm.c Here, rename the files usb_atm.c, usb_atm.h, Kbuild and Kconfig (add something like .old). Copy the new drivers to this location:

/drivers/usb/atm/cxacru.c

/drivers/usb/atm/Kbuild

/drivers/usb/atm/Kconfig

/drivers/usb/atm/usbatm.c

/drivers/usb/atm/usbatm.h

I renamed usbatm.c and usbatm.h to usb_atm.c and usb_atm.h, but I am not sure whether this is necessary.

Now, type again

sudo make menuconfig

Now, in the submenu drivers-usb-atm I selected cxacru (the new driver!) and typed m (maybe * will do, I am not sure). Exit menuconfig and compile the kernel.

Step 3d (optional): Everything should go well, but it did not in my case. I got the error-message:

Inconsistent kallsyms data
Try setting CONFIG_KALLSYMS_EXTRA_PASS
make: *** [vmlinux] Fout 1

I don't know how to set CONFIG_KALLSYMS_EXTRA_PASS, so I did a bad thing, namely edit the Makefile. I looked for the place in Makefile that checks the parameter CONFIG_KALLSYMS_EXTRA_PASS, and changed the IF statement such that it acts as if CONFIG_KALLSYMS_EXTRA_PASS is true. This worked. (I hope somebody edits this, and explains how to do this nicely)

Step 3e (optional): Further in the proces I got the error message:

dpkg-gencontrol: error: package kernel-image-2.6.12-accessrunner not in control info
make[1]: *** [real_stamp_image] Fout 255
make[1]: Leaving directory `/usr/src/linux-source-2.6.12-10.25'
make: *** [kernel-image-deb] Fout 2

Here also I did a probably bad thing: I added something like this to debian/control

Package: kernel-image-2.6.12-accessrunner
Architecture: all
Section: devel
Priority: optional
Depends: 
Provides: ${kt-provides}
Description: Linux kernel image

I had to do this for two packages. (I hope somebody edits this, and explains how to do this nicely)

Step 3f: Eventually you have new kernel packages. If you couldn't do it, send me a line at [email protected], and I will e-mail the two package files (25 MB)

Step 4: Install the kernel-packages (see the HOWTO "Kernel Compilation for Newbies"). If you restart the computer, GRUB will give you the option to start the new kernel. After starting the new kernel and loggin in, check in Applications - System tools - System log. If everything went well you can see that the USB modem is detected and cxacru is activated. You also see messages from CXacru in /var/log/messages:

If everything went well you see

localhost kernel [4294759.585000] cxacru 1-1:1.0: ADSL line: training
localhost kernel [4294764.599000] cxacru 1-1:1.0: ADSL line: channel analysis
localhost kernel [4294769.585000] cxacru 1-1:1.0: ADSL line: up (384 Kib/s down | 128 Kib/s up)

Step 4a (optional): Initially I got errors:

localhost kernel [4300944.253000] cxacru 1-1:1.0: firmware unavailable (hotplug configuration problem?)
localhost kernel [4295543.593000] cxacru 1-1:1.0: poll status: error -5

The 1. problem was I put the firmware in a wrong location. The 2. problem may require newer firmware.

Closing remark: Since USB ADSL modems are relatively cheap and easy to install, they will be used more and more. I hope that in future releases of Ubuntu (I installed version 2.6.10) the number of USB ADSL modems drivers in the 'default' setup will be increased, or at least that it will be easier to install the drivers. Recompiling the kernel without internet-connection is very difficult for a newby. On the other hand, placing the licensed firmware in the suitable location is relatively easy and can be done without complications by the user him- or herself.


Note: the provider may assume that you logged in at the moment the firmware on the modem has connected to the network. This happens during linux startup. If you have to pay for the time being online, you have to dive in the details of cxacru to be able to logon and logoff at will.


Item 2 - connect the modem to the ethernet 'talk' of Ubuntu

Dutch users (zonnet/versatel/tele2) should check this URL: http://www.dse.nl/~torch/usb_adsl_modem/

Setting up the bridge

The ethernet 'talk' of Linux needs to be bridged to the modem and its connection to the network. If the modem is connected to the provider by the telephone network (using the ADSL-splitter), it probably uses a communication mode called ATM (Asynchronous Transfer Mode). In my case the drivers (see Item 1 - Step 1) had to be placed in a atm subdirectory. The fact that this subdirectory already exists in Ubuntu is a good sign: the connection to atm modems is already foreseen in Ubuntu.

To start the 'bridge' between the ATM modem and Ubuntu type in a terminal:

sudo modprobe 2684

There are various 'languages' that can be used to communicate through ATM, with names like 'AAL type 5'. Specific AAL5 dialects (encapsulation protocols) exist, such as LLC and VC-MUX.

Remark further that more than one providers work through the same telecom-network, their datastreams are distuinguished by VPI.VCI codes.

The package to moderate the 'bridge' is the br2684ctl package. I couldn't find it in the Ubuntu-archive, but the br2684ctl package from debian works for me (see step 3b in Item 1 about acquiring and installing packages).

My provider:

  • uses LLC encapsualtion
  • VPI.VCI code is 0.0.32

The syntax of the command is the following :

br2684ctl [-c n -e 0|1 -b 0|1 -s buf_size -a [itf].vpi.vci ]+

-a [itf].vpi.vci : ATM PVC number, VPI and VCI. Mandatory
-c n : BR2684 interface number such as nas0,
nas1,... Mandatory
-e 0|1 : Encapsulation method. 0=LLC, 1=VC mux.
default is 0, LLC
-b 0|1 : Running background. 1=background,
0=foreground. Default is 0
-s buf_size : send buffer size. Default is 8192.

In my case the interface is created by: br2684ctl -b -e 0 -c 0 -a 0.0.32

Now an interface called nas0 is created. This interface can be pictured as a software version of an ethernetcard in the PC.

Login

Once the bridge is working, you have to login. Again this is provider specific. I have detected three alternative procedures:

  • DHCP
  • PPPoA
  • PPPoE

For DHCP you typically do not have to give a username and password (I guess the provider recognises you through your telephone number). For both PPP procedures you will have to provide your username and pasword.

DHCP

If you use DHCP to login (this is used when you don't have to provide a password for connecting), use the dhcpclient command (in other linux distribution sthis is dhcpcd):

dhclient nas0

It worked for me, although I always get a few warning-messages at the end)

sit0: unknown hardware address type 776
sit0: unknown hardware address type 776
Listening on LPF/nas0/00:d0:41:10:21:dc
Sending on   LPF/nas0/00:d0:41:10:21:dc
Sending on   Socket/fallback
DHCPREQUEST on nas0 to 255.255.255.255 port 67
DHCPACK from 82.172.112.1
bound to 82.172.112.235 -- renewal in 3125 seconds.


PPPoE and PPPoA

Since I use DHCP, the following is fully untested. For your convenience, I copied this from another website. I gues it will not work for Ubuntu without modifications.

if PPPoA , download from http://accessrunner.sourceforge.net/debian-scripts/

the peers-pppoa and put it in /etc/ppp/peers, edit that file especially the user and the VPC/VCI peers. Add also your login password in the /etc/ppp/pap-secrets /etc/ppp/chap-secrets in the form login * password *

insmod /lib/modules/2.6.10-5-386/kernel/net/atm/pppoatm.ko
pppd call peers-pppoa

if PPPoE Install apt-get install libatm1

also you ll need to download 2 package from the ubuntu

br2684ctl_20040226-1_i386.deb

atm-tools_2.4.1-16_i386.deb ( I m not sure if that one needed)

then install them with the command dpkg -i xxxxxfilexxxxx.deb


download from http://accessrunner.sourceforge.net/debian-scripts/ the peers-pppoe and put it in /etc/ppp/peers, edit that file especially the user. Add also your login password in the /etc/ppp/pap-secrets /etc/ppp/chap-secrets in the form login * password *

after that modify the /etc/network/interfaces and add :

auto nas0 iface nas0 inet static address 192.0.2.1 netmask 255.255.255.0 broadcast 192.0.2.255 0x0x gateway 192.0.2.254 pre-up br2684ctl -b -c 0 -a 0.0.100 post-down kill $(cat /var/run/$IFACE.pid) (the 0.0.100 is the form itf.vpi.vci you should set vpi/vci accordingly to what you have see your ISP for this infos.)

Restart the network to get the nas0 match the atm interface

insmod /lib/modules/2.6.10-5-386/kernel/net/atm/br2684.ko /etc/init.d/networking restart

And finally connect

pppd call peers-pppoe

I m sorry it s a bit hard and maybe not well organized but it should give you a better

idea of what you need to do.

Automated bridge and login

With the procedures above the login is manually. If it works the procedure can be automated. Presently I have a small executable text-file on my desktop:

#
sudo modprobe br2684
sudo br2684ctl -b -c 0 -a 0.0.32
sudo dhclient nas0
sleep 5d

If the connection is successfull the terminal window can be closed by typing Ctrl-C.

Note: the provider may assume that you logged in at the moment the firmware on the modem has connected to the network. This happens during linux startup. If you have to pay for the time being online, you have to dive in the details of cxacru to be able to logon and logoff at will.

Actually, the commands modprobe ..., br2684ctl .. and dhclient or ppp... can be executed during linux startup. I haven't tried it (yet), but you can check the site:

http://www.dse.nl/~torch/usb_adsl_modem/cxacru_auto.html

(in Dutch)





<a href="等待翻译">等待翻译</a>

<a href="Category:CategoryDocumentation">Category:CategoryDocumentation</a> <a href="Category:CategoryNetworking">Category:CategoryNetworking</a> <a href="Category:CategoryCleanup">Category:CategoryCleanup</a>