PPP dial-up Internet

27 篇文章 1 订阅
14 篇文章 0 订阅

PPP dial

  • Switch to root account
sudo su
  • Install ppp
   sudo apt-get install ppp
  • Enter the /etc/ppp/peers directory
cd /etc/ppp/peers
  • Create gprs file
sudo nano gprs
  • Copy the text below to gprs
    (If you need UART dial-up, change ttyS0 to ttyUSB2) The content is as follows:
user "myusername@realm"
#connect "/usr/sbin/chat -v -f /etc/chatscripts/pap -T ********"
connect "/usr/sbin/chat -v -f /etc/chatscripts/gprs"
#/dev/modem
/dev/ttyUSB2
#/dev/ttyS0     
# Speed of the serial line.
115200
nocrtscts
debug
nodetach
ipcp-accept-local
ipcp-accept-remote
# Assumes that your IP address is allocated dynamically by the ISP.
noipdefault
# Try to get the name server addresses from the ISP.
usepeerdns
# Use this connection as the default route.
defaultroute
# Makes pppd "dial again" when the connection is lost.
persist
# Do not ask the remote to authenticate.
noauth
  • PPP dial
pppd call gprs &
  • View ppp0 network
ifconfig
  • Test the Internet
ping -I ppp0 www.baidu.com

Auto-start PPP dialing after power-on (optional)

  • Edit the test.sh file
sudo nano test.sh
  • Copy the following text to tesh.sh
sudo su
# sleep 1m
cd /etc/ppp/peers
pppd call gprs &
  • Grant executable permissions to script files (example: test.sh, path: ./home/pi/test.sh)
sudo chmod 777 test.sh
  • Open the /etc/rc.local file
sudo nano /etc/rc.local
  • Add the execution script command in the /etc/rc.local file (the line above the statement exit 0)
bash ./home/pi/test.sh
  • Then execute the restart script
./test.sh
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

信看

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值