Failed to Establish PPP Connection

I was able to get a PPP connection, but fails in recent tries.

Here is a log of the screen output:
pi@raspberrypi:~ $ sudo pon
pppd options in effect:
debug # (from /etc/ppp/peers/provider)
updetach # (from /etc/ppp/peers/provider)
dump # (from /etc/ppp/peers/provider)
noauth # (from /etc/ppp/peers/provider)
remotename 3gppp # (from /etc/ppp/peers/provider)
/dev/ttyAMA0 # (from /etc/ppp/peers/provider)
115200 # (from /etc/ppp/peers/provider)
lock # (from /etc/ppp/peers/provider)
connect chat -s -v -f /etc/chatscripts/chat-connect -T vzwinternet # (from /etc/ppp/peers/provider)
disconnect chat -s -v -f /etc/chatscripts/chat-disconnect # (from /etc/ppp/peers/provider)
nocrtscts # (from /etc/ppp/peers/provider)
modem # (from /etc/ppp/peers/provider)
asyncmap 0 # (from /etc/ppp/options)
lcp-echo-failure 4 # (from /etc/ppp/options)
lcp-echo-interval 30 # (from /etc/ppp/options)
hide-password # (from /etc/ppp/peers/provider)
novj # (from /etc/ppp/peers/provider)
novjccomp # (from /etc/ppp/peers/provider)
ipcp-accept-local # (from /etc/ppp/peers/provider)
ipcp-accept-remote # (from /etc/ppp/peers/provider)
ipparam 3gppp # (from /etc/ppp/peers/provider)
noipdefault # (from /etc/ppp/peers/provider)
ipcp-max-failure 30 # (from /etc/ppp/peers/provider)
defaultroute # (from /etc/ppp/peers/provider)
usepeerdns # (from /etc/ppp/peers/provider)
noccp # (from /etc/ppp/peers/provider)
noipx # (from /etc/ppp/options)
abort on (BUSY)
abort on (NO CARRIER)
abort on (NO DIALTONE)
abort on (ERROR)
abort on (NO ANSWER)
timeout set to 30 seconds
send (AT^M)
expect (OK)
alarm
Failed
Script chat -s -v -f /etc/chatscripts/chat-connect -T vzwinternet finished (pid 972), status = 0x3
Connect script failed

BTW, I followed the instructions on Setting up the PPP connection
The Sixfab IOT HAT’s blue network indicator light blinks with a 2 second on - Half second off pattern.

Hello Jason,

Make sure the serial is enabled under the raspi-config and not busy by any other resource.

Could you please troubleshoot if the module can be communicated over the UART using minicom? You may send AT commands such as AT, ATI, AT+CSQ, AT+CREG?, AT+COPS

This tutorial could be helpful.

Thx. For some reason, it connected without making any changes. Do I have to connect the pigtail USB connector?

But, after I leave it idle for about an hour or so, the connection seems to have dropped. The carrier is Verizon. Do I have to configure something to keep it alive, or send a heartbeat every so often?

Today, it won’t connect again.
When I run sudo pon, it shows the following, seems to indicate a good PPP connection. But when I do ping 8.8.8.8, it says network is not reachable.

