Environment:
OS: ubuntu10.04 64bit
TD module: lc6311 +
1. Load the device driver
First, we need to drive the TD module. We need to load the usbserial. Ko driver and specify the vendorid and productid:
Sudo modprobe usbserial vendor = 0x1ab7 Product = 0x6000
After the driver is loaded, connect the module to the computer through USB and identify several devices: ttyusb0 ttyusb1 ttyusb2 ttyusb3 ttyusb4 ttyusb5. We need to use ttyusb5.
2. Download and compile the PPP source code:
Download the source code and compile and install the three steps:
./Configure
Make
Make install
After compilation, several pppd, chat, pppump, and pppstats files will be generated. In fact, we use the pppd and chat programs.
3. Dial-up surfing script:
There are many scripts on the Internet, but they may be slightly different based on different hardware, because some AT commands are involved.
Dialing script/etc/PPP/peers/GPRS-dial:
hide-passwordnoauthconnect "/usr/local/sbin/chat -v -t 50 -f /etc/chatscripts/gprs-chat"debug/dev/ttyUSB5460800defaultroutenoipdefaultlocallockdumpnodetachuser " "remotename cmnetipparam cmnetusepeerdns
Chat script/etc/chatscripts/GPRS-chat:
#TIMEOUT 15ABORT '\nBUSY\r'ABORT '\nNO ANSWER\r'ABORT '\nRINGING\r\n\r\nRINGING\r'ABORT '\n+CME ERROR: 100\r'#" AT#'OK-+++\c-OK' ATH0#TIMEOUT 40#" \rAT'' ATZ#OK ATS0=0#OK ATE0V1OK AT+CGDCONT=1,"IP","CMNET"OK AT+CGEQREQ=1,2,128,384,0,0,0,0,"0E0","0E0",,0,0OK ATDT*98*1#CONNECT
4. Start pppd
Sudo pppd call GPRS-dial
If the operation succeeds, the following information is returned:
local IP address 10.107.109.49remote IP address 192.168.0.1primary DNS address 120.196.165.7secondary DNS address 221.179.38.7Script /etc/ppp/ip-up started (pid 4162)Script /etc/ppp/ip-up finished (pid 4162), status = 0x0
Appendix:
1. Source git download: http://git.ozlabs.org /? P = PPP. Git; A = Summary
2. Source Code FTP download: ftp://ftp.samba.org/pub/ppp/
3. References: http://blog.chinaunix.net/u3/90973/showart_1998886.html
4. Chat script configuration instructions:
Http://www.dcaccess.net/welcome/linux/PPP-HOWTO-15.html#ss15.5
Section 15.4
5. Chinese PPP how:
Http://man.chinaunix.net/linux/how/PPP-HOWTO.html#toc15