个人工具

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

来自Ubuntu中文

跳转至: 导航, 搜索
(UsbAdsl猫/针对accessrunner芯片)
 
(未显示同一用户的5个中间版本)
第1行: 第1行:
<p>This howto will help you to set up a e-tech V2 ADSL USB modem.
+
This howto will help you to set up a e-tech V2 ADSL USB modem.
</p>
+
 
<h5> Item 1 - drivers for the USB modem </h5>
+
===== 第1部分,USB猫驱动 =====
<h6> Step 1: obtain the drivers </h6>
+
 
<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):
+
====== 步骤1:获得驱动 ======
</p><p>/drivers/usb/atm/cxacru.c
+
 
</p><p>/drivers/usb/atm/Kbuild
+
在sourceforge 项目中一组人正在为许多USB ADSL猫开发驱动。我的 USB ADSL猫(a-tech-V2 usb)集成conexant芯片,我找到了一些关于它的如下文件(http: //accessrunner.sourceforge.net/index.shtml)<br>
</p><p>/drivers/usb/atm/Kconfig
+
 
</p><p>/drivers/usb/atm/usbatm.c
+
/drivers/usb/atm/cxacru.c
</p><p>/drivers/usb/atm/usbatm.h
+
 
</p><p><br />
+
/drivers/usb/atm/Kbuild
</p>
+
 
<h6> Step 2: obtain firmware for the modem </h6>
+
/drivers/usb/atm/Kconfig
<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.
+
 
</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>
+
/drivers/usb/atm/usbatm.c
</p><p>Place the file cxacru-fw.bin in:
+
 
</p><p>/lib/hotplug/firmware  
+
/drivers/usb/atm/usbatm.h
</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.
+
<br>
</p>
+
 
<h6> Step 3: recompile the linux-kernel </h6>
+
====== 步骤2:获取猫固件 ======
<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.  
+
大多数猫有一个可编程的微处理器(一台“简单的"的电脑),由于能做很多事,因此该处理器销售旺盛且非常便宜。上述驱动将会上载一个允许微处理器具备调制解调功能小程序到猫。这个小程序(叫做'''固件''')常要求得到许可。
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/
+
<br>
One of the packages you need is libncurses5-dev
+
 
A trick to find the location is as follows:
+
从步骤1下载的驱动不包含这些固件(否则它是非法的),但你可能得到一张包含许多文件的随猫CD,CD中含有该固件。如果你的猫工作在Windows下,固件就会在Windows区。因此你已经有了固件的合法复制品,唯一的问题是找到该固件。sourceforge站点给了你一些提示。我已经找到了一个叫做 cxacru-fw.c(我丢失了URL名,但是你可以通过google搜索到)的程序。在编译cxacru-fw.c(URL给你清晰指示)後,cxacru-fw会从CD上的一个叫做CnxEtU.sys文件中释放固件,或者释放Windows区,务必保证把把固件改名为cxacru- fw.bin,并把cxacru-bin放置在:
goto http://ftp.se.kde.org/ftpsearch.html
+
 
Search for libncurses5-dev
+
<br>
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:
+
/lib/hotplug/firmware
</p>
+
 
<pre>
+
'''''''''注释''':这是Ubuntu指定的,其它Linux释放版本用其它位置。''
dpkg -i (package.deb)
+
 
</pre>
+
'''''''''注释2''':文件cxacru-fw.bin是被许可的,勿重新分配。''
<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.
+
<br>
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
+
====== 步骤3:重新编译linux-kernel ======
Here, rename the files usb_atm.c, usb_atm.h, Kbuild and Kconfig (add something like .old).
+
 
Copy the new drivers to this location:
+
(不幸的是,若没有因特网连接该工作将很难进行)
</p><p>/drivers/usb/atm/cxacru.c
+
 
</p><p>/drivers/usb/atm/Kbuild
+
'''步骤 3a:'''在ubuntuforums.org上有一篇关于“新手内核编译“如何操作的文章。在重新编译内核时,你必须完成该文中提到的所有必要步骤。该文章的目的是通过重新编译内核使显卡工作,因此有许多可选步骤可以省略。
</p><p>/drivers/usb/atm/Kconfig
+
 
</p><p>/drivers/usb/atm/usbatm.c
+
然而,该文假设Ubuntu工作在有因特网连接的环境中。
</p><p>/drivers/usb/atm/usbatm.h
+
 
</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.
+
<br>
</p><p>Now, type again
+
 
</p>
+
'''步骤3b''':这就意味着你不能安装重新编译内核所需的所有包。你需要的文件一些在http://archive.ubuntu.com/ubuntu/
<pre>
+
 
sudo make menuconfig
+
其中一个你需要的包是libncurses5-dev,一种找到该文件地址的方法如下:进入 http://ftp.se.kde.org/ftpsearch.html,搜索libncurses5-dev,现在你会在Debian FTP-文档中得到一些该位置的信息。Ubuntu文档和Debian是一样的结构,因此你可以在ubuntu文档的相同位置找到libncurses5 -dev。
</pre>
+
 
<p>Now, in the submenu drivers-usb-atm I selected cxacru (the new driver!) and typed m (maybe * will do, I am not sure).
+
<br>
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:
+
通过这种方式下载的包会有一个扩展的.deb。该.deb可以通过下面命令手动安装:
</p>
+
<pre>dpkg -i (package.deb)
<pre>
+
</pre>  
Inconsistent kallsyms data
+
通过阅读vanila内核“新手内核编译“如何操作的编译部分,你能获得更多怎样利用这种变通方法的知识。
 +
 
 +
''''''
 +
 
 +
'''步骤3c:'''如果你完成步骤3“新手内核编译”如何操作(祝贺你已经到了这一步),首先退出配置菜单,查找usb_atm.c在原树中的位置。该位置很有可能在/usr/src/linux/drivers/usb/atm/usb_atm.c,在这里,重命名文件usb_atm.c,usb_atm.h, Kbuild和Kconfig(加了一些如.old的东西),复制新驱动到如下位置:
 +
 
 +
 
 +
 
 +
<br>
 +
 
 +
/drivers/usb/atm/cxacru.c
 +
 
 +
/drivers/usb/atm/Kbuild
 +
 
 +
/drivers/usb/atm/Kconfig
 +
 
 +
/drivers/usb/atm/usbatm.c
 +
 
 +
/drivers/usb/atm/usbatm.h
 +
 
 +
我把usbatm.c和usbatm.h重命名成usb_atm.c和usb_atm.h,但不能确认该操作是否有必要。
 +
 
 +
现在,再次输入:
 +
<pre>sudo make menuconfig
 +
</pre>  
 +
现在,在子菜单driers-usb-atm我选择了cxacru(新驱动),而后输入m(可能*也行,我不确定)。退出配置菜单并编译内核。
 +
 
 +
'''''''''步骤3d(可选):'''一切应该顺利,但在我的操作中并非如此,我得到一条错误信息:
 +
<pre>Inconsistent kallsyms data
 
Try setting CONFIG_KALLSYMS_EXTRA_PASS
 
Try setting CONFIG_KALLSYMS_EXTRA_PASS
 
make: *** [vmlinux] Fout 1
 
make: *** [vmlinux] Fout 1
</pre>
+
</pre>  
<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.
+
我不知道如何设置CONFIG_KALLSYMS_EXTRA_PASS,因此我做了一件错误的事,按名编辑Makefile,查找 CONFIG_KALLSYMS_EXTRA_PASS在Makefile中的位置,且核对其参数,然后改变IF声明使它在 CONFIG_KALLSYMS_EXTRA_PASS为真时执行。这种方法是有用的(我希望有人编辑过这个,且能解释怎样漂亮地完成编辑)
(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:
+
'''''''''步骤3e(可选):'''在安装过程中我再一次得到错误信息:
</p>
+
<pre>dpkg-gencontrol: error: package kernel-image-2.6.12-accessrunner not in control info
<pre>
+
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
</pre>
+
</pre>  
<p>Here also I did a probably bad thing: I added something like this to debian/control
+
在这里,我也可能做了一件错误的事情,加了一些如下的东西到debian/control
</p>
+
<pre>Package: kernel-image-2.6.12-accessrunner
<pre>
+
Package: kernel-image-2.6.12-accessrunner
+
 
Architecture: all
 
Architecture: all
 
Section: devel
 
Section: devel
第80行: 第104行:
 
Provides: ${kt-provides}
 
Provides: ${kt-provides}
 
Description: Linux kernel image
 
Description: Linux kernel image
</pre>
+
</pre>  
<p>I had to do this for two packages.
+
因为有两个包,我不得不这样做,(我希望有人编辑过这个,且能解释怎样漂亮地完成编辑)
(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 wubu.20.jacquesb@spamgourmet.com, and I will e-mail the two package files (25 MB)
+
'''''''''步骤3f:'''最终你会有新的内核包。如果你不能完成上述过程,通过wubu.20.jacquesb@spamgourmet.com给我发信息,我会用email传给你两个包文件(25MB)
</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:
+
 
If everything went well you see
+
'''''''''步骤4:'''安装内核包(查看“新手内核编译”如何操作一文)<br>如果你重启系统,GRUB将会给你一个启动新内核的选项。在启动新内核并登录后,核对应用程序,系统工具,系统日志。如果一切运行正常,你将会看到,USB 猫将被检测到,且cxacru已经被激活。你也会看到来在CXacru in /var/log/messages(如果你看到的一切运行正常的)的消息:
</p>
+
<pre>localhost kernel [4294759.585000] cxacru 1-1:1.0: ADSL line: training
<pre>
+
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)
</pre>
+
</pre>  
<p><b>Step 4a (optional):</b> Initially I got errors:
+
''''''
</p>
+
 
<pre>
+
'''步骤 4a(可选):'''起初我得到一些错误提示:
localhost kernel [4300944.253000] cxacru 1-1:1.0: firmware unavailable (hotplug configuration problem?)
+
<pre>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
</pre>
+
</pre>  
<p>The 1. problem was I put the firmware in a wrong location.
+
第1个问题是我把固件放在一个错误的位置。第2个问题可能需要一个更新的固件。
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.
+
'''''''''结束语:'''由于USB ADSL猫相对便宜且容易安装,以后应用会越来越多。我希望在以后的Ubuntu释放版本(我安装的是2.6.10版本)中通过默认设置就能完成USB ADSL猫安装的驱动程序数量能有所增加。或者至少安装驱动要变得容易。对一个新手来说没有因特网连接重新编译内核是很困难的事情。另一方面,放置许可固件到合适的位置要变的相对容易,而且能使用户自己在不复杂的情况下完成整个安装。
</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>
+
<br>
</p><p><br />
+
 
</p>
+
'''注释:在linux启动时,固件提供商可能认为你在登入时安装了固件的猫已经连接到网络。如果你必须支付在线时间,你不得不继续研究cxacru的详细内容,使之能够随意登入和登出。'''
<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/
+
<br>
</p>
+
 
<h5> Setting up the bridge </h5>
+
<br>
<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:
+
===== 第2部分-猫连接到Ubuntu的以太网对话中 =====
</p>
+
 
<pre>
+
荷兰用户(zonnet/versatel/tele2) 应该核对这个URL:http://www.dse.nl/~torch/usb_adsl_modem/
sudo modprobe 2684
+
 
</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.
+
 
</p><p>Remark further that more than one providers work through the same telecom-network, their datastreams are distuinguished by VPI.VCI codes. 
+
linux 的以太网对话需要把猫连接到网桥和网络。如果猫已经被连接到电话网络的服务提供商处(用ADSL分解器),那可能会采用一种叫做ATM(异步传输模式)的通讯方式。在我的情况中,驱动(见第1部分-步骤1)不得不放在一个atm子目录下。事实上在ubuntu中该子目录已经存在,且有一个好的暗示: ubuntu已经预测到atm猫的连接。
</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).
+
 
</p><p>My provider:
+
为了启动ATM猫和ubuntu之间的桥接,可以在终端输入:
</p>
+
<pre>sudo modprobe 2684
<ul><li> uses LLC encapsualtion
+
</pre>  
</li><li> VPI.VCI code is 0.0.32
+
在ATM对话中有许多“语言”可以使用,名字是“AAL type5”的,指定了AAL5 拨号(解封装协议)等等的存在,例如:LLC和VC-MUX。<br>
</li></ul>
+
 
<p>The syntax of the command is the following&nbsp;:
+
注意在同一个电话网络中有多个服务商起作用时,是通过VPI.VCI码区分各自的数据流。
</p>
+
 
<pre>
+
调制网桥的包是br2684ctl包,在Ubuntu文档中我没有找到该包,但是用debian上的br2684ctl包也能起作用(看第1部分中关于获取和安装包的步骤3b)
br2684ctl [-c n -e 0|1 -b 0|1 -s buf_size -a [itf].vpi.vci ]+
+
 
 +
我的提供商:
 +
 
 +
* 用LLC解封装 <br>
 +
* VPI.VCI 码0.0.32
 +
 
 +
命令语法如下:
 +
<pre>br2684ctl [-c n -e 0|1 -b 0|1 -s buf_size -a [itf].vpi.vci ]+
  
 
-a [itf].vpi.vci&nbsp;: ATM PVC number, VPI and VCI. Mandatory
 
-a [itf].vpi.vci&nbsp;: ATM PVC number, VPI and VCI. Mandatory
第136行: 第165行:
 
0=foreground. Default is 0
 
0=foreground. Default is 0
 
-s buf_size&nbsp;: send buffer size. Default is 8192.
 
-s buf_size&nbsp;: send buffer size. Default is 8192.
</pre>
+
</pre>  
<p>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.
+
现在一个叫做nas0的界面建立了,该界面像PC机中以太网卡的一个软件版本一样能被重绘。
</p>
+
 
<h5> Login </h5>
+
===== 登入 =====
<p>Once the bridge is working, you have to login. Again this is provider specific. I have detected three alternative procedures:
+
 
</p>
+
一旦网桥有效,你必须登入。再者,这是由服务商指定的,我已经检测到三个不同进程:
<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>
+
关于DHCP一般你没必要设置用户名和密码(我猜能通过电话号码识别你的身份)。而对两个PPP进程你不得不提供你的用户名和密码。
<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>
+
如果你用DHCP登入(没有提供给你连接密码时用这个),则采用dhclient命令(在其它linux发布版本中该命令是dhcpcd):
dhclient nas0
+
<pre>dhclient nas0
</pre>
+
</pre>  
<p>It worked for me, although I always get a few warning-messages at the end)
+
虽然我在最后得到一些警告信息,但该命令还是有效的:
</p>
+
<pre>sit0: unknown hardware address type 776
<pre>
+
sit0: unknown hardware address type 776
+
 
sit0: unknown hardware address type 776
 
sit0: unknown hardware address type 776
 
Listening on LPF/nas0/00:d0:41:10:21:dc
 
Listening on LPF/nas0/00:d0:41:10:21:dc
Sending on   LPF/nas0/00:d0:41:10:21:dc
+
Sending on LPF/nas0/00:d0:41:10:21:dc
Sending on   Socket/fallback
+
Sending on Socket/fallback
 
DHCPREQUEST on nas0 to 255.255.255.255 port 67
 
DHCPREQUEST on nas0 to 255.255.255.255 port 67
 
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.
</pre>
+
</pre>  
<p><br />
+
<br>
</p>
+
 
<h6> PPPoE and PPPoA </h6>
+
====== PPPoE PPPoA ======
<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.
+
 
</p><p><i>if PPPoA , download from http://accessrunner.sourceforge.net/debian-scripts/</i>
+
由于我的用的是DHCP,所以下面的没有经过测试,为了方便,从另一个站点拷贝了下面这些,我估计如果没有修改该操作可能不会有效。
the peers-pppoa and put it in /etc/ppp/peers, edit that file especially the user
+
 
and the VPC/VCI peers.
+
''如果是PPPoA , 从http://accessrunner.sourceforge.net/debian-scripts/下载''the peers-pppoa 并把它放在/etc/ppp/peers下,编辑那个文件,特别是用户和VPC/VCI对等实体。在 /etc/ppp/pap-secrets /etc/ppp/chap-secrets的登入栏“password”中加上你的登入密码
Add also your login password in the /etc/ppp/pap-secrets /etc/ppp/chap-secrets
+
 
in the form
+
<br>
login * password *
+
<pre>insmod /lib/modules/2.6.10-5-386/kernel/net/atm/pppoatm.ko
</p>
+
<pre>
+
insmod /lib/modules/2.6.10-5-386/kernel/net/atm/pppoatm.ko
+
 
pppd call peers-pppoa
 
pppd call peers-pppoa
</pre>
+
</pre>  
<p><i>if PPPoE</i>
+
''如果是PPPoE'' 安装 apt-get install libatm1
Install
+
 
apt-get install libatm1
+
你还需要从ubuntu处下载两个包 :
</p><p>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)
+
 
</p><p>then install them with the command dpkg -i xxxxxfilexxxxx.deb
+
atm-tools_2.4.1-16_i386.deb ( 我不知道那个是否需要)<br>
</p><p><br />
+
 
<i>download from http://accessrunner.sourceforge.net/debian-scripts/</i>
+
然后用命令dpkg -i ****file****.deb安装。
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
+
''''从http://accessrunner.sourceforge.net/debian-scripts/ the peers-pppoe 处下载the peers-pppoe,并将其放置在/etc/ppp/peers下,编辑那个文件尤其是user,同理,在/etc/ppp/pap-secrets /etc/ppp/chap-secrets的登入栏“password”中加上你的登入密码。
in the form
+
 
login * password *
+
<br>
</p><p><i>after that modify the /etc/network/interfaces and add&nbsp;:</i>
+
 
auto nas0
+
''完成后修改 /etc/network/interfaces,加上:''
iface nas0 inet static
+
 
address 192.0.2.1
+
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) ( 0.0.100 itf.vpi.vci的格式, 通过查看你的ISP信息设置 vpi/vci)
netmask 255.255.255.0
+
 
broadcast 192.0.2.255
+
<br>
0x0x gateway 192.0.2.254
+
 
pre-up br2684ctl -b -c 0 -a 0.0.100
+
''重启网络,在/lib/modules/2.6.10-5-386/kernel/net/atm/br2684.ko /etc/init.d/networking restart处获取与atm界面匹配的nas0。''<br>
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.)
+
<br>
</p><p><i>Restart the network to get the nas0 match the atm interface</i>
+
 
insmod /lib/modules/2.6.10-5-386/kernel/net/atm/br2684.ko
+
'''' <br>
/etc/init.d/networking restart
+
 
</p><p><i>And finally connect</i>
+
 
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>
+
最后通过呼叫peers-pppoe连接pppd
idea of what you need to do.
+
 
</p>
+
 
<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:
+
<br>
</p>
+
 
<pre>
+
''''
#
+
 
 +
遗憾的是这个有一点难,并且不好组织,但是对于你需要做的,它提供了一个很好的方法
 +
 
 +
 
 +
 
 +
<br>
 +
 
 +
====== 自动获取网桥和登录 ======
 +
 
 +
通过上述过程的登入是手动的,如果可能的话,该过程能自动完成。首先,我在桌面上放置一个小的可执行文本:
 +
<pre>#
 
sudo modprobe br2684
 
sudo modprobe br2684
 
sudo br2684ctl -b -c 0 -a 0.0.32
 
sudo br2684ctl -b -c 0 -a 0.0.32
 
sudo dhclient nas0
 
sudo dhclient nas0
 
sleep 5d
 
sleep 5d
</pre>
+
</pre>  
<p>If the connection is successfull the terminal window can be closed by typing Ctrl-C.
+
如果连接成功,终端窗户可以通过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:
+
''''''注释:在linux启动时,固件提供商可能认为你在登入时安装了固件的猫已经连接到网络。如果你必须支付在线时间,你不得不继续研究cxacru的详细内容,使之能够随意登入和登出。
</p><p>http://www.dse.nl/~torch/usb_adsl_modem/cxacru_auto.html
+
 
</p><p>(in Dutch)
+
实际上,命令 modprobe ..., br2684ctl .. and dhclient or ppp...能在linux启动时被运行。我还没有实验,但是你可以看看下面站点:
</p><p><br />
+
 
</p>
+
http://www.dse.nl/~torch/usb_adsl_modem/cxacru_auto.html
<hr />
+
 
<p><br />
+
(在荷兰)
</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>
+

2008年3月2日 (日) 12:27的最新版本

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

第1部分,USB猫驱动
步骤1:获得驱动

在sourceforge 项目中一组人正在为许多USB ADSL猫开发驱动。我的 USB ADSL猫(a-tech-V2 usb)集成conexant芯片,我找到了一些关于它的如下文件(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


步骤2:获取猫固件

大多数猫有一个可编程的微处理器(一台“简单的"的电脑),由于能做很多事,因此该处理器销售旺盛且非常便宜。上述驱动将会上载一个允许微处理器具备调制解调功能小程序到猫。这个小程序(叫做固件)常要求得到许可。


从步骤1下载的驱动不包含这些固件(否则它是非法的),但你可能得到一张包含许多文件的随猫CD,CD中含有该固件。如果你的猫工作在Windows下,固件就会在Windows区。因此你已经有了固件的合法复制品,唯一的问题是找到该固件。sourceforge站点给了你一些提示。我已经找到了一个叫做 cxacru-fw.c(我丢失了URL名,但是你可以通过google搜索到)的程序。在编译cxacru-fw.c(URL给你清晰指示)後,cxacru-fw会从CD上的一个叫做CnxEtU.sys文件中释放固件,或者释放Windows区,务必保证把把固件改名为cxacru- fw.bin,并把cxacru-bin放置在:


/lib/hotplug/firmware

''''注释:这是Ubuntu指定的,其它Linux释放版本用其它位置。