pi@raspberrypi:~ $ sudo pon
pppd options in effect:
debug # (from /etc/ppp/peers/provider)
updetach # (from /etc/ppp/peers/provider)
dump # (from /etc/ppp/peers/provider)
noauth # (from /etc/ppp/peers/provider)
remotename 3gppp # (from /etc/ppp/peers/provider)
/dev/ttyUSB3 # (from /etc/ppp/peers/provider)
115200 # (from /etc/ppp/peers/provider)
lock # (from /etc/ppp/peers/provider)
connect chat -s -v -f /etc/chatscripts/chat-connect -T vzwinternet # (from /etc/ppp/peers/provider)
disconnect chat -s -v -f /etc/chatscripts/chat-disconnect # (from /etc/ppp/peers/provider)
nocrtscts # (from /etc/ppp/peers/provider)
modem # (from /etc/ppp/peers/provider)
asyncmap 0 # (from /etc/ppp/options)
lcp-echo-failure 4 # (from /etc/ppp/options)
lcp-echo-interval 30 # (from /etc/ppp/options)
hide-password # (from /etc/ppp/peers/provider)
novj # (from /etc/ppp/peers/provider)
novjccomp # (from /etc/ppp/peers/provider)
ipcp-accept-local # (from /etc/ppp/peers/provider)
ipcp-accept-remote # (from /etc/ppp/peers/provider)
ipparam 3gppp # (from /etc/ppp/peers/provider)
noipdefault # (from /etc/ppp/peers/provider)
ipcp-max-failure 30 # (from /etc/ppp/peers/provider)
defaultroute # (from /etc/ppp/peers/provider)
usepeerdns # (from /etc/ppp/peers/provider)
noccp # (from /etc/ppp/peers/provider)
noipx # (from /etc/ppp/options)
abort on (BUSY)
abort on (NO CARRIER)
abort on (NO DIALTONE)
abort on (ERROR)
abort on (NO ANSWER)
timeout set to 30 seconds
send (AT^M)
expect (OK)
^M
OK
– got it

send (ATE0^M)
expect (OK)
^M
^M
OK
– got it

send (AT+QCFG=“band”,F,400A0E189F,A0E189F,1^M)
expect (OK)
^M
^M
OK
– got it

send (AT+QCFG=“nwscanseq”,02,1^M)
expect (OK)
^M
^M
OK
– got it

send (AT+QCFG=“nwscanmode”,3,1^M)
expect (OK)
^M
^M
OK
– got it

send (AT+QCFG=“iotopmode”,0,1^M)
expect (OK)
^M
^M
OK
– got it

send (ATI;+CSUB;+CSQ;+COPS?;+CGREG?;&D2^M)
expect (OK)
^M
^M
Quectel^M
BG96^M
Revision: BG96MAR04A03M1G^M
^M
SubEdition: V07^M
^M
+CSQ: 25,99^M
^M
+COPS: 0,0,“Verizon Wireless”,8^M
^M
+CGREG: 0,0^M
^M
OK
– got it

send (AT+CGDCONT=1,“IP”,“vzwinternet”,0,0^M)
expect (OK)
^M
^M
OK
– got it

send (ATD*99#^M)
expect (CONNECT)
^M
^M
CONNECT
– got it

Script chat -s -v -f /etc/chatscripts/chat-connect -T vzwinternet finished (pid 7229), status = 0x0
Serial connection established.
using channel 23
Using interface ppp0
Connect: ppp0 <–> /dev/ttyUSB3
sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x1036cd7d> ]
rcvd [LCP ConfReq id=0x42 <asyncmap 0x0> <magic 0x2f5496a3> ]
No auth is possible
sent [LCP ConfRej id=0x42 ]
rcvd [LCP ConfAck id=0x1 <asyncmap 0x0> <magic 0x1036cd7d> ]
rcvd [LCP ConfReq id=0x43 <asyncmap 0x0> <magic 0x2f5496a3> ]
sent [LCP ConfAck id=0x43 <asyncmap 0x0> <magic 0x2f5496a3> ]
sent [LCP EchoReq id=0x0 magic=0x1036cd7d]
sent [IPCP ConfReq id=0x1 <addr 0.0.0.0> <ms-dns1 0.0.0.0> <ms-dns2 0.0.0.0>]
rcvd [LCP DiscReq id=0x44 magic=0x2f5496a3]
rcvd [LCP EchoRep id=0x0 magic=0x2f5496a3 10 36 cd 7d]
rcvd [IPCP ConfReq id=0x2c]
sent [IPCP ConfNak id=0x2c <addr 0.0.0.0>]
rcvd [IPCP ConfNak id=0x1 <addr 100.112.198.251> <ms-dns1 198.224.190.135> <ms-dns2 198.224.191.135>]
sent [IPCP ConfReq id=0x2 <addr 100.112.198.251> <ms-dns1 198.224.190.135> <ms-dns2 198.224.191.135>]
rcvd [IPCP ConfReq id=0x2d]
sent [IPCP ConfAck id=0x2d]
rcvd [IPCP ConfAck id=0x2 <addr 100.112.198.251> <ms-dns1 198.224.190.135> <ms-dns2 198.224.191.135>]
Could not determine remote IP address: defaulting to 10.64.64.64
not replacing default route to wwan0 [0.0.0.0]
local IP address 100.112.198.251
remote IP address 10.64.64.64
primary DNS address 198.224.190.135
secondary DNS address 198.224.191.135

