How to drive usb adsl in linux (kernel 2.6.x)

Source: Internet
Author: User
Article Title: how to drive usb adsl in linux (kernel 2.6.x. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.
   1. Preparations
Now make sure you have a Conexant usb adsl Modem and the following files (if you have not prepared these items, the following work will not work)
  
Reference:
Cxacru.tar.bz2 rp-pppoe-3.5.tar.gz Kernel-2.6.x patch-2.6.X_date_accessrunner.gz
  
Note:
  
Among them, cxacru.tar.bz2 (to download the file I have already installed the patch here) is the source code package of the USB ADSL driver file.
  
The rp-pppoe-3.5.tar.gz (or later) is the pppoe dialer source code package
  
Kernel-2.6.x is the source code package of Kernel
  
Patch-2.6.X_date_accessrunner.gz is the kernel patch file
  
After you have prepared the above files, you can perform the following work:
  
   2. Start Installation
Connect the device
  
2.1 patch the kernel and compile the kernel
  
Decompress the package and copy patch-2.6.x_date_accessrunner.gz to the parent directory of the kernel directory.
  
Run the Code:
Gunzip-c patch-2.6.x_YYYYMMDD_accessrunner.gz | patch-p1
  
If your Kernel already has the following support (you can find it in the. config file of the Kernel), you do not have to re-compile it.
Code:
  
Code maturity level options
  
[*] Prompt for development and/or incomplete code/drivers
  
Loadable module support
  
[*] Enable loadable module support
  
[*] Set version information on all module symbols
  
[*] Kernel module loader
  
Networking options
  
<*> Packet socket
  
<*> Unix domain sockets
  
[*] TCP/IP networking
  
[*] Asynchronous Transfer Mode (ATM)
  
USB support
  
<*> Support for USB
  
[*] Preliminary USB device filesystem
  
UHCI
  
OHCI
  
Alcatel Speedtouch USB support (USB_SPEEDTOUCH)
    
Networking options
  
[*] Asynchronous Transfer Mode (ATM)
  
[*] Classical IP over ATM
  
  
Networking options
  
[M] RFC1483/2684 Bridged protocols
  
Network Device Support
  
PPP (point-to-point protocol) support
  
PPP Deflate compression
  
PPP over Ethernet (EXPERIMENTAL)
  
Network Device Support
  
PPP (point-to-point protocol) support
  
PPP Deflate compression
  
PPP over ATM
  
Processor type and features
  
[] Hierarchical Ric multi-processing support
  
Cryptographic API (CRYPTO)
  
CRC32c CRC algorithm (CRYPTO_CRC32C)
  
Library routines
  
CRC32c (Castagnoli, et al) Cyclic Redundancy-Check (LIBCRC32C)
  
After configuration, make, make modules, make modules_install, make install, and reboot
  
2.2 compile drivers and Dialers
  
Decompress cxacru.tar.bz2, ln/kernel source code directory/usr/linux-s
  
Then make in the source code directory,
  
Decompress pppoe-3.5.tar.gz and execute./go in its directory. If you use X, you can use./go-gui.
  
Set your dialing program. Note that you must enter nas0 when entering the device.
  
Nas0 is a USB Modem virtualized by the driver.
  
2.3 SET protocol
  
Edit the/etc/cxacru file, as shown in the following figure:
Code:
  
#
# Config file for Conexant AccessRunner
#
  
# Driver mode
DRIVER_MODE = 1 #1 = normal, 2 = debug, 3 = normal + max speed (without ask adsl status), 4 = debug + max speed (without ask adsl status)
  
# Protocol
PROTOCOL_MODE = 4 #1 = RFC1483/2684 routed, 2 = PPP over ATM (pppoa), 3 = RFC1483/2684 bridged, 4 = PPP over Ethernet (pppoe)
  
# Paths
BINARY_PATH = "/usr/sbin"
ATM_PATH = ""
  
# ADSL
# If OPEN_MODE is blank then cxload uses default mode acording VID & PID
# Values for OPEN_MODE are:
#0 = auto selection, G. Handshake
#1 = auto selection, T1.413
#2 = G. Handshake
#3 = ANSI T1.413
#4 = ITU-T G.992.1 (G. DMT)
#5 = ITU-T G.992.2 (G. LITE)
OPEN_MODE = 4
  
# ATM
VPI = 0
VCI = 33
  
# Specific for RFC1483/2684 routed/bridged
# If IP_ADDRESS is blank in bridged mode then it uses DHCP to get IP
IP_ADDRESS =
NETMASK = 255.255.255.255.255
GATEWAY =
  
What needs to be changed is # Protocol # ADSL # ATM
  
If you are using the RFC1483/2684 protocol, you need to set # Specific for RFC1483/2684 routed/bridged
  
PPPOE and PPPOA users only need to modify the three items # Protocol # ADSL # ATM.
  
   3. Dialing
Enter cxstart. sh in the terminal to establish a connection. cxstop. sh to disconnect the connection.
  
Use ifconfig to check whether you are connected, as shown in the following figure:
Code:
  
[Root @ Love root] # 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: 0 errors: 0 dropped: 0 overruns: 0 frame: 0
TX packets: 0 errors: 0 dropped: 0 overruns: 0 carrier: 0
Collisions: 0 txqueuelen: 0
RX bytes: 0 (0.0 B) TX bytes: 0 (0.0 B)
  
Nas0 Link encap: Ethernet HWaddr 00: 00: 01: 00: 00: 00
Inet6 addr: fe80: 200: 1ff: fe00: 0/64 Scope: Link
Up broadcast running multicast mtu: 1500 Metric: 1
RX packets: 17650 errors: 0 dropped: 0 overruns: 0 frame: 0
TX packets: 15790 errors: 0 dropped: 0 overruns: 0 carrier: 0
Collisions: 0 FIG: 1000
RX bytes: 15856545 (15.1 Mb) TX bytes: 2128934 (2.0 Mb)
  
Ppp0 Link encap: Point-to-Point Protocol
Inet addr: 221.214.196.80 P-t-P: 221.0.64.38 Mask: 255.255.255.255
Up pointopoint running noarp multicast mtu: 1492 Metric: 1
RX packets: 16454 errors: 0 dropped: 0 overruns: 0 frame: 0
TX packets: 14588 errors: 0 dropped: 0 overruns: 0 carrier: 0
Collisions: 0 txqueuelen: 3
RX bytes: 15674609 (14.9 Mb) TX bytes: 1613794 (1.5 Mb)
  
[Root @ Love root] #

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.