''''注释2:文件cxacru-fw.bin是被许可的,勿重新分配。


步骤3:重新编译linux-kernel

(不幸的是,若没有因特网连接该工作将很难进行)

步骤 3a:在ubuntuforums.org上有一篇关于“新手内核编译“如何操作的文章。在重新编译内核时,你必须完成该文中提到的所有必要步骤。该文章的目的是通过重新编译内核使显卡工作,因此有许多可选步骤可以省略。

然而,该文假设Ubuntu工作在有因特网连接的环境中。


步骤3b:这就意味着你不能安装重新编译内核所需的所有包。你需要的文件一些在http://archive.ubuntu.com/ubuntu/上

其中一个你需要的包是libncurses5-dev,一种找到该文件地址的方法如下:进入 http://ftp.se.kde.org/ftpsearch.html,搜索libncurses5-dev,现在你会在Debian FTP-文档中得到一些该位置的信息。Ubuntu文档和Debian是一样的结构,因此你可以在ubuntu文档的相同位置找到libncurses5 -dev。


通过这种方式下载的包会有一个扩展的.deb。该.deb可以通过下面命令手动安装:

dpkg -i (package.deb)

通过阅读vanila内核“新手内核编译“如何操作的编译部分,你能获得更多怎样利用这种变通方法的知识。

'

步骤3c:如果你完成步骤3“新手内核编译”如何操作(祝贺你已经到了这一步),首先退出配置菜单,查找usb_atm.c在原树中的位置。该位置很有可能在/usr/src/linux/drivers/usb/atm/usb_atm.c,在这里,重命名文件usb_atm.c,usb_atm.h, Kbuild和Kconfig(加了一些如.old的东西),复制新驱动到如下位置:



/drivers/usb/atm/cxacru.c

/drivers/usb/atm/Kbuild

/drivers/usb/atm/Kconfig

/drivers/usb/atm/usbatm.c

/drivers/usb/atm/usbatm.h

我把usbatm.c和usbatm.h重命名成usb_atm.c和usb_atm.h,但不能确认该操作是否有必要。

现在,再次输入:

sudo make menuconfig

现在,在子菜单driers-usb-atm我选择了cxacru(新驱动),而后输入m(可能*也行,我不确定)。退出配置菜单并编译内核。

''''步骤3d(可选):一切应该顺利,但在我的操作中并非如此,我得到一条错误信息:

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