Hello Jason.
The connection seems established.

Could you please check following

ifconfig ppp0
route -n
ping -I ppp0 google.com

Today, trying it again and it is getting worse, here is the result from pppd

I have a suggestion, would you be able to provide a image of SD card with working configuration so we can download and get it running?

pi@raspberrypi:~ $ sudo pppd call provider
pppd options in effect:
debug # (from /etc/ppp/peers/provider)
updetach # (from /etc/ppp/peers/provider)
dump # (from /etc/ppp/peers/provider)
noauth # (from /etc/ppp/peers/provider)
remotename 3gppp # (from /etc/ppp/peers/provider)
/dev/ttyUSB3 # (from /etc/ppp/peers/provider)
115200 # (from /etc/ppp/peers/provider)
lock # (from /etc/ppp/peers/provider)
connect chat -s -v -f /etc/chatscripts/chat-connect -T vzwinernet # (from /etc/ppp/peers/provider)
disconnect chat -s -v -f /etc/chatscripts/chat-disconnect # (from /etc/ppp/peers/provider)
nocrtscts # (from /etc/ppp/peers/provider)
modem # (from /etc/ppp/peers/provider)
asyncmap 0 # (from /etc/ppp/options)
lcp-echo-failure 4 # (from /etc/ppp/options)
lcp-echo-interval 30 # (from /etc/ppp/options)
hide-password # (from /etc/ppp/peers/provider)
novj # (from /etc/ppp/peers/provider)
novjccomp # (from /etc/ppp/peers/provider)
ipcp-accept-local # (from /etc/ppp/peers/provider)
ipcp-accept-remote # (from /etc/ppp/peers/provider)
ipparam 3gppp # (from /etc/ppp/peers/provider)
noipdefault # (from /etc/ppp/peers/provider)
ipcp-max-failure 30 # (from /etc/ppp/peers/provider)
defaultroute # (from /etc/ppp/peers/provider)
usepeerdns # (from /etc/ppp/peers/provider)
noccp # (from /etc/ppp/peers/provider)
noipx # (from /etc/ppp/options)
abort on (BUSY)
abort on (NO CARRIER)
abort on (NO DIALTONE)
abort on (ERROR)
abort on (NO ANSWER)
timeout set to 30 seconds
send (AT^M)
expect (OK)
^M
OK
– got it

send (ATE0^M)
expect (OK)
^M
^M
OK
– got it

send (AT+QCFG=“band”,F,400A0E189F,A0E189F,1^M)
expect (OK)
^M
^M
OK
– got it

send (AT+QCFG=“nwscanseq”,02,1^M)
expect (OK)
^M
^M
OK
– got it

send (AT+QCFG=“nwscanmode”,3,1^M)
expect (OK)
^M
^M
OK
– got it

send (AT+QCFG=“iotopmode”,0,1^M)
expect (OK)
^M
^M
OK
– got it

send (ATI;+CSUB;+CSQ;+COPS?;+CGREG?;&D2^M)
expect (OK)
^M
^M
Quectel^M
BG96^M
Revision: BG96MAR04A03M1G^M
^M
SubEdition: V07^M
^M
+CSQ: 26,99^M
^M
+COPS: 0^M
^M
+CGREG: 0,0^M
^M
OK
– got it

send (AT+CGDCONT=1,“IP”,“vzwinernet”,0,0^M)
expect (OK)
^M
^M
OK
– got it

