No Connection on PPP

Thanks Mark,

(Your explanation of how to edit the file, e.g. tabs, is very helpful.)

I have edited the chap-secrets file as suggested and ended up with this…

# Secrets for authentication using CHAP
# client        server  secret                  IP addresses
3gppp   raspberrypi     password        *

I then tried…

sudo pon

…and this time got a lot of text on the screen as follows:

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)
auth            # (from /etc/ppp/options)
user o2web              # (from /etc/ppp/peers/provider)
password ??????         # (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 mobile.o2.co.uk          # (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)
AT^M^M
OK
 -- got it

send (ATE0^M)
expect (OK)
^M
ATE0^M^M
OK

 -- got it

send (ATI;+CSUB;+CSQ;+COPS?;+CGREG?;&D2^M)
expect (OK)
^M
^M
Quectel^M
EC25^M
Revision: EC25EFAR06A04M4G^M
^M
SubEdition: V05^M
^M
+CSQ: 16,99^M
^M
+COPS: 0,0,"O2 - UK",7^M
^M
+CGREG: 0,1^M
^M
OK
 -- got it

send (AT+CGDCONT=1,"IP","mobile.o2.co.uk",,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 mobile.o2.co.uk finished (pid 1048), status = 0x0
Serial connection established.
using channel 1
Using interface ppp0
Connect: ppp0 <--> /dev/ttyUSB3
sent [LCP ConfReq id=0x1 <asyncmap 0x0> <auth eap> <magic 0x18146ffc> <pcomp> <accomp>]
rcvd [LCP ConfReq id=0x0 <asyncmap 0x0> <auth chap MD5> <magic 0xd11cb574> <pcomp> <accomp>]
sent [LCP ConfAck id=0x0 <asyncmap 0x0> <auth chap MD5> <magic 0xd11cb574> <pcomp> <accomp>]
rcvd [LCP ConfRej id=0x1 <auth eap>]
sent [LCP ConfReq id=0x2 <asyncmap 0x0> <auth chap MD5> <magic 0x18146ffc> <pcomp> <accomp>]
rcvd [LCP ConfRej id=0x2 <auth chap MD5>]
sent [LCP ConfReq id=0x3 <asyncmap 0x0> <magic 0x18146ffc> <pcomp> <accomp>]
rcvd [LCP ConfAck id=0x3 <asyncmap 0x0> <magic 0x18146ffc> <pcomp> <accomp>]
sent [LCP EchoReq id=0x0 magic=0x18146ffc]
peer refused to authenticate: terminating link
sent [LCP TermReq id=0x4 "peer refused to authenticate"]
rcvd [LCP DiscReq id=0x1 magic=0xd11cb574]
rcvd [CHAP Challenge id=0x1 <b9453772d48d8104165ed798ac515b61>, name = "UMTS_CHAP_SRVR"]
Discarded non-LCP packet when LCP not open
rcvd [LCP EchoRep id=0x0 magic=0xd11cb574 18 14 6f fc]
rcvd [LCP TermAck id=0x4]
Connection terminated.
Can't get terminal parameters: Input/output error
Script chat -s -v -f /etc/chatscripts/chat-disconnect finished (pid 1054), status = 0x2
disconnect script failed
pi@raspberrypi:~ $

One thing that occurs to me is that in the UK o2 seem to use PAP rather than CHAP. In anticipation of editing this file being needed I took a look at ‘pap-secrets’ in /etc/ppp which looks like this:

# /etc/ppp/pap-secrets
#
# This is a pap-secrets file to be used with the AUTO_PPP function of
# mgetty. mgetty-0.99 is preconfigured to startup pppd with the login option
# which will cause pppd to consult /etc/passwd (and /etc/shadow in turn)
# after a user has passed this file. Don't be disturbed therefore by the fact
# that this file defines logins with any password for users. /etc/passwd
# (again, /etc/shadow, too) will catch passwd mismatches.
#
# This file should block ALL users that should not be able to do AUTO_PPP.
# AUTO_PPP bypasses the usual login program so it's necessary to list all
# system userids with regular passwords here.
#
# ATTENTION: The definitions here can allow users to login without a
# password if you don't use the login option of pppd! The mgetty Debian
# package already provides this option; make sure you don't change that.

# INBOUND connections

# Every regular user can use PPP and has to use passwords from /etc/passwd
*       hostname        ""      *

# UserIDs that cannot use PPP at all. Check your /etc/passwd and add any
# other accounts that should not be able to use pppd!
guest   hostname        "*"     -
master  hostname        "*"     -
root    hostname        "*"     -
support hostname        "*"     -
stats   hostname        "*"     -

# OUTBOUND connections

# Here you should add your userid password to connect to your providers via
# PAP. The * means that the password is to be used for ANY host you connect
# to. Thus you do not have to worry about the foreign machine name. Just
# replace password with your password.
# If you have different providers with different passwords then you better
# remove the following line.

#       *       password

Since I got a “peer refused to authenticate” in the output following the ‘sudo pon’ do you think I need to edit the pap-secrets file instead?

progress!
first try this -
add another record to the chap-secrets file:
raspberrypi 3gppp password *

rerun ‘sudo pon’

Thanks Mark, I have made the edit and the ‘chap-secrets’ file now looks like this:

# Secrets for authentication using CHAP
# client        server  secret                  IP addresses
3gppp   raspberrypi     password        *
raspberrypi     3gppp   password        *

I then ran ‘sudo pon’ and I got this:

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)
auth            # (from /etc/ppp/options)
user o2web              # (from /etc/ppp/peers/provider)
password ??????         # (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 mobile.o2.co.uk         # (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 (ATI;+CSUB;+CSQ;+COPS?;+CGREG?;&D2^M)
expect (OK)
^M
^M
Quectel^M
EC25^M
Revision: EC25EFAR06A04M4G^M
^M
SubEdition: V05^M
^M
+CSQ: 15,99^M
^M
+COPS: 0,0,"O2 - UK",7^M
^M
+CGREG: 0,1^M
^M
OK
 -- got it

