首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >PPPD连接脚本失败

PPPD连接脚本失败
EN

Stack Overflow用户
提问于 2021-10-14 15:40:01
回答 1查看 996关注 0票数 0

我正在使用Raspberry Pi 4,并试图使用A9G的GSM/GPRS+GPS模块接入互联网。

首先,我用sudo apt-get install ppp screen elinks安装了ppp

我在路径/etc/ppp/peers/rnet中创建了一个名为rnet的文件

代码语言:javascript
复制
# My APN internet.vodafone.gr
connect "/usr/sbin/chat -v -f /etc/chatscripts/gprs -T internet.vodafone.gr"

# Communication port:
/dev/ttyS0

# Baudrate
9600

# 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 to the internet.
defaultroute

# Makes PPPD "dial again" when the connection is lost.
persist

# Do not ask the remote to authenticate.
noauth

# No hardware flow control on the serial link with GSM Modem
nocrtscts

# No modem control lines with GSM Modem
local

路径"MY_4_DIGIT_PIN"中的

  1. 在文件gprs中添加了需要我的gprs的行

代码语言:javascript
复制
ABORT           BUSY
ABORT           VOICE
ABORT           "NO CARRIER"
ABORT           "NO DIALTONE"
ABORT           "NO DIAL TONE"
ABORT           "NO ANSWER"
ABORT           "DELAYED"
ABORT           "ERROR"

# cease if the modem is not attached to the network yet
ABORT           "+CGATT: 0"

""              AT
TIMEOUT         12
OK              ATH
OK              ATE1

# +CPIN provides the SIM card PIN
OK              AT+CPIN="MY_4_DIGIT_PIN"

# +CFUN may allow to configure the handset to limit operations to
# GPRS/EDGE/UMTS/etc to save power, but the arguments are not standard
# except for 1 which means "full functionality".
#OK             AT+CFUN=1

OK              AT+CGDCONT=1,"IP","\T","",0,0
OK              ATD*99#
TIMEOUT         22
CONNECT         ""

因此,当我试图启动rnet文件时:

代码语言:javascript
复制
sudo pon rnet

我在syslog (cat /var/log/syslog | grep pppd)中得到了以下错误消息:

代码语言:javascript
复制
Oct 14 18:14:22 raspberrypi pppd[3063]: pppd 2.4.7 started by pi, uid 0
Oct 14 18:14:35 raspberrypi pppd[3063]: Connect script failed
Oct 14 18:15:06 raspberrypi pppd[3063]: Connect script failed
Oct 14 18:15:37 raspberrypi pppd[3063]: Connect script failed
...

当我试图运行以下AT命令时,该模块似乎工作正常,并且能够连接到网络:

代码语言:javascript
复制
AT
OK

AT+CPIN?
+CPIN:READY
OK

AT+CREG?
+CREG: 1,1

OK
AT+CGATT?
+CGATT:1
OK

AT+COPS?
+COPS: 0,2,"20205"

AT+CGACT?
+CGACT: 1, 1

AT+HTTPGET="http://www.example.com/"
OK
HTTP/1.1 200 OK
...

因此,我无法理解我是否在文件rnet中写错了什么,或者是我做得不对。如果你有什么想法,请帮帮我。

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2021-11-30 10:14:42

问题是我的A9G模块没有足够的电源。因此,在启动进程之前,请检查您的A9G模块是否打开,并确保您已经禁用了登录shell,以便通过串行访问,并且启用了串行接口。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/69573587

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档