send (ATD*99#^M)
expect (CONNECT)
^M
^M
CONNECT
– got it

Script chat -s -v -f /etc/chatscripts/chat-connect -T vzwinernet finished (pid 1767), status = 0x0
Serial connection established.
using channel 31
Using interface ppp0
Connect: ppp0 <–> /dev/ttyUSB3
sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0xf477060d> ]
rcvd [LCP ConfReq id=0x58 <asyncmap 0x0> <magic 0xd08b11ef> ]
No auth is possible
sent [LCP ConfRej id=0x58 ]
rcvd [LCP ConfAck id=0x1 <asyncmap 0x0> <magic 0xf477060d> ]
rcvd [LCP ConfReq id=0x59 <asyncmap 0x0> <magic 0xd08b11ef> ]
sent [LCP ConfAck id=0x59 <asyncmap 0x0> <magic 0xd08b11ef> ]
sent [LCP EchoReq id=0x0 magic=0xf477060d]
sent [IPCP ConfReq id=0x1 <addr 0.0.0.0> <ms-dns1 0.0.0.0> <ms-dns2 0.0.0.0>]
rcvd [LCP DiscReq id=0x5a magic=0xd08b11ef]
rcvd [LCP EchoRep id=0x0 magic=0xd08b11ef f4 77 06 0d]
Modem hangup
Connection terminated.

The network registration is not successful yet.

Selection_526

AT+CGREG should return 0.1

Check AT+CGATT?
if it is 0 try AT+CGATT=1

Now I can’t open the ttyUSB3 port, here is what I get when I try to do minicom
I have spent countless hours troubleshooting this thing, it is getting very frustrating. Can’t you create a SD card image with working configuration that we can download?

pi@raspberrypi:~ $ sudo minicom -b 115200 -D /dev/ttyUSB3
minicom: cannot open /dev/ttyUSB3: No such file or directory

When I do dmesg | grep tty, I got the following
pi@raspberrypi:~ $ dmesg | grep tty
[ 0.000000] Kernel command line: coherent_pool=1M 8250.nr_uarts=1 snd_bcm2835.enable_compat_alsa=0 snd_bcm2835.enable_hdmi=1 snd_bcm2835.enable_headphones=1 bcm2708_fb.fbwidth=1920 bcm2708_fb.fbheight=1080 bcm2708_fb.fbswap=1 vc_mem.mem_base=0x3ec00000 vc_mem.mem_size=0x40000000 console=tty1 root=PARTUUID=db7f36ca-02 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait quiet splash plymouth.ignore-serial-consoles
[ 0.000308] printk: console [tty1] enabled
[ 2.397517] 3f201000.serial: ttyAMA0 at MMIO 0x3f201000 (irq = 81, base_baud = 0) is a PL011 rev2
[ 2.400054] 3f215040.serial: ttyS0 at MMIO 0x0 (irq = 53, base_baud = 50000000) is a 16550
[ 4.367041] systemd[1]: Created slice system-getty.slice.
[ 15.916761] usb 1-1.1.2: GSM modem (1-port) converter now attached to ttyUSB0
[ 15.917220] usb 1-1.1.2: GSM modem (1-port) converter now attached to ttyUSB1
[ 15.917637] usb 1-1.1.2: GSM modem (1-port) converter now attached to ttyUSB2
[ 15.918121] usb 1-1.1.2: GSM modem (1-port) converter now attached to ttyUSB3
[ 38.689137] option1 ttyUSB0: GSM modem (1-port) converter now disconnected from ttyUSB0
[ 38.689721] option1 ttyUSB1: GSM modem (1-port) converter now disconnected from ttyUSB1
[ 38.690250] option1 ttyUSB2: GSM modem (1-port) converter now disconnected from ttyUSB2
[ 38.690779] option1 ttyUSB3: GSM modem (1-port) converter now disconnected from ttyUSB3
[ 41.039925] usb 1-1.1.2: GSM modem (1-port) converter now attached to ttyUSB0
[ 41.040405] usb 1-1.1.2: GSM modem (1-port) converter now attached to ttyUSB1
[ 41.040851] usb 1-1.1.2: GSM modem (1-port) converter now attached to ttyUSB2
[ 41.041340] usb 1-1.1.2: GSM modem (1-port) converter now attached to ttyUSB3
[ 45.727961] input: Bluetooth 3.0 Keyboard as /devices/platform/soc/3f201000.serial/tty/ttyAMA0/hci0/hci0:13/0005:04E8:7021.0005/input/input10
[ 45.728655] input: Bluetooth 3.0 Keyboard Consumer Control as /devices/platform/soc/3f201000.serial/tty/ttyAMA0/hci0/hci0:13/0005:04E8:7021.0005/input/input11
[ 45.728872] input: Bluetooth 3.0 Keyboard System Control as /devices/platform/soc/3f201000.serial/tty/ttyAMA0/hci0/hci0:13/0005:04E8:7021.0005/input/input12
[ 45.729068] input: Bluetooth 3.0 Keyboard Mouse as /devices/platform/soc/3f201000.serial/tty/ttyAMA0/hci0/hci0:13/0005:04E8:7021.0005/input/input13
[ 64.848257] option1 ttyUSB0: GSM modem (1-port) converter now disconnected from ttyUSB0
[ 64.849511] option1 ttyUSB1: GSM modem (1-port) converter now disconnected from ttyUSB1
[ 64.850583] option1 ttyUSB2: GSM modem (1-port) converter now disconnected from ttyUSB2
[ 64.858721] option1 ttyUSB3: GSM modem (1-port) converter now disconnected from ttyUSB3
[ 66.971034] usb 1-1.1.2: GSM modem (1-port) converter now attached to ttyUSB0
[ 66.971941] usb 1-1.1.2: GSM modem (1-port) converter now attached to ttyUSB1
[ 66.972800] usb 1-1.1.2: GSM modem (1-port) converter now attached to ttyUSB2
[ 66.973702] usb 1-1.1.2: GSM modem (1-port) converter now attached to ttyUSB3
[ 81.367679] option1 ttyUSB0: GSM modem (1-port) converter now disconnected from ttyUSB0
[ 81.368362] option1 ttyUSB1: GSM modem (1-port) converter now disconnected from ttyUSB1
[ 81.369077] option1 ttyUSB2: GSM modem (1-port) converter now disconnected from ttyUSB2
[ 81.370523] option1 ttyUSB3: GSM modem (1-port) converter now disconnected from ttyUSB3
[ 83.581016] usb 1-1.1.2: GSM modem (1-port) converter now attached to ttyUSB0
[ 83.581911] usb 1-1.1.2: GSM modem (1-port) converter now attached to ttyUSB1
[ 83.582759] usb 1-1.1.2: GSM modem (1-port) converter now attached to ttyUSB2
[ 83.583666] usb 1-1.1.2: GSM modem (1-port) converter now attached to ttyUSB3

You shuold try ttyUSB2 for minicom as ttyUSB3 could be busy with PPP.
I will send the required chatscripts first.

Could you please replace the content of /etc/chatscripts/chat-connect with the following.

# /etc/chatscripts/chat-connect
ABORT "BUSY"
ABORT "NO CARRIER"
ABORT "NO DIALTONE"
ABORT "ERROR"
ABORT "NO ANSWER"
TIMEOUT 30
"" AT
OK ATE0
OK ATI;+CSUB;+CSQ;+COPS?;+CGREG?;+CREG?;+QCSQ;&D2
OK AT+CGDCONT=1,"IP","\T",,0,0
OK ATD*99#
CONNECT

Selection_526

The APN is spelt wrong. It should say vzwinternet.

Hello all,

i have the same log file content as the first user with that issue. i recently bought the 3G/4G/LTE-Hat for use it with an RPi 3B+.
I first had to use the “stored” versrion of WiringPi from github to be able to use “gpio -v” for example.
Then i edited the ppp_install script and removed the wiringpi from the apt-get install line there.
For Wifi-Card I use a Sierra MC7700

lsusb

Bus 001 Device 004: ID 1199:68a2 Sierra Wireless, Inc. MC7700
Bus 001 Device 003: ID 0424:ec00 Microchip Technology, Inc. (formerly SMSC) SMSC9512/9514 Fast Ethernet Adapter
Bus 001 Device 002: ID 0424:9514 Microchip Technology, Inc. (formerly SMSC) SMC9514 Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

