' **********************************************************************
' * Script name:   Message format                                      *
' * Description:   The device sends the UDP messages to the server     *
' *                with input 1 (format 3674318)                       *
' *                With inside geofence 3 (format 33161215)            *
' *                With inside geofence 1 (format 16269310)            *
' *                With outside geofence 1 (format 2147483662)         *
' *                With inside geofence 2 (format 2153775247)          *
' *                With outside geofence 2 (format 2149613518)         *
' * Responsible:   Ramiro Sanchez                                      *
' * Date:          02/28/2011                                          *
' **********************************************************************
' --------------------------------------------------------------------
' 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", 1735,3
at$udpapi=,1720

' --------------------------------------------------------------------
' Send UPD message with different formats
' --------------------------------------------------------------------
at$event=10,0,17,5,255
at$event=10,3,40,10,3674318
at$event=10,3,60,10,3674318

at$event=11,0,17,10,255
at$event=11,3,40,11,33161215
at$event=11,3,60,11,3674318

at$event=12,0,17,15,255
at$event=12,3,40,12,16269310
at$event=12,3,60,12,3674318

at$event=13,0,17,20,255
at$event=13,3,128,0,-157
at$event=13,3,128,1,-156
at$event=13,3,128,2,-155
at$event=13,3,128,3,-154
at$event=13,3,128,4,-105
at$event=13,3,128,5,-106
at$event=13,3,128,6,-150
at$event=13,3,128,7,-101
at$event=13,3,128,8,-100
at$event=13,3,128,9,-101
at$event=13,3,40,13,2147483662
at$event=13,3,60,13,3674318

'Variables
at$event=14,0,17,25,255
at$event=14,3,128,0,-157
at$event=14,3,128,1,-156
at$event=14,3,128,2,-155
at$event=14,3,128,3,-154
at$event=14,3,128,4,-105
at$event=14,3,128,5,-106
at$event=14,3,128,6,-150
at$event=14,3,128,7,-101
at$event=14,3,128,8,-100
at$event=14,3,128,9,-101
at$event=14,3,40,14,2153775247
at$event=14,3,60,14,3674318

'Accelerometer
at$event=15,0,17,30,255
at$event=15,3,40,15,2149613518
at$event=15,3,60,15,3674318

at+cgatt=1
at$areg=2
at&w

