' **********************************************************************
' * Script name:   Unsent message                                      *
' * Description:   The device sends the messages to the serial port    *
' *                when the buffer has 20 msg, 50-60 and more than 100 *
' * Responsible:   Ramiro Sanchez                                      *
' * Date:          02/23/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"
at$udpapi=,1720

at$stoatev=1,at$msgsnd=0,"buffer has 20 msg"
at$stoatev=2,at$msgsnd=0,"buffer has between 50 msg - 60 msg"
at$stoatev=3,at$msgsnd=0,"buffer has more than 100 msg"

AT$EVENT=7,1,12,1,1
AT$EVENT=7,3,40,7,3674318

AT$EVENT=8,1,12,1,1
AT$EVENT=8,3,40,8,3674318

AT$EVENT=9,1,12,1,1
AT$EVENT=9,3,40,9,3674318

AT$EVENT=10,1,12,1,1
AT$EVENT=10,3,40,10,3674318

AT$EVENT=11,1,12,1,1
AT$EVENT=11,3,40,11,3674318

AT$EVENT=12,1,12,1,1
AT$EVENT=12,3,40,12,3674318

AT$EVENT=13,1,12,1,1
AT$EVENT=13,3,40,13,3674318

AT$EVENT=14,1,12,1,1
AT$EVENT=14,3,40,14,3674318

AT$EVENT=15,1,12,1,1
AT$EVENT=15,3,40,15,3674318

AT$EVENT=16,1,12,1,1
AT$EVENT=16,3,40,16,3674318

AT$EVENT=17,1,12,1,1
AT$EVENT=17,3,40,17,3674318
AT$EVENT=17,3,60,17,3674318

AT$EVENT=21,0,60,20,20
AT$EVENT=21,3,44,1,0

AT$EVENT=22,0,60,50,60
AT$EVENT=22,3,44,2,0

AT$EVENT=23,0,60,100,10000
AT$EVENT=23,3,44,3,0

AT$MSGLOGRD?
AT$MSGLOGEN=1

at+cgatt=1

at$areg=2

at&w