As a Sim-Provider i use o2 which APN is “internet”. i removed PIN protection but no effect.

I detected under-voltage. May this be an error source for not working?

At the last step it asks for installing the reconnect_ppp script, Where is it stored? Why is there no systemd service at it show sth at installation.

Thanks in Advance & Merry XMas

Sascha

Hello,

The name of the device is ppp_connection_manager.service and can be found under /etc/systemd/system/

For debugging, you can stop the service and run sudo pon to identify the issue.

PPP related scripts can be found in the following path:
/etc/ppp/peers/
/etc/chatscripts/

Thanks for the short answer,
i’m getting only this error, after changing the device in /etc/ppp/peers/provider

my config -generated by install-script and changed device to /dev/ppp:


# /etc/ppp/peers/provider
/dev/ppp 115200
# The chat script, customize your APN in this file
connect 'chat -s -v -f /etc/chatscripts/chat-connect -T internet'
# The close script
disconnect 'chat -s -v -f /etc/chatscripts/chat-disconnect'
# Hide password in debug messages
hide-password
# The phone is not required to authenticate
noauth
persist
# Debug info from pppd
debug
# If you want to use the HSDPA link as your gateway
defaultroute
# pppd must not propose any IP address to the peer
noipdefault
# No ppp compression
novj
novjccomp
noccp
ipcp-accept-local
ipcp-accept-remote
local
# For sanity, keep a lock on the serial line
lock
modem
dump
updetach
# Hardware flow control
nocrtscts
remotename 3gppp
ipparam 3gppp
ipcp-max-failure 30
# Ask the peer for up to 2 DNS server addresses
usepeerdns

root@raspberrypi:~# pon
pppd options in effect:
debug # (from /etc/ppp/peers/provider)
updetach # (from /etc/ppp/peers/provider)
persist # (from /etc/ppp/peers/provider)
dump # (from /etc/ppp/peers/provider)
noauth # (from /etc/ppp/peers/provider)
remotename 3gppp # (from /etc/ppp/peers/provider)
/dev/ppp # (from /etc/ppp/peers/provider)
115200 # (from /etc/ppp/peers/provider)
lock # (from /etc/ppp/peers/provider)
connect chat -s -v -f /etc/chatscripts/chat-connect -T internet # (from /etc/ppp/peers/provider)
disconnect chat -s -v -f /etc/chatscripts/chat-disconnect # (from /etc/ppp/peers/provider)
nocrtscts # (from /etc/ppp/peers/provider)
modem # (from /etc/ppp/peers/provider)
asyncmap 0 # (from /etc/ppp/options)
lcp-echo-failure 4 # (from /etc/ppp/options)
lcp-echo-interval 30 # (from /etc/ppp/options)
hide-password # (from /etc/ppp/peers/provider)
novj # (from /etc/ppp/peers/provider)
novjccomp # (from /etc/ppp/peers/provider)
ipcp-accept-local # (from /etc/ppp/peers/provider)
ipcp-accept-remote # (from /etc/ppp/peers/provider)
ipparam 3gppp # (from /etc/ppp/peers/provider)
noipdefault # (from /etc/ppp/peers/provider)
ipcp-max-failure 30 # (from /etc/ppp/peers/provider)
defaultroute # (from /etc/ppp/peers/provider)
usepeerdns # (from /etc/ppp/peers/provider)
noccp # (from /etc/ppp/peers/provider)
noipx # (from /etc/ppp/options)
tcgetattr: Inappropriate ioctl for device (line 975)
root@raspberrypi:~#

How can i make this work?

Did you install/written any script that can control the provider?
The device should be /dev/<interface_name>
as for example:
For Quectel and Telit modules it is /dev/ttyUSB3.
Please check the module user guide(Linux guide) for details.

Hello . I sure have not written any script till now . I’ve waited for response.
I have a Sierra MC7700. Searched around several configs about ppp and stuff but no luck

Are you able to send the AT commands?
Please try to write in the Seirra support forum.