# Boilerplate
#
        ABORT           'BUSY'
        ABORT           'NO ANSWER'
        ABORT           'NO CARRIER'
        ABORT           'NO DIALTONE'
        ABORT           '\nRINGING\r\n\r\nRINGING\r'
        SAY             "GPRS modem init: press <ctrl>-C to disconnect"

# Wake up the modem
#
        TIMEOUT         5
        ''              'AT'
        OK-ATQ0V1&C1-OK 'ATE1'
        ABORT           'ERROR'
        TIMEOUT         12

# Reset to the factory defaults
# Also, use '+CME ERROR' codes for ME errors, 'ERROR' for syntax errors
#
        OK              'AT&F'
        OK              'AT+CGDCONT=1,"IP","Your-GPRS-APN","0.0.0.0",0,0'
        SAY             "\n + defining PDP context"

# Attach to the GPRS service.  Strictly, we don't need this step,
# as AT+CGDATA will do it for us, but doing it explicitly makes it
# a little easier to debug.
#
        TIMEOUT         45
        OK              'AT+CGATT=1'
        SAY             "\n + attaching to GPRS"

# Enter data state
        OK              'ATD*99#'
        SAY             "\n + requesting data connection"
        CONNECT         ''
        SAY             "\n + connected"
