简体   繁体   中英

PPPD Connect script failed

I'm using the Raspberry Pi 4 and trying to have an Internet access using the A9G GSM/GPRS+GPS Module.

  1. At first I have install ppp with sudo apt-get install ppp screen elinks

  2. I have create a file with name rnet in path /etc/ppp/peers/rnet :

# 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
  1. In file gprs in path /etc/chatscripts/gprs I have add the line that need my "MY_4_DIGIT_PIN" :
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         ""

So when I'am trying to starts up the rnet file:

sudo pon rnet

I get this error message in syslog ( cat /var/log/syslog | grep pppd ):

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
...

When I am trying to run the below AT commands, the module seems to be work fine and be able to connected to network:

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
...

So I can't understand if I have have writing something wrong in file rnet or is something else that I am not doing it right. If you have any idea please help me.

The problem was that my A9G Module, was not getting enough power. Therefore, check if your A9G Module is turned on, before starting the process and make sure that you have disabled login shell to be accessible over serial, and also you have enabled the serial interface.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM