邪恶八进制信息安全团队技术讨论组's Archiver

pub!1c 2006-3-14 12:18

[转载]如何在Linux下驱动Conexant USB ADSL

<P>信息来源:邪恶八进制信息安全团队</P>
<P style="TEXT-INDENT: 2em">Conexant USB ADSL how to <BR><BR>  这份文档是关于Conexant USB ADSL怎样在Linux(Kernel2.6.x)下驱动的 <BR><BR>  1.准备工作 <BR><BR>  现在确认你有一支Conexant USB ADSL的Modem和以下文件,(如果您没有备齐这些东西,下面的工作将无法进行) <BR><BR></SPAN>
<TABLE cellSpacing=1 cellPadding=3 width="90%" align=center border=0>
<TBODY>
<TR>
<TD><SPAN class=genmed><B>引用:</B></SPAN></TD></TR>
<TR>
<TD class=quote>cxacru.tar.bz2 rp-pppoe-3.5.tar.gz Kernel-2.6.x patch-2.6.X_date_accessrunner.gz</TD></TR></TBODY></TABLE>
<P><SPAN class=postbody>  说明: <BR><BR>  其中cxacru.tar.bz2(要在此处下载我已经打好补丁的文件)是USB ADSL的驱动程序文件源代码包 <BR><BR>  rp-pppoe-3.5.tar.gz(或更高版本)是pppoe的拨号程序源代码包 <BR><BR>  Kernel-2.6.x是Kernel的源代码包 <BR><BR>  patch-2.6.X_date_accessrunner.gz是内核的补丁文件 <BR><BR>  确定备齐以上文件后就可以进行下面的工作了 <BR><BR>  2.开始安装 <BR><BR>  首先将设备联结好 <BR><BR>  2.1给内核打补丁并编译内核 <BR><BR>  解压内核包把patch-2.6.X_date_accessrunner.gz拷贝到内核目录的上级目录 <BR><BR>  执行</SPAN> </P>
<P>
<TABLE cellSpacing=1 cellPadding=3 width="90%" align=center border=0>
<TBODY>
<TR>
<TD><SPAN class=genmed><B>代码:</B></SPAN></TD></TR>
<TR>
<TD class=code>
<CENTER><CCID_NOBR>
<TABLE cellSpacing=0 borderColorDark=#ffffff cellPadding=2 width=400 align=center borderColorLight=black border=1>
<TBODY>
<TR>
<TD class=code style="FONT-SIZE: 9pt" bgColor=#e6e6e6><PRE>gunzip -c patch-2.6.x_YYYYMMDD_accessrunner.gz | patch -p1</PRE></TD></TR></TBODY></TABLE></CCID_NOBR></CENTER></TD></TR></TBODY></TABLE></P>
<P style="TEXT-INDENT: 2em">如果你的Kernel已经有如下支持(可以在Kernel的.config文件中查找到)就不必重新编译 <BR></SPAN>
<TABLE cellSpacing=1 cellPadding=3 width="90%" align=center border=0>
<TBODY>
<TR>
<TD><SPAN class=genmed><B>代码:</B></SPAN></TD></TR>
<TR>
<TD class=code>
<P><BR>
<CENTER><CCID_NOBR>
<TABLE cellSpacing=0 borderColorDark=#ffffff cellPadding=2 width=400 align=center borderColorLight=black border=1>
<TBODY>
<TR>
<TD class=code style="FONT-SIZE: 9pt" bgColor=#e6e6e6><PRE>Code maturity level options <P></P><P>[*] Prompt for development and/or incomplete code/drivers </P><P>Loadable module support </P><P>[*] Enable loadable module support </P><P>[*] Set version information on all module symbols </P><P>[*] Kernel module loader </P><P>Networking options </P><P><*> Packet socket </P><P><*> Unix domain sockets </P><P>[*] TCP/IP networking </P><P>[*] Asynchronous Transfer Mode (ATM) </P><P>USB support </P><P><*> Support for USB </P><P>[*] Preliminary USB device filesystem </P><P>UHCI </P><P>OHCI </P><P>Alcatel Speedtouch USB support (USB_SPEEDTOUCH) <BR> <BR>Networking options </P><P>[*] Asynchronous Transfer Mode (ATM) </P><P>[*] Classical IP over ATM </P><P><BR>Networking options </P><P>[M] RFC1483/2684 Bridged protocols </P><P>Network Device Support </P><P>PPP (point-to-point protocol) support </P><P>PPP Deflate compression </P><P>PPP over Ethernet (EXPERIMENTAL) </P><P><BR>Network Device Support </P><P>PPP (point-to-point protocol) support </P><P>PPP Deflate compression </P><P>PPP over ATM </P><P> Processor type and features </P><P>[ ] Symmetric multi-processing support </P><P>Cryptographic API (CRYPTO) </P><P>CRC32c CRC algorithm (CRYPTO_CRC32C) </P><P>Library routines </P><P>CRC32c (Castagnoli, et al) Cyclic Redundancy-Check (LIBCRC32C) </P></PRE></TD></TR></TBODY></TABLE></CCID_NOBR></CENTER>
<P></P></TD></TR></TBODY></TABLE><SPAN class=postbody><BR>  设置好后 make 、make modules 、make modules_install、make install、reboot <BR><BR>  2.2编译驱动和拨号程序 <BR><BR>  解压cxacru.tar.bz2,ln /内核源代码目录 /usr/linux -s <BR><BR>  然后在源代码目录中make, <BR><BR>  解压rp-pppoe-3.5.tar.gz,在其目录中执行./go 如果你用X 就可以用./go-gui <BR><BR>  设置好你的拨号程序,要注意的是在填写设备的时候要填写nas0 <BR><BR>  nas0是驱动程序虚拟出来的USB Modem </SPAN></P><SPAN class=postbody>
<P style="TEXT-INDENT: 2em">2.3设置协议 <BR><BR>  编辑/etc/cxacru文件,像这个样子: <BR></SPAN>
<TABLE cellSpacing=1 cellPadding=3 width="90%" align=center border=0>
<TBODY>
<TR>
<TD><SPAN class=genmed><B>代码:</B></SPAN></TD></TR>
<TR>
<TD class=code>
<P><BR>
<CENTER><CCID_NOBR>
<TABLE cellSpacing=0 borderColorDark=#ffffff cellPadding=2 width=400 align=center borderColorLight=black border=1>
<TBODY>
<TR>
<TD class=code style="FONT-SIZE: 9pt" bgColor=#e6e6e6><PRE># <BR># Config file for Conexant AccessRunner <BR># <P></P><P># Driver mode <BR>DRIVER_MODE=1 # 1 = normal, 2 = debug, 3 = normal+max speed (without ask adsl status),
4 = debug+max speed (without ask adsl status) </P><P># Protocol <BR>PROTOCOL_MODE=4 # 1 = RFC1483/2684 routed, 2 = PPP over ATM (pppoa), 3 = RFC1483/2684 bridged,
4 = PPP over Ethernet (pppoe) </P><P># Paths <BR>BINARY_PATH="/usr/sbin" <BR>ATM_PATH="" </P><P># ADSL <BR># if OPEN_MODE is blank then cxload uses default mode acoording VID & PID <BR># Values for OPEN_MODE are: <BR># 0 = auto selection, G.Handshake <BR># 1 = auto selection, T1.413 <BR># 2 = G.Handshake <BR># 3 = ANSI T1.413 <BR># 4 = ITU-T G.992.1 (G.DMT) <BR># 5 = ITU-T G.992.2 (G.LITE) <BR>OPEN_MODE=4 </P><P># ATM <BR>VPI=0 <BR>VCI=33 </P><P># Specific for RFC1483/2684 routed/bridged <BR># if IP_ADDRESS is blank in bridged mode then it uses DHCP to get IP <BR>IP_ADDRESS= <BR>NETMASK=255.255.255.255 <BR>GATEWAY= </P></PRE></TD></TR></TBODY></TABLE></CCID_NOBR></CENTER>
<P></P></TD></TR></TBODY></TABLE><SPAN class=postbody>
<P><BR>  需要更改的是# Protocol # ADSL # ATM </P>
<P>  如果你用的是RFC1483/2684协议还要设置# Specific for RFC1483/2684 routed/bridged <BR><BR>  PPPOE和PPPOA的用户只要修改# Protocol # ADSL # ATM 这3项就可以了 <BR><BR>  3.拨号 <BR><BR>  在终端下输入cxstart.sh建立连接 cxstop.sh断掉连接 <BR><BR>  用ifconfig检查一下你是否已经连上了,像这个样子: <BR></SPAN>
<TABLE cellSpacing=1 cellPadding=3 width="90%" align=center border=0>
<TBODY>
<TR>
<TD><SPAN class=genmed><B>代码:</B></SPAN></TD></TR>
<TR>
<TD class=code>
<P><BR>
<CENTER><CCID_NOBR>
<TABLE cellSpacing=0 borderColorDark=#ffffff cellPadding=2 width=400 align=center borderColorLight=black border=1>
<TBODY>
<TR>
<TD class=code style="FONT-SIZE: 9pt" bgColor=#e6e6e6><PRE>[root@Love root]# ifconfig <BR>lo Link encap:Local Loopback <BR> inet addr:127.0.0.1 Mask:255.0.0.0 <BR> inet6 addr: ::1/128 Scope:Host <BR> UP LOOPBACK RUNNING MTU:16436 Metric:1 <BR> RX packets:0 errors:0 dropped:0 overruns:0 frame:0 <BR> TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 <BR> collisions:0 txqueuelen:0 <BR> RX bytes:0 (0.0 b) TX bytes:0 (0.0 b) <P></P><P>nas0 Link encap:Ethernet HWaddr 00:00:01:00:00:00 <BR> inet6 addr: fe80::200:1ff:fe00:0/64 Scope:Link <BR> UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 <BR> RX packets:17650 errors:0 dropped:0 overruns:0 frame:0 <BR> TX packets:15790 errors:0 dropped:0 overruns:0 carrier:0 <BR> collisions:0 txqueuelen:1000 <BR> RX bytes:15856545 (15.1 Mb) TX bytes:2128934 (2.0 Mb) </P><P>ppp0 Link encap:Point-to-Point Protocol <BR> inet addr:221.214.196.80 P-t-P:221.0.64.38 Mask:255.255.255.255 <BR> UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1492 Metric:1 <BR> RX packets:16454 errors:0 dropped:0 overruns:0 frame:0 <BR> TX packets:14588 errors:0 dropped:0 overruns:0 carrier:0 <BR> collisions:0 txqueuelen:3 <BR> RX bytes:15674609 (14.9 Mb) TX bytes:1613794 (1.5 Mb) </P><P>[root@Love root]# </P></PRE></TD></TR></TBODY></TABLE></CCID_NOBR></CENTER>
<P></P></TD></TR></TBODY></TABLE><SPAN class=postbody><BR>如果有nas0和ppp0那么恭喜你你已经成功了! </SPAN></SPAN></P></SPAN>

页: [1]
© 1999-2008 EvilOctal Security Team