In some systems, we can perform an experiment on ppp dialing settings. Here we will focus on the content and process of the ppp dial-up linux on the Liod platform. Hardware Platform: yidao Liod Platform Based on PXA270), operating system: Embedded Linux. The following describes how to perform ppp dialing on the Liod platform to implement GPRS internet access.
Step 1: If the kernel does not support ppp dialing, recompile the kernel and add support for ppp,
- <*> PPP (point-to-point protocol) support
- [*] PPP multilink support (EXPERIMENTAL)
- <*> PPP support for async serial ports
- <*> PPP support for sync tty ports
- <*> PPP Deflate compression
- <*> PPP BSD-Compress compression
Then re-burn the new kernel image!
Step 2: Download The ppp-2.4.1 source package and generate the pppd and chat programs required for dialing.
Source code download URL: http://samba.org/ftp/ppp/old site, currently cannot use the ftp://ftp.samba.org/pub/ppp)
Decompress the source code package, enter the directory, and perform cross-compilation. The cross compiler used here is arm-linux-gcc (version 3.3.2)
- # Cd/root/gprs/ppp-2.4.1 here suppose ppp unzipping is under the/root/gprs/directory)
- #./Configure
- # Make CC = arm-linux-gcc
The dialing program is/root/gprs/ppp-2.4.1/pppd, And/root/gprs/ppp-2.4.1/chat program for debugging convenience, I create a new directory named pppdial on the CF card and copy the pppd and chat programs to this directory! The storage space on the Development Board is limited, so here I use the CF card to expand the storage capacity)
Step 3: configure the dialing script
Put/root/gprs/ppp-2.4.1/scripts/Under the ppp-on, ppp-on-dialer, the three ppp-off scripts are modified and copied to/mnt/cf/pppdial/. The modified scripts are as follows:
1. The content of the ppp-on script to be modified:
- TELEPHONE=*99***1# # The telephone number for the connection
- ACCOUNT= # The account name for logon (as in 'George Burns')
- PASSWORD= # The password for this account (and 'Gracie Allen')
- LOCAL_IP=0.0.0.0 # Local IP address if known. Dynamic = 0.0.0.0
- REMOTE_IP=0.0.0.0 # Remote IP address if desired. Normally 0.0.0.0
- NETMASK=255.255.255.0 # The proper netmask if needed
-
- # Export them so that they will be available at 'ppp-on-dialer' time.
- export TELEPHONE ACCOUNT
- DIALER_SCRIPT=/mnt/cf/pppdial/ppp-on-dialer
-
- # Initiate the connection
-
- exec /mnt/cf/pppdial/pppd debug lock nocrtscts /dev/ttyS1 19200 \
- asyncmap 20A0000 escape FF kdebug 0 $LOCAL_IP:$REMOTE_IP \
- noipdefault netmask $NETMASK defaultroute connect $DIALER_SCRIPT usepeerdns
2. Modify the ppp-on-dialer script:
- #!/bin/sh
- #
- # This is part 2 of the ppp-on script. It will perform the connection
- # protocol for the desired connection.
- #
- exec /sbin/chat -v \
- TIMEOUT 5 \
- ABORT '\nBUSY\r' \
- ABORT '\nNO ANSWER\r' \
- ABORT '\nRINGING\r\n\r\nRINGING\r' \
- '' AT+CGDCONT=1,IP,CMNET \
- 'OK' AT \
- 'OK-+++\c-OK' ATH0 \
- TIMEOUT 30 \
- OK ATDT$TELEPHONE \
- CONNECT
3. Add the/etc/ppp/resolv. conf file to the Liod board.
- nameserver 211.136.20.203
- nameserver 211.136.18.171
Step 4: connect to gprs
The gprs module connects to the Bluetooth serial port (/dev/ttyS1) on the Board through the serial port, because the ffuart of the Liod board is used for debugging the serial port, even if you log on to the Liod through telnet, however, if the serial port 0 is used to connect to the GPRS module, dialing will fail. this is because debugging information is output from serial port 0, which may interfere with the dialing process.
Disable the default network device: ifconfig eth0 down
Mount the cf card on the Liod platform and switch to/mnt/cf/pppdial/. Now you can dial the ppp!
Pppd Dialing:./ppp-on
(Note: Disable eth0 before dialing. Otherwise, even if the IP address can be obtained through dialing, the Internet cannot be accessed due to a route error)