' **********************************************************************
' * Script name:   Ignition_w_dbnc_Test                                *
' * Description:   The device sends the UDP messages when inginiton is *
' *                on and when ignition is off                         *
' *                It is include ignition dbounce                      *
' *                The device will send the message when the state of  *
' *                ignition is x seconds (defined with at$igndbnc) in  *
' *                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

at$igndbnc=4

' --------------------------------------------------------------------
'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

at+cgatt=1
at$areg=2

at&w