Skip to content

Instantly share code, notes, and snippets.

@ulinder
Last active May 26, 2021 11:57
Show Gist options
  • Select an option

  • Save ulinder/c97f795a465ea360ec438dbb80801fd2 to your computer and use it in GitHub Desktop.

Select an option

Save ulinder/c97f795a465ea360ec438dbb80801fd2 to your computer and use it in GitHub Desktop.
Config of ppp for Swedish Tele2 4G
May 26 12:32:45 vanpi kernel: [ 17.568286] Bluetooth: HCI UART driver ver 2.3
May 26 12:32:45 vanpi kernel: [ 17.568308] Bluetooth: HCI UART protocol H4 registered
May 26 12:32:45 vanpi kernel: [ 17.568503] Bluetooth: HCI UART protocol Three-wire (H5) registered
May 26 12:32:45 vanpi kernel: [ 17.569446] Bluetooth: HCI UART protocol Broadcom registered
May 26 12:32:46 vanpi kernel: [ 17.902685] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
May 26 12:32:46 vanpi kernel: [ 17.902700] Bluetooth: BNEP filters: protocol multicast
May 26 12:32:46 vanpi kernel: [ 17.902730] Bluetooth: BNEP socket layer initialized
May 26 12:32:49 vanpi kernel: [ 21.539112] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
May 26 12:33:32 vanpi kernel: [ 51.736211] PPP generic driver version 2.4.2
May 26 12:33:32 vanpi pppd[654]: pppd 2.4.7 started by pi, uid 0
May 26 12:33:33 vanpi chat[658]: abort on (BUSY)
May 26 12:33:33 vanpi chat[658]: abort on (VOICE)
May 26 12:33:33 vanpi chat[658]: abort on (NO CARRIER)
May 26 12:33:33 vanpi chat[658]: abort on (NO DIALTONE)
May 26 12:33:33 vanpi chat[658]: abort on (NO DIAL TONE)
May 26 12:33:33 vanpi chat[658]: report (CONNECT)
May 26 12:33:33 vanpi chat[658]: timeout set to 6 seconds
May 26 12:33:33 vanpi chat[658]: send (ATQ0^M)
May 26 12:33:33 vanpi chat[658]: timeout set to 3 seconds
May 26 12:33:33 vanpi chat[658]: expect (OK)
May 26 12:33:33 vanpi chat[658]: ^M
May 26 12:33:33 vanpi chat[658]: OK
May 26 12:33:33 vanpi chat[658]: -- got it
May 26 12:33:33 vanpi chat[658]: send (ATQ0 V1 E1 S0=0^M)
May 26 12:33:33 vanpi chat[658]: expect (OK)
May 26 12:33:33 vanpi chat[658]: ^M
May 26 12:33:33 vanpi chat[658]: ^M
May 26 12:33:33 vanpi chat[658]: OK
May 26 12:33:33 vanpi chat[658]: -- got it
May 26 12:33:33 vanpi chat[658]: send (AT+CGDCONT=1,"IP","4g.tele2.se"^M)
May 26 12:33:34 vanpi chat[658]: expect (OK)
May 26 12:33:34 vanpi chat[658]: ^M
May 26 12:33:34 vanpi chat[658]: AT+CGDCONT=1,"IP","4g.tele2.se"^M^M
May 26 12:33:34 vanpi chat[658]: OK
May 26 12:33:34 vanpi chat[658]: -- got it
May 26 12:33:34 vanpi chat[658]: send (ATDT*99***1#^M)
May 26 12:33:34 vanpi chat[658]: expect (CONNECT)
May 26 12:33:34 vanpi chat[658]: ^M
May 26 12:33:34 vanpi chat[658]: ATDT*99***1#^M^M
May 26 12:33:34 vanpi chat[658]: CONNECT
May 26 12:33:34 vanpi chat[658]: -- got it
May 26 12:33:34 vanpi chat[658]: send (^M)
May 26 12:33:34 vanpi pppd[654]: Serial connection established.
May 26 12:33:34 vanpi pppd[654]: Using interface ppp0
May 26 12:33:34 vanpi pppd[654]: Connect: ppp0 <--> /dev/ttyUSB0
May 26 12:33:54 vanpi kernel: [ 73.757550] tun: Universal TUN/TAP device driver, 1.6
May 26 12:34:05 vanpi pppd[654]: LCP: timeout sending Config-Requests
May 26 12:34:05 vanpi pppd[654]: Connection terminated.
May 26 12:34:06 vanpi pppd[654]: Modem hangup
May 26 12:34:37 vanpi chat[691]: abort on (BUSY)
May 26 12:34:37 vanpi chat[691]: abort on (VOICE)
May 26 12:34:37 vanpi chat[691]: abort on (NO CARRIER)
May 26 12:34:37 vanpi chat[691]: abort on (NO DIALTONE)
May 26 12:34:37 vanpi chat[691]: abort on (NO DIAL TONE)
May 26 12:34:37 vanpi chat[691]: report (CONNECT)
May 26 12:34:37 vanpi chat[691]: timeout set to 6 seconds
May 26 12:34:37 vanpi chat[691]: send (ATQ0^M)
May 26 12:34:37 vanpi chat[691]: timeout set to 3 seconds
May 26 12:34:37 vanpi chat[691]: expect (OK)
May 26 12:34:40 vanpi chat[691]: alarm
May 26 12:34:40 vanpi chat[691]: Failed
# /etc/chatscripts/pap
# You can use this script unmodified to connect to sites which allow
# authentication via PAP, CHAP and similar protocols.
# This script can be shared among different pppd peer configurations.
# To use it, add something like this to your /etc/ppp/peers/ file:
#
# connect "/usr/sbin/chat -v -f /etc/chatscripts/pap -T PHONE-NUMBER"
# user YOUR-USERNAME-IN-PAP-SECRETS
# noauth
# Uncomment the following line to see the connect speed.
# It will be logged to stderr or to the file specified with the -r chat option.
#REPORT CONNECT
ABORT BUSY
ABORT VOICE
ABORT "NO CARRIER"
ABORT "NO DIALTONE"
ABORT "NO DIAL TONE"
REPORT CONNECT
TIMEOUT 6
"" ATQ0
# "OK" "AT"
# "OK-AT-OK" "ATZ"
TIMEOUT 3
# "OK" "ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0" <-- tried before but worked even less
"OK" "ATQ0 V1 E1 S0=0"
# "OK" AT+CGDCONT=1,"IP","internet.tele2.se","0.0.0.0",0,0 <-- previous attempt
# "OK" AT+CGDCONT=1,"IP","4g.tele2.se","0.0.0.0",0,0 <-- previous attempt
# "OK" AT+CGDCONT=1,"IP","internet.tele2.se" <-- previous attempt
"OK" AT+CGDCONT=1,"IP","4g.tele2.se"
"OK" "ATDT*99***1#"
CONNECT ""
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment