PPP dialing settings are available on many platforms. Here we will focus on the PPP script content that has been tested on the L350 and N300 platforms. Now let's take a look at the specific content. I hope it will be applied to everyone.
- /apps/etc/ppp >: uname -a
- Linux netaccess 2.6.22.1 #17 Thu Jan 7 18:03:30 EST 2010 armv5tejl unknown
Pppd reads related configuration files from/etc/ppp. Since these configuration files are often modified during debugging, a symbolic link is established to our Nandflash partition:
- /apps/etc/ppp >: ls -l /etc/ppp
- lrwxrwxrwx 1 root root 13 Nov 20 2009 /etc/ppp -> /apps/etc/ppp
When pppd is used as a ppp server, the following configuration files are used. In the following documents, we will introduce them in detail:
- /apps/etc/ppp >: ls
- chap-secrets gprs-start-chat options options.ttyS1 pap-secrets
Pppd running parameter file/etc/ppp/options
This file specifies the pppd running parameter. If the parameter specified by the command line appears in the configuration file when running pppd, pppd uses the configuration in/etc/ppp/options. For pppd-supported parameters, run the man command query (man pppd) on linux in our PC)
[Guowenxue @ localhost ~] $ Man 8 pppd
PPPD (8) PPPD (8)
NAME
Pppd-Point-to-Point Protocol Daemon
SYNOPSIS
Pppd [options]
/Apps/etc/ppp>: cat options
# Tty Options
/Dev/ttyS1 # For example, you can comment out/dev/ttyS1 and use the command line # pppd/dev/ttyS1 run to specify;
115200
# Lock
Modem
Nocrtscts # No hardware Traffic Control
# Login
Nodetach # If updetach is specified, the dial is successfully placed in the background for running. If it is nodetach, it is executed on the foreground.
Debug
# Auth options
Auth # enable Authentication
+ Pap # Use pap Certification
-Chap # do not support chap authentication
# The connect_tty function in source code ppp-2.4.3/pppd/tty. c will execute this script. This mainly refers to the dialing response to the client.
Connect "/usr/sbin/chat-v-E-V-f/etc/ppp/gprs-start-chat"
# Lcp options
# Passive
Asyncmap 0
Lcp-echo-failure 3
Lcp-echo-interval 5
Ipcp-accept-local
Ipcp-accept-remote
# Proxyarp
Netmask 255.255.255.0
Ms-dns 10.78.28.10
Ms-dns 10.78.28.11
Nodefaultroute
Gprs-start-chat script
For chat usage, you can use the man command on a Linux PC to query: $ man 8 chat
- /Apps/etc/ppp>: cat gprs-start-chat
- ABORT 'busy'
- ABORT 'no carrier'
- ABORT 'no dialtone'
- ABORT 'error'
- TIMEOUT 0
-
- '''Atz' // first send ATZ reset modem
- 'OK' 'ate0' // After receiving the OK message, use ATE0 to remove the echo.
- 'Ring ''ata '// wait for the client to dial. If the client starts to dial, the Modem sends a response signal ATA after receiving the RING.
- 'Connect ''' // After receiving the CONNECT signal, it enters the next LCP process.