repairUBUNTU

repair bash script for linux systems base on puppy adapted to ubuntu and some logon script for gprs modems
 pppd call gprs-connect-chat to run

#!/bin/sh
# $Id: gprs-connect-chat,v 1.2 2004/02/02 23:19:28 mcfrisk Exp $
#
# File: 
# /etc/ppp/peers/gprs-connect-chatmm
#
# Description: ( these work with Optus Australia too )
# chat script to open Radiolinjas GPRS service with GPRS phones. If ppp 
# negotiation stalls, try restarting the phone. To try with other GPRS 
# operator setting, change the PDP contex setting. The settings work with 
# most Ericsson models, but Nokia 8310 and 30 do not support QoS parameters 
# with AT commands, so just delete those lines and it'll work.
#
# Set PDP context CID=1, protocol=IP, APN=icecelular:
# AT+CGDCONT=1,"IP","preconnect","",0,0
#
# Set CID=1 QoS requirements from the network, not supported by Nokia:
# AT+CGQREQ=1,0,0,0,0,0
#
# Set CID=1 minimum acceptable QoS parameters, not supported by Nokia:
# AT+CGQMIN=1,0,0,0,0,0
#
# 'Call' CID=1 (activate PDP context one, perform GPRS attach):
# ATD*99***1#
#
# Some phones like the Orange SPV (yes, the Microsoft Smartphone) use this 
# dial string to start GPRS connection:
# ATD*99#
#
# The actual chat script:
exec chat \
TIMEOUT 10 \
ECHO ON \
ABORT '\nBUSY\r' \
ABORT '\nNO ANSWER\r' \
ABORT '\nNO CARRIER\r' \
ABORT '\nNO DIALTONE\r' \
ABORT '\nRINGING\r\n\r\nRINGING\r' \
'' \rAT \
TIMEOUT 12 \
SAY "Press CTRL-C to close the connection at any stage!" \
SAY "\ndefining PDP context...\n" \
OK              'AT+CPIN="1234"'                \
O              'AT+CGDCONT=1,"IP","preconnect"' \
ABORT '\nERROR\r' \
OK ATH \
OK             ATE1 \
OK AT+CSQ \
+CSQ       'ATD*99***1#' \
TIMEOUT 22 \
SAY "\nwaiting for connect...\n" \
CONNECT "" \
SAY "\nConnected." \
SAY "\nIf the following ppp negotiations fail,\n" \
SAY "try restarting the phone.\n"

next script is called gprs-disconnect-chatmm

#!/bin/sh
#
# $Id: gprs-disconnect-chat,v 1.3 2004/07/08 22:40:47 mcfrisk Exp $
#
# File:
# /etc/ppp/peers/gprs-disconnect-chatmm
#
# send break
exec /usr/sbin/chat -V -s -S \
ABORT "BUSY" \
ABORT "ERROR" \
ABORT "NO DIALTONE" \
SAY "\nSending break to the modem\n" \
"" "\K" \
"" "\K" \
"" "\K" \
"" "+++ATH" \
"" "+++ATH" \
"" "+++ATH" \
SAY "\nPDP context detached\n"

ċ
AppRun
(2k)
Stephen P,
May 11, 2012, 7:46 PM
Comments