我不知道如何设置CONFIG_KALLSYMS_EXTRA_PASS,因此我做了一件错误的事,按名编辑Makefile,查找 CONFIG_KALLSYMS_EXTRA_PASS在Makefile中的位置,且核对其参数,然后改变IF声明使它在 CONFIG_KALLSYMS_EXTRA_PASS为真时执行。这种方法是有用的(我希望有人编辑过这个,且能解释怎样漂亮地完成编辑)

''''步骤3e(可选):在安装过程中我再一次得到错误信息:

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

在这里,我也可能做了一件错误的事情,加了一些如下的东西到debian/control

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

因为有两个包,我不得不这样做,(我希望有人编辑过这个,且能解释怎样漂亮地完成编辑)

''''步骤3f:最终你会有新的内核包。如果你不能完成上述过程,通过[email protected]给我发信息,我会用email传给你两个包文件(25MB)

''''步骤4:安装内核包(查看“新手内核编译”如何操作一文)
如果你重启系统,GRUB将会给你一个启动新内核的选项。在启动新内核并登录后,核对应用程序,系统工具,系统日志。如果一切运行正常,你将会看到,USB 猫将被检测到,且cxacru已经被激活。你也会看到来在CXacru in /var/log/messages(如果你看到的一切运行正常的)的消息:

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)

'

步骤 4a(可选):起初我得到一些错误提示:

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

第1个问题是我把固件放在一个错误的位置。第2个问题可能需要一个更新的固件。

''''结束语:由于USB ADSL猫相对便宜且容易安装,以后应用会越来越多。我希望在以后的Ubuntu释放版本(我安装的是2.6.10版本)中通过默认设置就能完成USB ADSL猫安装的驱动程序数量能有所增加。或者至少安装驱动要变得容易。对一个新手来说没有因特网连接重新编译内核是很困难的事情。另一方面,放置许可固件到合适的位置要变的相对容易,而且能使用户自己在不复杂的情况下完成整个安装。


