免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 2856 | 回复: 0

Conexant AccessRunner ADSL USB modems with Linux 上网之路 [复制链接]

论坛徽章:
0
发表于 2006-10-15 16:39 |显示全部楼层
关于本文

作者: liuzwei

Email:liuzwei@163.com

AT: 青岛(QingDao)

时间: 2006-10-14

题目: Conexant AccessRunner ADSL USB modems with Linux 上网之路

无限制转发及引用,请保留原始作者信息.

感谢:
杨帆(Steven Yang),他的文章《Conexant ADSL USB 三步走猫》给了好多启发
YZard,他的文章《在ubuntu 6.06 LTS Dapper 下驱动 实达5800UB USB ADSL modem》是主要参考(原帖http://www3.eastgame.net/read.php?tid=1012261
以及其他提供帮助的网友

说明:
我用的usb adsl是大亚db101,芯片是Conexant的。
a、我用的fc5.0是64位的,因为对linux不熟悉,采用定制安装,但开发工具基本上采用了默认值。
b、cxacru-fw.bin和br2684ctl这两个文件我放到附件里了,因为是在64位环境下生成的,不保证在32位环境下能用。
c、在这之前我想编译内核,但是总是不成功,所以就没有考虑编译内核了。
d、我所有的工作都是在root用户下进行的。
e、还要把网卡停用。
f、cxacru-fw.bin和br2684ctl我以前就做好了,我只是拷贝到相应目录下了,步骤中我也给出了如何操作;


下面是详细的步骤,我是一边设置一边写文章的:
1、首先安装如下的软件包
usbutils-0.71-2.x86_64.rpm ---可以用lsusb命令查看usb adsl的信息
linux-atm-libs-2.5.0-0.20050118.3.2.x86_64.rpm ---编译生成文件br2684ctl必须
linux-atm-libs-devel-2.5.0-0.20050118.3.2.x86_64.rpm ---编译生成文件br2684ctl必须,安装完上面的后安装

2、准备要用的文件
brctl-010226.c
cxacru.zip
(上面两个在我提供的附件里有)
rp-pppoe-3.8.tar.gz
CnxEtU.sys
3、看看fc5.0的内核
[root@linux winfat]# uname -a
Linux linux 2.6.15-1.2054_FC5 #1 SMP Tue Mar 14 15:48:20 EST 2006 x86_64 x86_64 x86_64 GNU/Linux

4、用lsusb命令查看usb adsl连接情况
[root@linux winfat]# lsusb
Bus 005 Device 001: ID 0000:0000
Bus 004 Device 001: ID 0000:0000
Bus 003 Device 001: ID 0000:0000
Bus 002 Device 002: ID 0572:cb00 Conexant Systems (Rockwell), Inc. E-Tech ADSL Modem v2
Bus 002 Device 001: ID 0000:0000
Bus 001 Device 001: ID 0000:0000
5、模块加载的情况
[root@linux winfat]# lsmod
Module Size Used by
vfat 47041 1

-----delete lines------

usbatm 53185 1 cxacru
atm 109697 1 usbatm

-----delete lines------
看看有没有这两行,没有的话,就要自己编译内核,参考其他的文章。
6、生成cxacru-fw.bin文件
这个需要自己找到自己对应的CnxEtU.sys文件,此文件从windows版驱动而来,如果你安装好windows驱动,请在windows下,按"开始"->"搜索"来查找此文件

下面需要一个叫cxacru-fw的程序,来剥离出firmware,把下载到的cxacru-fw和CnxEtU.sys放在一起:





[root@linux winfat]# chmod +x cxacru-fw

[root@linux winfat]# ./cxacru-fw cnxetu.sys cxacru-fw.bin





output出来的cxacru-fw.bin文件就是firmware文件.

把这个文件拷贝到/lib/firmware





[root@linux winfat]# cp cxacru-fw.bin /lib/firmware





一般过几分钟会自动加载,或者开机后也会自动加载(我的是重新开机后加载的,开机时我观察了adsl的情况,link灯闪烁,进入系统后,link灯长亮)

7、生成br2684ctl文件
[root@linux winfat]# gcc -o br2684ctl brctl-010226.c -latm

我把br2684ctl拷贝到/sbin下面了

8、运行br2684ctl
[root@linux /]# br2684ctl -b -c 0 -a 0.33
RFC1483/2684 bridge: Interface "nas0" created sucessfully
RFC1483/2684 bridge: Communicating over ATM 0.0.33, encapsulation: LLC
RFC1483/2684 bridge: Interface configured

0和33 分别是vpi和vci值,这个和当地的isp的设置有关,这个在windows下都要设置的

如果实在不知道的话,打电话问问isp,或者你能在windows下正常上网,看看驱动程序里面的具体设置,

好,现在桥搭好了,执行ifconfig,你会发现新多出来的一个nas0的虚拟网卡,这时候启动网卡

9、pppoe的设置
将rp-pppoe-3.8.tar.gz拷贝到/usr下解压
[root@linux usr]# tar -xvf rp-pppoe-3.8.tar.gz
继续
[root@linux usr]# cd rp-pppoe-3.8
[root@linux rp-pppoe-3.8]# ./go
运行后会自动进入adsl的设置,或者自己运行
[root@linux rp-pppoe-3.8]# pppoe-setup
Welcome to the Roaring Penguin PPPoE client setup. First, I will run
some checks on your system to make sure the PPPoE client is installed
properly...

Looks good! Now, please enter some information:

USER NAME

>>> Enter your PPPoE user name (default bxxxnxnx@sympatico.ca):(输入你的adsl用户名)
INTERFACE

>>> Enter the Ethernet interface connected to the DSL modem
For Solaris, this is likely to be something like /dev/hme0.
For Linux, it will be ethn, where 'n' is a number.
(default eth0): nas0(就是nas0,不要用别的)

Do you want the link to come up on demand, or stay up continuously?
If you want it to come up on demand, enter the idle time in seconds
after which the link should be dropped. If you want the link to
stay up permanently, enter 'no' (two letters, lower-case.)
NOTE: Demand-activated links do not interact well with dynamic IP
addresses. You may have some problems with demand-activated links.
>>> Enter the demand value (default no):(默认就可以)

DNS

Please enter the IP address of your ISP's primary DNS server.
If your ISP claims that 'the server will provide DNS addresses',
enter 'server' (all lower-case) here.
If you just press enter, I will assume you know what you are
doing and not modify your DNS setup.
>>> Enter the DNS information here: (根据自己的情况设置)
Please enter the IP address of your ISP's secondary DNS server.
If you just press enter, I will assume there is only one DNS server.
>>> Enter the secondary DNS server address here: (根据自己的情况设置)

PASSWORD

>>> Please enter your PPPoE password:(密码)
>>> Please re-enter your PPPoE password:(确认密码)

FIREWALLING

Please choose the firewall rules to use. Note that these rules are
very basic. You are strongly encouraged to use a more sophisticated
firewall setup; however, these will provide basic security. If you
are running any servers on your machine, you must choose 'NONE' and
set up firewalling yourself. Otherwise, the firewall rules will deny
access to all standard servers like Web, e-mail, ftp, etc. If you
are using SSH, the rules will block outgoing SSH connections which
allocate a privileged source port.

The firewall choices are:
0 - NONE: This script will not set any firewall rules. You are responsible
for ensuring the security of your machine. You are STRONGLY
recommended to use some kind of firewall rules.
1 - STANDALONE: Appropriate for a basic stand-alone web-surfing workstation
2 - MASQUERADE: Appropriate for a machine acting as an Internet gateway
for a LAN
>>> Choose a type of firewall (0-2): 1(自己家用,选1吧)

** Summary of what you entered **

Ethernet Interface: nas0
User name: (自己的adsl用户)
Activate-on-demand: No
Primary DNS: (自己的设置)
Secondary DNS: (自己的设置)
Firewalling: STANDALONE

>>> Accept these settings and adjust configuration files (y/n)? y(不保存怎么能行,当然是“y”)
Adjusting /etc/ppp/pppoe.conf
Adjusting /etc/resolv.conf
(But first backing it up to /etc/resolv.conf-bak)
Adjusting /etc/ppp/pap-secrets and /etc/ppp/chap-secrets
(But first backing it up to /etc/ppp/pap-secrets-bak)
(But first backing it up to /etc/ppp/chap-secrets-bak)



Congratulations, it should be all set up!

Type 'pppoe-start' to bring up your PPPoE link and 'pppoe-stop' to bring
it down. Type 'pppoe-status' to see the link status.


[root@linux rp-pppoe-3.8]# pppoe-start
. Connected!
这说明连接成功
看看连接的情况
[root@linux rp-pppoe-3.8]# ifconfig
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:2281 errors:0 dropped:0 overruns:0 frame:0
TX packets:2281 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:2415979 (2.3 MiB) TX bytes:2415979 (2.3 MiB)

nas0 Link encap:Ethernet HWaddr 00:08:5C:61:75:1A
inet6 addr: fe80::208:5cff:fe61:751a/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:576 errors:0 dropped:0 overruns:0 frame:0
TX packets:594 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:350866 (342.6 KiB) TX bytes:78820 (76.9 KiB)

ppp0 Link encapoint-to-Point Protocol
inet addr:124.129.83.213 P-t-P:221.0.255.157 Mask:255.255.255.255
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1492 Metric:1
RX packets:430 errors:0 dropped:0 overruns:0 frame:0
TX packets:442 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:3
RX bytes:344960 (336.8 KiB) TX bytes:58169 (56.8 KiB)

[root@linux rp-pppoe-3.8]# pppoe-status
pppoe-status: Link is up and running on interface ppp0
ppp0 Link encapoint-to-Point Protocol
inet addr:124.129.83.213 P-t-P:221.0.255.157 Mask:255.255.255.255
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1492 Metric:1
RX packets:430 errors:0 dropped:0 overruns:0 frame:0
TX packets:442 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:3
RX bytes:344960 (336.8 KiB) TX bytes:58169 (56.8 KiB)

OK!打开浏览器,上网去喽!!!

adsl.tar.bz2

15.34 KB, 下载次数: 139

相关源码

cxacru-fw.rar

189.06 KB, 下载次数: 157

cxacru-fw

您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP