-
-
Save gdamjan/1424938 to your computer and use it in GitHub Desktop.
connect to 3G from command line (with pppd and chat)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# file: /etc/ppp/peers/3g | |
# usage: pppd call 3g | |
connect '/etc/ppp/peers/dial -V -Upublicinternet -T*99***1#' | |
user internet | |
password internet | |
noauth | |
usepeerdns | |
noipdefault | |
defaultroute | |
nodetach | |
debug |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/sbin/chat -f | |
# file: /etc/ppp/peers/dial | |
# save and make executable -- 'chmod +x /etc/ppp/peers/dial' | |
# Usage (in pppd config): | |
# connect '/etc/ppp/peers/dial -V -U<APN> -T<dial number>' | |
ABORT "BUSY" | |
ABORT "RING" | |
ABORT "NO CARRIER" | |
ABORT "NO DIALTONE" | |
ABORT "ERROR" | |
ABORT "NO ANSWER" | |
REPORT CONNECT | |
# initialize | |
TIMEOUT 10 | |
"" AT | |
OK ATZ | |
OK AT+CGDCONT=1,"IP","\U" | |
# dial | |
TIMEOUT 40 | |
OK 'ATD\T' | |
CONNECT \c |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Make sure your sim card in the 3G modem doesn't require a pin -- alternatively add the pin to the dial file, something like
AT+CPIN=1234