注释:在linux启动时,固件提供商可能认为你在登入时安装了固件的猫已经连接到网络。如果你必须支付在线时间,你不得不继续研究cxacru的详细内容,使之能够随意登入和登出。



第2部分-猫连接到Ubuntu的以太网对话中

荷兰用户(zonnet/versatel/tele2) 应该核对这个URL:http://www.dse.nl/~torch/usb_adsl_modem/

设置网桥

linux 的以太网对话需要把猫连接到网桥和网络。如果猫已经被连接到电话网络的服务提供商处(用ADSL分解器),那可能会采用一种叫做ATM(异步传输模式)的通讯方式。在我的情况中,驱动(见第1部分-步骤1)不得不放在一个atm子目录下。事实上在ubuntu中该子目录已经存在,且有一个好的暗示: ubuntu已经预测到atm猫的连接。

为了启动ATM猫和ubuntu之间的桥接,可以在终端输入:

sudo modprobe 2684

在ATM对话中有许多“语言”可以使用,名字是“AAL type5”的,指定了AAL5 拨号(解封装协议)等等的存在,例如:LLC和VC-MUX。

注意在同一个电话网络中有多个服务商起作用时,是通过VPI.VCI码区分各自的数据流。

调制网桥的包是br2684ctl包,在Ubuntu文档中我没有找到该包,但是用debian上的br2684ctl包也能起作用(看第1部分中关于获取和安装包的步骤3b)

