1#!/bin/sh 2chat -t 100 -v '' 'ATZ' \ 3 'OK' 'AT+CPIN=XXXX' 4 5# Although the modem says ok, it takes a few seconds to negotiate the 6# pin. 7sleep 10 8 9chat -t 100 -v '' 'AT+CGDCONT=1,"IP","internet"' \ 10 'OK' 'ATDT*99***1#' \ 11 TIMEOUT 120 \ 12 'CONNECT' '\c' 13 14# 'AT+CPMS?' 15# '+CPMS: "ME",0,100,"ME",0,100,"ME",0,100' 16# Hardware handshake 17# 'OK' 'AT&F &D2 &C1" 18# No answer no timeout 19# 'OK' 'ATS7=60 S30=0 S0=0" 20# Report signal quality. 21# 'OK' 'AT+CSQ' 22