There are two programs for using PPP to access Linux: PPPD and chat. Ubuntu comes with pppd and chat, and you can use man to see how it's used.
Typical PPP dialing requires several files to be prepared:
1. PPPD script.
2. Chat script.
3. chap-secrets file.
4. pap-secrets file.
The chat script is a real send and receive script for the AT command, and the chat script mainly consists of timeout,abort and at instruction interaction. Timeout timeout, abort specifies what error occurs when the at instruction interacts, and chat exits. The at instruction interaction is the form of "receive" "Send". For example, the first line, which means not receiving any information, is sent directly at
"At
The second line means waiting to receive OK. If OK, send at+cgdcont=1 this command.
Example:
TIMEOUT
ABORT ' \nbusy\r '
ABORT ' \nno answer\r '
ABORT ' \nringing\r\n\r\nringing\r '
# ' at
# ' Ok-+++\c-ok ' ATH0
TIMEOUT
"' \rat
OK
ats0=0
OK
ate0v1
OK
at+cgdcont=1, "IP", "CMNET"
OK
atdt*99***1#
CONNECT
"'
Reference:
1. "3g Transplant" http://blog.csdn.net/duloveding/article/details/8287758
2. "Linux PPP Dial +3G module (EVDO ZTE MC8630 module)" http://blog.csdn.net/memoryjs/article/details/7946878
3. "PPP dialing under Linux" http://wenku.baidu.com/view/74c5aed476a20029bd642d4f.html
PPP Dial-up wireless internet access under Linux