我的提供商:

  • 用LLC解封装
  • VPI.VCI 码0.0.32

命令语法如下:

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.

我的界面: br2684ctl -b -e 0 -c 0 -a 0.0.32创建

现在一个叫做nas0的界面建立了,该界面像PC机中以太网卡的一个软件版本一样能被重绘。

登入

一旦网桥有效,你必须登入。再者,这是由服务商指定的,我已经检测到三个不同进程:

  • DHCP
  • PPPoA
  • PPPoE

关于DHCP一般你没必要设置用户名和密码(我猜能通过电话号码识别你的身份)。而对两个PPP进程你不得不提供你的用户名和密码。

DHCP

如果你用DHCP登入(没有提供给你连接密码时用这个),则采用dhclient命令(在其它linux发布版本中该命令是dhcpcd):

dhclient nas0

虽然我在最后得到一些警告信息,但该命令还是有效的:

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 和 PPPoA

由于我的用的是DHCP,所以下面的没有经过测试,为了方便,从另一个站点拷贝了下面这些,我估计如果没有修改该操作可能不会有效。

如果是PPPoA , 从http://accessrunner.sourceforge.net/debian-scripts/下载the peers-pppoa 并把它放在/etc/ppp/peers下,编辑那个文件,特别是用户和VPC/VCI对等实体。在 /etc/ppp/pap-secrets /etc/ppp/chap-secrets的登入栏“password”中加上你的登入密码


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

