Exemplo n.º 1
0
            exitLoop = 0
        
    DEBUG.sendMsg("\r\nConnected to network\r\n",RUN_MODE)

    MOD.watchdogReset()

    #Setup SMS         
    ATC.configSMS()

    #Send SMS
    #Uncomment if SIM card is provisioned for SMS
    #ATC.sendSMS("GPSDemo application is running",myApp.SMS,ATC.properties.CMD_TERMINATOR,3,180)

    #Init GPRS
    #Pass in: PDP Index, APN
    ATC.initGPRS('1', myApp.APN, myApp.GPRS_USERID, myApp.GPRS_PASSWORD, RUN_MODE)
    
    #Initalize CW20 Receiver
    DEBUG.sendMsg("Initialize CW20 GPS Module\r\n",RUN_MODE)
    CW20.initGPS('9600','8N1')
    
    #Update Network Information
    res = ATC.getNetworkInfo()

    # Start timeout timer            
    timerB = timers.timer(0)
    timerB.start(1)
    
    ping = 1    # <-- Exosite: initialize value
    
    # Loop forever, without this loop the script would run once and exit script mode.  On reboot or power-on the script would run once more