send (AT+CGDCONT=1,"IP","mobile.o2.co.uk",,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 mobile.o2.co.uk finished (pid 1477), status = 0x0
Serial connection established.
using channel 2
Using interface ppp0
Connect: ppp0 <--> /dev/ttyUSB3
sent [LCP ConfReq id=0x1 <asyncmap 0x0> <auth eap> <magic 0xbc12f5b8> <pcomp> <accomp>]
rcvd [LCP ConfReq id=0x2 <asyncmap 0x0> <auth chap MD5> <magic 0xd1963d6c> <pcomp> <accomp>]
sent [LCP ConfAck id=0x2 <asyncmap 0x0> <auth chap MD5> <magic 0xd1963d6c> <pcomp> <accomp>]
rcvd [LCP ConfRej id=0x1 <auth eap>]
sent [LCP ConfReq id=0x2 <asyncmap 0x0> <auth chap MD5> <magic 0xbc12f5b8> <pcomp> <accomp>]
rcvd [LCP ConfRej id=0x2 <auth chap MD5>]
sent [LCP ConfReq id=0x3 <asyncmap 0x0> <magic 0xbc12f5b8> <pcomp> <accomp>]
rcvd [LCP ConfAck id=0x3 <asyncmap 0x0> <magic 0xbc12f5b8> <pcomp> <accomp>]
sent [LCP EchoReq id=0x0 magic=0xbc12f5b8]
peer refused to authenticate: terminating link
sent [LCP TermReq id=0x4 "peer refused to authenticate"]
rcvd [LCP DiscReq id=0x3 magic=0xd1963d6c]
rcvd [CHAP Challenge id=0x1 <d0e1746bc474d3c986f714c7f46f1e55>, name = "UMTS_CHAP_SRVR"]
Discarded non-LCP packet when LCP not open
rcvd [LCP EchoRep id=0x0 magic=0xd1963d6c bc 12 f5 b8]
rcvd [LCP TermAck id=0x4]
Connection terminated.
Can't get terminal parameters: Input/output error
Script chat -s -v -f /etc/chatscripts/chat-disconnect finished (pid 1484), status = 0x2
disconnect script failed
pi@raspberrypi:~ $

it appears that the carrier is sending a challenge request but your device is not responding AS it is received after your device has started the disconnect process.
let’s extend the global timeout first:
edit - /etc/ppp/peers/provider
insert ‘passive’ (on a line by itself - anywhere is fine really but put it under the ‘password’ line just to keep track of it)

rerun ‘sudo pon’

disregard last instruction if you haven’t implemented yet. If you have you can leave it for now, no harm caused.

I went to the O2 site and see that they want PAP.
uncomment last line in ‘/etc/ppp/pap-secrets’
it will read ’ * password ’
comment out the two lines added to ‘/etc/ppp/chap-secrets’
add ‘+pap’ to ‘/etc/ppp/peers/provider’ OR uncomment this line from ‘/etc/ppp/options’

rerun ‘sudo pon’

sorry for the confusion.

Ok, I have uncommented the last line of ‘pap-secrets’ and it now contains:

#
# /etc/ppp/pap-secrets
#
# This is a pap-secrets file to be used with the AUTO_PPP function of
# mgetty. mgetty-0.99 is preconfigured to startup pppd with the login option
# which will cause pppd to consult /etc/passwd (and /etc/shadow in turn)
# after a user has passed this file. Don't be disturbed therefore by the fact
# that this file defines logins with any password for users. /etc/passwd
# (again, /etc/shadow, too) will catch passwd mismatches.
#
# This file should block ALL users that should not be able to do AUTO_PPP.
# AUTO_PPP bypasses the usual login program so it's necessary to list all
# system userids with regular passwords here.
#
# ATTENTION: The definitions here can allow users to login without a
# password if you don't use the login option of pppd! The mgetty Debian
# package already provides this option; make sure you don't change that.

# INBOUND connections

# Every regular user can use PPP and has to use passwords from /etc/passwd
*       hostname        ""      *

# UserIDs that cannot use PPP at all. Check your /etc/passwd and add any
# other accounts that should not be able to use pppd!
guest   hostname        "*"     -
master  hostname        "*"     -
root    hostname        "*"     -
support hostname        "*"     -
stats   hostname        "*"     -

# OUTBOUND connections

# Here you should add your userid password to connect to your providers via
# PAP. The * means that the password is to be used for ANY host you connect
# to. Thus you do not have to worry about the foreign machine name. Just
# replace password with your password.
# If you have different providers with different passwords then you better
# remove the following line.

        *       password

I have commented out the two lines added in ‘chap-secrets’ which now contains:

# Secrets for authentication using CHAP
# client        server  secret                  IP addresses
# 3gppp raspberrypi     password        *
# raspberrypi   3gppp   password        *

It was easier to understand how to uncomment the ‘+pap’ line from /etc/ppp/options so I did that.

When I ran ‘sudo pon’ I got this:

pi@raspberrypi:~ $ sudo pon
/usr/sbin/pppd: The remote system (3gppp) is required to authenticate itself
/usr/sbin/pppd: but I couldn't find any suitable secret (password) for it to use to do so.
pi@raspberrypi:~ $

As a guess I then inserting the line ‘+pap’ above the username and password in ‘provider’ and then ran ‘sudo pon’ but got the same result.

ugh!
Okay, try this …
edit ‘/etc/ppp/options’ again …
find '#name ’ and change to ‘name o2web’
edit ‘/etc/ppp/pap-secrets’
comment out ‘* password’
add line ‘o2web * password’ - [tab] spacing between each.

rerun ‘sudo pon’

thanks

Ok:

I edited /etc/ppp/options’, found '#name’ and changed it to ‘name o2web’

I edited ‘/etc/ppp/pap-secrets’ and commented out ‘* password’.

‘/etc/ppp/pap-secrets’ now says:

#
# /etc/ppp/pap-secrets
#
# This is a pap-secrets file to be used with the AUTO_PPP function of
# mgetty. mgetty-0.99 is preconfigured to startup pppd with the login option
# which will cause pppd to consult /etc/passwd (and /etc/shadow in turn)
# after a user has passed this file. Don't be disturbed therefore by the fact
# that this file defines logins with any password for users. /etc/passwd
# (again, /etc/shadow, too) will catch passwd mismatches.
#
# This file should block ALL users that should not be able to do AUTO_PPP.
# AUTO_PPP bypasses the usual login program so it's necessary to list all
# system userids with regular passwords here.
#
# ATTENTION: The definitions here can allow users to login without a
# password if you don't use the login option of pppd! The mgetty Debian
# package already provides this option; make sure you don't change that.

# INBOUND connections

# Every regular user can use PPP and has to use passwords from /etc/passwd
*       hostname        ""      *

# UserIDs that cannot use PPP at all. Check your /etc/passwd and add any
# other accounts that should not be able to use pppd!
guest   hostname        "*"     -
master  hostname        "*"     -
root    hostname        "*"     -
support hostname        "*"     -
stats   hostname        "*"     -

# OUTBOUND connections

# Here you should add your userid password to connect to your providers via
# PAP. The * means that the password is to be used for ANY host you connect
# to. Thus you do not have to worry about the foreign machine name. Just
# replace password with your password.
# If you have different providers with different passwords then you better
# remove the following line.

#       *       password
o2web   *       password

I re-ran ‘sudo pon’ and got:

pi@raspberrypi:~ $ sudo pon
/usr/sbin/pppd: The remote system (3gppp) is required to authenticate itself
/usr/sbin/pppd: but I couldn't find any suitable secret (password) for it to use to do so.
pi@raspberrypi:~ $

Sorry this is being such a nuisance!

no worries.
Data only services in the States do not require auth so I haven’t had to reference it in a long time.

A couple other things you can try;

  1. shutdown, pull power for count of ~10, apply power to reboot. rerun ‘sudo pon’
    OR
  2. in ‘/etc/ppp/peers/provider’

uncomment ‘#noauth
comment ‘user …’ | ‘password…’ | ‘passive’
comment ‘+pap’ in ‘/etc/ppp/options’
rerun ‘sudo pon’

  • I know it appears that O2 wants PAP Auth but maybe it’s worth a try.
    OR
    If still unsuccessful … uninstall the entire sixfab package, reboot and reinstall making sure that you run from your /home/pi/ directory and follow the instructions exactly.
    There’s still the question as to why providers, chat-connect/disconnect had to be copied to their applicable folders. Make sure root owns these files after install too.

If you’re interested in raeding about PPP have a look here: https://www.tldp.org/HOWTO/PPP-HOWTO/

Post back and let us know if any of this worked!?

thanks

Ok, I shutdown the Pi and then powered it off for a generous count of ten and then re-powered it back on.

‘sudo pon’ again gave me:

pi@raspberrypi:~ $ sudo pon
/usr/sbin/pppd: The remote system (3gppp) is required to authenticate itself
/usr/sbin/pppd: but I couldn't find any suitable secret (password) for it to use to do so.
pi@raspberrypi:~ $

I therefore uncommented #noauth

I may have got this wrong but in that file I commented the ‘user’ line and the password’ line but I can’t see a ‘passive’ line so I ignored this. The ‘provider’ file now looks like this:

# /etc/ppp/peers/provider
/dev/ttyUSB3 115200
# The chat script, customize your APN in this file
connect 'chat -s -v -f /etc/chatscripts/chat-connect -T mobile.o2.co.uk'
# 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
+pap
#user "o2web"
#password "password"
# 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

I commented ‘+pap’ in ‘/etc/ppp/options’ and re-ran ‘sudo pon’ but again got:

pi@raspberrypi:~ $ sudo pon
/usr/sbin/pppd: The remote system (3gppp) is required to authenticate itself
/usr/sbin/pppd: but I couldn't find any suitable secret (password) for it to use to do so.
pi@raspberrypi:~ $ 

Regarding re-installation when it didn’t work the first time I did a complete re-install, making sure that everything was exactly according to the instructions. I can do it all again but I’m thinking that this is really a Sixfab problem. (PM sent.)

‘+pap’ is active in your ‘provider’ file so comment this out.
I wanted you to get back to the point in time when you saw the modem debug and the LCP messages.
O2 wants PAP so you can comment out everything in ‘chap-secrets’.

I wanted to see the behavior using noauth.

PPP and associated config & script files are not a product of Sixfab. The install.sh is just a wrapper. There is something missing in the configuration parameters to properly tie provider + options + pap-secrets together.
It could also be a permissions problem.

The link provided earlier for PPP may have the answer.
I have SIMs from AT&T, Verizon, T-Mobile, Twilio & hologram and none of them require user/pwd so I can’t emulate your environment.

Maybe O2 has a support channel or configuration examples for PPP on Linux.

I’m sorry I can’t be of more help

if you do find a solution please post so we can all learn.

Thanks