如果是PPPoE 安装 apt-get install libatm1

你还需要从ubuntu处下载两个包 :

br2684ctl_20040226-1_i386.deb

atm-tools_2.4.1-16_i386.deb ( 我不知道那个是否需要)

然后用命令dpkg -i ****file****.deb安装。

'从http://accessrunner.sourceforge.net/debian-scripts/ the peers-pppoe 处下载the peers-pppoe,并将其放置在/etc/ppp/peers下,编辑那个文件尤其是user,同理,在/etc/ppp/pap-secrets /etc/ppp/chap-secrets的登入栏“password”中加上你的登入密码。


完成后修改 /etc/network/interfaces,加上:

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) ( 0.0.100 itf.vpi.vci的格式, 通过查看你的ISP信息设置 vpi/vci)


重启网络,在/lib/modules/2.6.10-5-386/kernel/net/atm/br2684.ko /etc/init.d/networking restart处获取与atm界面匹配的nas0。


'


最后通过呼叫peers-pppoe连接pppd



'

遗憾的是这个有一点难,并且不好组织,但是对于你需要做的,它提供了一个很好的方法



自动获取网桥和登录

通过上述过程的登入是手动的,如果可能的话,该过程能自动完成。首先,我在桌面上放置一个小的可执行文本:

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

如果连接成功,终端窗户可以通过Ctrl-C关闭。

'注释:在linux启动时,固件提供商可能认为你在登入时安装了固件的猫已经连接到网络。如果你必须支付在线时间,你不得不继续研究cxacru的详细内容,使之能够随意登入和登出。

实际上,命令 modprobe ..., br2684ctl .. and dhclient or ppp...能在linux启动时被运行。我还没有实验,但是你可以看看下面站点:

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

(在荷兰)