# 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" '' AT TIMEOUT 240 OK ATE0 OK ATV1 #OK AT+CGQREQ=1,0,0,0,0,0 #OK AT+CGQMIN=1,0,0,0,0,0 # Setting 3G only mode: #OK at$nwrat=2,2 # Setting 3G preferred mode: OK at$nwrat=0,2 # Check Signal Strength (value 0..31 or 99 if no network) ABORT "+CSQ: 99,99" OK at+csq # Define an APN/Connection, this can be connected with atdt*99***1# or atdt*99# OK AT+CGDCONT=1,"IP","internet" # Dial the number passed in from pppd (i.e. *99#) OK ATDT\T TIMEOUT 30 CONNECT ""