' **********************************************************************
' * Script name:   Ignition_Test                                       *
' * Description:   The device sends the UDP messages when inginiton is *
' *                on and when ignition is off                         *
' *                It is not include ignition dbounce                  *
' *                The device will send the message immediately when   *
' *                ignition change its states (on/off)                 *
' * Responsible:   Ramiro Sanchez                                      *
' * Date:          05/20/2008                                          *
' **********************************************************************

' --------------------------------------------------------------------
' General configuration
' --------------------------------------------------------------------
AT&F
AT+GSN
AT$PKG?
AT$MDMID?
at+cgatt=0
at+cgdcont=1,"IP","internet3.voicestream.com"
at$friend=1,1,"209.42.60.137"
at$udpapi=,1720

' --------------------------------------------------------------------
'Ignition on
' --------------------------------------------------------------------
at$event=10,0,7,1,1
at$event=10,3,40,10,3674318
at$event=10,3,60,10,3674318

' --------------------------------------------------------------------
'Ignition off
' --------------------------------------------------------------------
at$event=11,0,7,0,0
at$event=11,3,40,11,3674318
at$event=11,3,60,11,3674318

' --------------------------------------------------------------------
'Periodic report
' --------------------------------------------------------------------
at$event=12,1,12,1,1
at$event=12,3,60,12,3674318

at+cgatt=1
at$areg=2

at&w