Fix wireless Internet access for CDMA 1X in Linux

Source: Internet
Author: User
To solve the problem, connect to the Internet via wireless connection in Linux-general Linux technology-Linux technology and application information. For more information, see the following. Due to work needs, we have recently configured a CDMA wireless network adapter for this project, so the network is everywhere.

I am using a wireless network card of China Unicom CDMA 1X World Wind USB interface, which is very small and a little wider than a general USB flash drive. This network card is estimated to be dedicated OEM by China Unicom, it uses the CP2101/CP2102 chip produced by Silicon Labs in the United States. The driver in Linux is very simple.

CP2102 Introduction: the function of this chip is to convert data between USB and UART formats. CP2102 is a new single-chip solution for UART to USB. The chip integrates a full-speed function controller, EEPROM, buffer, and modem that complies with the USB2.0 Standard

For kernel 2.6.18, the configuration is as follows:

1. USB support is definitely required

Device Drivers-> USB Support->

Support for Host-side USB
*] USB device filesystem
Ehci hcd (USB 2.0) support
Ohci hcd support
Uhci hcd (most Intel and VIA) support
USB Modem (cdc acm) support

USB Serial Converter support --->
USB Serial Converter support
*] USB Generic Serial Driver
USB CP2101 UART Bridge Controller
USB driver for GSM and CDMA modems

If you use wireless NICs of other chips, select them here

2. PPP Module

Device Drivers-> Network device support -->

PPP (point-to-point protocol) support
*] PPP multilink support (EXPERIMENTAL)
*] PPP filtering
PPP support for async serial ports
PPP support for sync tty ports
PPP Deflate compression
Ppp bsd-Compress compression
Ppp mppe compression (encryption) (EXPERIMENTAL)
PPP over Ethernet (EXPERIMENTAL)

If the kernel already contains the appeal driver, you can see the hardware information of the corresponding Nic through dmesg after the USB Nic is inserted.

Hub 2-. 0: state 7 ports 2 chg 0000 evt 0006
Uhci_hcd 0000: 00: 1d. 1: port 1 portsc 0c80, 00
Hub 2-0:1. 0: over-current change on port 1
Hub 2-. 0: trying to enable port power on non-switchable hub
Uhci_hcd 0000: 00: 1d. 1: port 2 portsc 0893,00
Hub 2-0:1. 0: over-current change on port 2
Hub 2-. 0: trying to enable port power on non-switchable hub
Hub 2-. 0: port 2, status 0101, change 0009, 12 Mb/s
Hub 2-. 0: debounce: port 2: total 100 ms stable 100 ms status 0x101
Usb 2-2: new full speed USB device using uhci_hcd and address 5
Usb 2-2: default language 0x0409
Usb 2-2: new device strings: Mfr = 1, Product = 2, SerialNumber = 3
Usb 2-2: Product: CP2102 USB to UART Bridge Controller
Usb 2-2: Manufacturer: Silicon Labs
Usb 2-2: SerialNumber: 0001
Usb 2-2: uevent
Usb 2-2: configuration #1 chosen from 1 choice
Usb 2-2: adding 2-2:1. 0 (config #1, interface 0)
Usb 2-2:1. 0: uevent
Usbserial_generic 2-2:1. 0: usb_probe_interface
Usbserial_generic 2-2:1. 0: usb_probe_interface-got id
Cp2101 2-2:1. 0: usb_probe_interface
Cp2101 2-2:1. 0: usb_probe_interface-got id
Cp2101 2-2:1. 0: cp2101 converter detected
Usb 2-2: reset full speed USB device using uhci_hcd and address 5
Usb 2-2: cp2101 converter now attached to ttyUSB0
Drivers/usb/core/inode. c: creating file '005'
Hub 2-. 0: state 7 ports 2 chg 0000 evt 0004

Then install the dialing program (ppp, wvdial)

Create the dialing configuration file/etc/wvdial. conf

[Modem0]
Modem =/dev/ttyUSB0
Baud = 230400
SetVolume = 0
Dial Command = ATDT
Init1 = ATZ
FlowControl = Hardware (CRTSCTS)

[Dialer cdma]
Username = CARD
Password = CARD
Phone = #777
Stupid Mode = 1
Inherits = Modem0

This configuration file should be commonly used by China Unicom. the dial-up user name and password are fixed, and its billing is based on the mobile phone number corresponding to the SIM card inserted in the USB Nic.

Note: The value following the above Baud (transmission rate) is very important. If the setting is incorrect, the dial will fail and the following error will be prompted:

--> Initializing modem.
--> Sending: ATZ
--> Sending: ATQ0
--> Re-Sending: ATZ
--> Modem not responding.

Because the Internet access rate of the wireless network card is 230.4 Kbps (on the box), the corresponding Baud value should be set to 230400. In some cases, it may be different. Adjust it as needed, set the Internet access rate to x 1000.

Finally, enter wvdial cdma to start dialing.

# Wvdial cdma
--> WvDial: Internet dialer version 1.54.0
--> Cannot get information for serial port.
--> Initializing modem.
--> Sending: ATZ
ATZ
OK
--> Modem initialized.
--> Sending: ATDT #777
--> Waiting for carrier.
ATDT #1, 777
CONNECT
$ DCON
$ DCONTYPE: 2, 2
--> Carrier detected. Starting PPP immediately.
--> Starting pppd at Thu Jan 24 10:58:41 2008
--> Pid of pppd: 4964
--> Using interface ppp0
--> Authentication (CHAP) started
--> Authentication (CHAP) successful
--> Local IP address 220.203.36.20
--> Remote IP address 220.192.136.5
--> Primary DNS address 220.192.8.58
--> Secondary DNS address 220.192.32.103
--> Script/etc/ppp/ip-up run successful
--> Default route OK.
--> Nameserver (DNS) OK.
--> Connected... Press Ctrl-C to disconnect

You can see that the dial is successful. Enjoy wireless Internet access.

Postscript: I thought it was very troublesome. I didn't expect it to be so simple. Or Lao Tzu's sentence: "Is it easy to do things in the world? For this reason, it is also easy for the hard, not for the easy, it is also difficult for the easy ."

It would be better to speed up the Internet. 230.4 Kbps can only be used to view webpages and chat. The actual download speed is only 230.4/8 = 28 Kbyte/s, which is faster, it is estimated that there will be no more than CDMA 2x/3x or 3G.

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.