SkyPatrol Event Cookbook-Revision 1.01
Transcript of SkyPatrol Event Cookbook-Revision 1.01
-
7/27/2019 SkyPatrol Event Cookbook-Revision 1.01
1/52
CookBookTT8750CB001
SkyPatrolTT8750 Tracker Event Cook
Revision 1.01
-
7/27/2019 SkyPatrol Event Cookbook-Revision 1.01
2/52
TT8750 Cookbook
Ver. 1.01
Table of Contents
OBJECTIVE .............................................................................................................................3
SUPPORTED DEVICES..........................................................................................................3
EQUIPMENT NEEDED.......................................................................................................... 3
PROCEDURES.........................................................................................................................4
1. SKYPATROL TT8750TEST WIRING DIAGRAMS...............................................................52. MOBILE TRACKERLEDDEFINITIONS..............................................................................63. PULSE EVENT CONFIGURATION .....................................................................................104. MAX SPEED EXCEEDED REPORTING CONFIGURATION...................................................145. TIME-DISTANCE REPORTING CONFIGURATION ..............................................................186. GEO-FENCING CONFIGURATION.....................................................................................287. POWERSAVE CONFIGURATION ......................................................................................358. GPSIDLE TRIGGER........................................................................................................389. GPSINVISIBLE TRIGGER................................................................................................3910. PANIC BUTTON SAMPLE DESIGN................................................................................40
11. DOORSWITCH DETECT TO SMSMESSAGE ...............................................................4412. EVENTS TO DETECT PRIMARY POWER LOSS ................................................................4613. EVENTS THAT ARE BIASED ON GPIO1($IOPULUP).................................................48
-
7/27/2019 SkyPatrol Event Cookbook-Revision 1.01
3/52
TT8750 Cookbook
Ver. 1.01
TT8750CB001 Page 3
Objective
The intent of this document is to provide information that details the steps necessary toconfigure the Mobile Tracker LED interface.
Supported devices
GSM2208 MT-G TT8540 TT8740 TT8750
Note: Some features may not be available on some hardware or firmwarerevisions. Please consult the applicable hardware documentation and firmwarerelease notes.
Equipment Needed
In this example the requirements are:
An SkyPatrol series modem
A notebook or desktop computer with any version of MicrosoftWindows that has the HyperTerminal communications program. Ifthis hardware is not available, the user could use a DOS terminalemulation program or DUMB ASCII terminal.
-
7/27/2019 SkyPatrol Event Cookbook-Revision 1.01
4/52
TT8750 Cookbook
Ver. 1.01
TT8750CB001 Page 4
Procedures
!
Please note that the following event commands are
examples only. When implementing, use thecommand AT$EVENT? to query the event table anduse the next sequential event group number. Failureto do so could potentially cause unpredictable results.
Some of these examples require that communication is established with a remoteserver. Read and understand the appropriate Quick Start Guide for your deviceprior to attempting these examples. Always verify that the local serial connectionsession is actually established with the SkyPatrol modem.
-
7/27/2019 SkyPatrol Event Cookbook-Revision 1.01
5/52
TT8750 Cookbook
Ver. 1.01
TT8750CB001 Page 5
1. SkyPatrol TT8750 Test Wiring Diagrams.
a. The following diagrams detail additional wiring that will be required tovalidate some of these examples.
i. MT-G
ii. MT-GL
-
7/27/2019 SkyPatrol Event Cookbook-Revision 1.01
6/52
TT8750 Cookbook
Ver. 1.01
TT8750CB001 Page 6
iii. MT-L / MT- G
2. Mobile Tracker LED Definitions
a. There are a total of three LEDs on the Mobile Trackers.
-
7/27/2019 SkyPatrol Event Cookbook-Revision 1.01
7/52
TT8750 Cookbook
Ver. 1.01
TT8750CB001 Page 7
The power LED reflects the state of the power supplied to the unit.The user cannot change the power LED functionality.
The other two LEDs are user-configurable and can be changed fromthe factory default definitions.
The following displays the factory default settings.
Power LED display:o LED ON when power line connected to the deviceo LED OFF when the device is in low power mode or power is
disconnected from the unit
Registration LED display (USR1):o LED OFF when unit is not registered or not trying to registero LED blinking when unit is trying to register with the network
o LED solid ON when GSM is connected
GPS Fix LED display (USR2):o LED OFF when a GPS fix has not been acquiredo LED solid ON when GPS fix has been acquired
The LEDs on the Mobile Trackers are controlled by the event processingcapability provided in the AT command structure.
The following AT command settings provide an example of the use of
event processing to reflect registration and GPS statuses. This exampleuses the actual I/O line 6 (GPIO6 / USR1) for the Registration LED. Theother user configurable LED uses I/O line 7 (GPIO7 / USR2).
AT$EVENT=1,0,27,1,1
GPS status ending value of 1GPS status beginning value of 1Monitor GPS StatusInput transition eventEvent group 1
AT$EVENT=1,3,22,0,0
N/AN/ASet GPIO line #7 (USR2) to highOutput eventEvent group 1
-
7/27/2019 SkyPatrol Event Cookbook-Revision 1.01
8/52
TT8750 Cookbook
Ver. 1.01
TT8750CB001 Page 8
AT$EVENT=2,0,27,0,0
GPS status ending value of 0GPS status beginning value of 0Monitor GPS Status
Input transition eventEvent group 2
AT$EVENT=2,3,14,0,0
N/AN/ASet GPIO line #7 (USR2) to lowOutput eventEvent group 2
AT$EVENT=3,0,9,2,4
+CREG ending value of 4
+CREG starting value of 2Monitor +CREG valueInput transition eventEvent group 3
AT$EVENT=3,3,37,1,0
Flash foreverFlash at second intervalsFlash GPIO line #6 (USR1)Output eventEvent group 3
AT$EVENT=4,0,9,5,5
+CREG ending value of 5 Registered onnetwork, Roaming+CREG starting value of 5 Registered onnetwork, RoamingMonitor +CREG valueInput transition eventEvent group 4
AT$EVENT=4,3,21,0,0
N/AN/ASet GPIO line #6 (USR1) to HighOutput event
Event group 4
-
7/27/2019 SkyPatrol Event Cookbook-Revision 1.01
9/52
TT8750 Cookbook
Ver. 1.01
TT8750CB001 Page 9
AT$EVENT=5,0,9,0,0
+CREG ending value of 0 Not Registered+CREG starting value of 0 Not RegisteredMonitor +CREG value
Input transition eventEvent group 5
AT$EVENT=5,3,13,0,0
N/AN/ASet GPIO line #6 (USR1) to LowOutput eventEvent group 5
AT$EVENT=6,0,9,1,1
+CREG ending value of 1 Registered on
home network+CREG starting value of 11 Registered onhome networkMonitor +CREG valueInput transition eventEvent group 6
AT$EVENT=6,3,21,0,0
N/AN/ASet GPIO line #6 (USR1) to HighOutput eventEvent group 6
-
7/27/2019 SkyPatrol Event Cookbook-Revision 1.01
10/52
TT8750 Cookbook
Ver. 1.01
TT8750CB001 Page 10
Query the EVENT table:
AT$EVENT?
The table should reflect the following:
$EVENT: evgp evtyp evcat p1 p21A 0 27 1 11B 3 22 0 02A 0 27 0 02B 3 14 0 03A 0 9 2 43B 3 37 1 04A 0 9 5 54B 3 21 0 05A 0 9 0 05B 3 13 0 0
6A 0 9 1 16B 3 21 0 0
Results:
GPIO pin #6 (USR1) should flash at second intervals until device isregistered on home or roaming networks. Once registered, GPIO pin #6(USR1) will go high. If registration status is lost, the I/O pin will flash.
3. Pulse Event Configuration
Note: In the following discussion, OFF equals a signal low (0 Vdc) state and ONequals a signal High state.
a. The Skypatrol product line contains detailed event processing capabilityvia the AT command structure. The modem allows a user to toggle theGPIO line to an On/Off state. The I/O line can pulse in multiples ofquarter second (250 ms) increments. The user can select ON time andOFF time (in multiple of 250 ms increments) as desired.
b. Parameter 1 defines the flash pattern of the LED:The upper 16 bits (bits 16 31) are defined as OFF time while the
lower 16 bits (bits 0 15) are defined as ON time. If the OFF time isnot specified (set to 0), then ON time will be the same as OFF time.
-
7/27/2019 SkyPatrol Event Cookbook-Revision 1.01
11/52
TT8750 Cookbook
Ver. 1.01
TT8750CB001 Page 11
c. Parameter 2 defines the toggle count.
A value of 0 fortoggle count means the I/O will be toggled forever.A user can select the number of times the pattern is toggled starting
from the current I/O state. The user can select the final state of the I/Oline to be either same as the current state or opposite of the currentstate. To select the final state to be the same as current state, thetoggle count should be set to an even number. To select the final stateto be opposite of the current state, the toggle count should be set to anodd number.
d. The following AT command settings provide an example of the use ofevent processing to toggle an output line based on an input event:
Step 1 - Verify GPIO3 is set to output and GPIO1 is set to input.
a. Send the following command to the modem AT$IOCFG?b. It should return with something similar to $IOCFG: 11111001 11111001c. This is the current input/output state of the GPIO pins.d. The GPIO1 bit will need to set to an output and GPIO3 bit set to an
output.e. The bits that will be changed are 1x0xxxxx where x is bits that are left
alone. 1 = input, 0 = output.f. If AT$IOCFG returned the following $IOCFG: 11111001 11111001
Then the command that will be sent is AT$IOCFG=11011001
Example 1:
AT$EVENT=10,0,0,1,1
Ending range of 1 (high)Starting range of 1 (high)Activity on I/O line #1 based on rangeInput transition eventEvent group 10
AT$EVENT=10,3,34,1,8
(Parameter 2) Pulse 8 times before returning(Parameter 1) Pulse at second intervalsPulse GPIO #3 based on Parm1 and Parm2valuesOutput eventEvent group 10
-
7/27/2019 SkyPatrol Event Cookbook-Revision 1.01
12/52
TT8750 Cookbook
Ver. 1.01
TT8750CB001 Page 12
Query the EVENT table:
AT$EVENT?
The table should reflect the following:
$EVENT: evgp evtyp evcat p1 p210A 0 0 1 110B 3 34 1 8
AT$EVTEST (to test this example):
Note: It is the transition from a 0 to a 1 that causes event 9 to fire. Inorder to perform the test again, both EVTEST commands need to besent.
AT$IOGP3=0 Set GPIO3 to be in Low state
AT$EVTEST=0,0
Create a low input signalEvent category 0 (Input line 1)
AT$EVTEST=0,1
Create a high input signalEvent category 0 (Input line 1)
Results:
GPIO pin #3 will toggle 8 times (4 high and 4 low state transitions) at second intervals each time the AT$EVTEST sequence above isissued.
Note: If Example 1 was entered into the modem, event 10 will need tobe deleted prior to performing example 2. Send the followingcommand to delete existing event 10. AT$EVDEL=10
-
7/27/2019 SkyPatrol Event Cookbook-Revision 1.01
13/52
TT8750 Cookbook
Ver. 1.01
TT8750CB001 Page 13
Example 2:
AT$EVENT=10,0,0,1,1
Ending range of 1 (high)
Starting range of 1 (high)Activity on I/O line #1 based on rangeInput transition eventEvent group 10
AT$EVENT=10,3,34,65539,8
(Parameter 2) Pulse 5 times before returning(Parameter 1) Pulse at second intervalsand second at high transitionPulse GPIO #3 based on Parm1 and Parm2valuesOutput event
Event group 10
Query the EVENT table:
AT$EVENT?
The table should reflect the following:
$EVENT: evgp evtyp evcat p1 p210A 0 0 1 110B 3 34 65539 5
Note: The value 65539 for Parm1 is derived as follows:
Bits 0 15 describe the High state for the IO. In this example,we have selected the IO to remain in high state for secondsor 0x0003 (hex) as the lower 16 bits.
Bits 16 31 describe the Low state for the IO. In this example,we have selected the IO to remain in low state for second or0x0001 (hex) as the upper 16 bits.
When we combine the upper and lower 16 bits, we get:0x00010003 in hex or 65539 in decimal.
AT$EVTEST (to test this example):
-
7/27/2019 SkyPatrol Event Cookbook-Revision 1.01
14/52
-
7/27/2019 SkyPatrol Event Cookbook-Revision 1.01
15/52
TT8750 Cookbook
Ver. 1.01
TT8750CB001 Page 15
Results:
Parameter 2 Decode is as follows:
Param2 decode = 4350Bit 00 > ASCIIBit 01 > PARAM1 11 bytes ASCIIBit 02 > MDMID added 22 bytes ASCIIBit 03 > GPIO 6 bytes ASCIIBit 04 > A/D1 5 bytes ASCIIBit 05 > A/D2 5 bytes ASCIIBit 06 > Store messages if out of GPRS coverageBit 07 > Input Event Number 3 bytes ASCIIBit 08 >Bit 09 >
Bit 10 >Bit 11 >Bit 12 > RMC NMEA Data max 80 bytes ASCIIBit 13 >Bit 14 >Bit 15 >Bit 16 >Bit 17 >Bit 18 >Bit 19 >Bit 20 >
Bit 21 >
A GPS RMC NMEA message will be sent to the IP address (set byAT$FRIEND) and port number (set byAT$UDPAPI) every time
the device exceeds speed of 30 Knots. The device has to go belowthe set speed of 30 Knots in order to trigger the event again.
The output message format is generated based on the number4350 set in the secondAT$EVENT command.
Below is the example output that would be seen if the modem were
setup to report to the Enfora test server.
-
7/27/2019 SkyPatrol Event Cookbook-Revision 1.01
16/52
-
7/27/2019 SkyPatrol Event Cookbook-Revision 1.01
17/52
TT8750 Cookbook
Ver. 1.01
TT8750CB001 Page 17
UDP-API Header
Byte32
Byte33
Byte34
Byte35
Byte36
Byte37
Byte38
Byte39
Byte40
Byte41
Byte42
Byte43
Byte44
Byte45
Byte46
Byte47
20 20 20 20 20 20 20 20 20 37 20 20 20 20 20 20
User Specified Number (7) Modem ID
Byte48
Byte49
Byte50
Byte51
Byte52
Byte53
Byte54
Byte55
Byte56
Byte57
Byte58
Byte59
Byte60
Byte61
Byte62
Byte63
20 20 20 20 20 20 20 20 20 4D 54 5F 54 65 73 74
Modem ID continued (MT_Test)
Byte64
Byte65
Byte66
Byte67
Byte68
Byte69
Byte70
Byte71
Byte72
Byte73
Byte74
Byte75
Byte76
Byte77
Byte78
Byte79
20 66 39 2C 20 36 2C 20 31 37 34 38 20 31 37 34Mask comma Data spaceModem
IDcontinued GPIO
A/D 1 A/D 2
Byte80
Byte81
Byte82
Byte83
Byte84
Byte85
Byte86
Byte87
Byte88
Byte89
Byte90
Byte91
Byte92
Byte93
Byte94
Byte95
38 20 31 37 20 24 47 50 52 4D 43 2C 31 39 32 35A/D 2
continued
Input Event Number(17)
ASCII NMEA RMC message($GPRMC,192541.88,A,3301.5292,N,09642.5675,W, 31.8,006.1,210704,05 ,E*53)
Byte96
Byte97
Byte98
Byte99
Byte100
Byte101
Byte102
Byte103
Byte104
Byte105
Byte106
Byte107
Byte108
Byte109
Byte110
Byte111
34 31 2E 38 38 2C 41 2C 33 33 30 31 2E 35 32 39
ASCII NMEA RMC message continued
Byte
112
Byte
113
Byte
114
Byte
115
Byte
116
Byte
117
Byte
118
Byte
119
Byte
120
Byte
121
Byte
122
Byte
123
Byte
124
Byte
125
Byte
126
Byte
12732 2C 4E 2C 30 39 36 34 32 2E 35 36 37 35 2C 57
ASCII NMEA RMC message continued
Byte128
Byte129
Byte130
Byte131
Byte132
Byte133
Byte134
Byte135
Byte136
Byte137
Byte138
Byte139
Byte140
Byte141
Byte142
Byte143
2C 33 31 2E 38 2C 30 30 36 2E 31 2C 32 31 30 37
ASCII NMEA RMC message continued
Byte144
Byte145
Byte146
Byte147
Byte148
Byte149
Byte150
Byte151
Byte152
Byte153
Byte154
Byte155
Byte156
30 34 2C 30 35 2C 45 2A 35 33 0D 0A 00
ASCII NMEA RMC message continued
-
7/27/2019 SkyPatrol Event Cookbook-Revision 1.01
18/52
TT8750 Cookbook
Ver. 1.01
TT8750CB001 Page 18
5. Time-Distance Reporting Configuration
a. Type the following commands to send a GPS RMC NMEA message OTAto a remote Server when time and/or distance settings are violated. Users
must use Event Timer 1 ($EVTIM1) for minimum time and Event Timer 2($EVTIM2) for maximum time when setting up for this feature. The timeand/or distance feature is designed as described in the example tablebelow:
MinimumTime
(seconds)
MaximumTime
(seconds)
Distance
(meters)Comments
0 0 0 FEATURE DISABLED
0 0 100 GPS message sent every 100 meters
0 60 0 GPS message sent every 60 seconds
0 60 100
GPS message sent every 60 seconds if the vehiclehas not moved 100 meters. GPS messages will besent every 100 meters if the vehicle is moving andtraveling the distance of 100 meters in less than 60seconds. In short, message is sent upon expiration oftime or moving of distance whichever occurs first.
30 x 0 GPS message sent every 30 seconds (x = dont care)
30 0 100GPS message sent when the vehicle has moved 100meters and 30 seconds have elapsed.
30 60 100
GPS message sent every 60 seconds if the vehicle isidle and not moving or moving slowly. If the vehicleis moving, then GPS message will be sent when 30seconds have expired and 100 meters have been
moved.
!
Choose only one option, from options 1 6 below, using section asa reference.Before attempting another option delete the existing events byissuing the following commands:AT$EVDEL=12
AT$EVDEL=13
The following AT command settings provide examples of the use of eventprocessing to configure the Time and/or Distance feature.
-
7/27/2019 SkyPatrol Event Cookbook-Revision 1.01
19/52
TT8750 Cookbook
Ver. 1.01
TT8750CB001 Page 19
1. Send GPS message when a predefined distance is moved.
Minimum Time = 0Maximum Time = 0
Distance = z(z= 0 1000000 meters)
AT$EVENT=12,0,16,z,1000000
Should always be 1000000 (max distance)Replace z with actual distance to monitorMonitor Distance displaced valueInput transition eventEvent group 12
AT$EVENT=12,3,40,8,4350
OTA Message (ASCII RMC NMEA msg)User Specified number
Send OTA UDP MessageOutput eventEvent group 12
Results: A GPS RMC NMEA message will be sent to a remote userat every zmeters. The output message is described under
Section 7, Results.
2. Send GPS message when Maximum Time expires.
Minimum time = 0Maximum time = y(y= 0 604800 seconds)
Distance = 0
AT$EVTIM2=y (y= 0 604800 seconds)
AT$EVENT=12,1,13,1,1
Ending range of 1 (high)Starting range of 1 (high)Activate Timer 2 ($EVTIM2)Input occurrence eventEvent group 12
AT$EVENT=12,3,40,8,4350
OTA Message (ASCII RMC NMEA msg)User Specified numberSend OTA UDP MessageOutput eventEvent group 12
-
7/27/2019 SkyPatrol Event Cookbook-Revision 1.01
20/52
TT8750 Cookbook
Ver. 1.01
TT8750CB001 Page 20
Results: A GPS RMC NMEA message will be sent to a remote userat every ytime interval. The output message is described under
Section 7, Results.
3. Send GPS message when Minimum Time expires.
Minimum time = x(x= 0 604800 seconds)
Maximum time = 0Distance = 0
AT$EVTIM1=x (x= 0 604800 seconds)
AT$EVENT=12,1,12,1,1
Ending range of 1 (high)Starting range of 1 (high)
Activate Timer 2 ($EVTIM1)Input occurrence eventEvent group 12
AT$EVENT=12,3,40,8,4350
OTA Message (ASCII RMC NMEA msg)User Specified numberSend OTA UDP MessageOutput eventEvent group 12
Results: A GPS RMC NMEA message will be sent to a remote userat every xtime interval. The output message is described under
Section 7, Results.
-
7/27/2019 SkyPatrol Event Cookbook-Revision 1.01
21/52
TT8750 Cookbook
Ver. 1.01
TT8750CB001 Page 21
4. Send GPS message when Time OR Distance has elapsed.
Minimum time = 0Maximum time = y(y= 0 604800 seconds)
Distance = z(z= 0 1000000 meters)
AT$EVTIM2=y (y= 0 604800 seconds)
AT$EVENT=12,1,13,1,1
Ending range of 1 (high)Starting range of 1 (high)Activate Timer 2 ($EVTIM2)Input occurrence eventEvent group 12
AT$EVENT=12,3,43,2,0
ReservedReset Timer 2Reset/Restart TimerOutput eventEvent group 12
AT$EVENT=12,3,40,8,4350
OTA Message (ASCII RMC NMEA msg)User Specified numberSend OTA UDP MessageOutput eventEvent group 12
-
7/27/2019 SkyPatrol Event Cookbook-Revision 1.01
22/52
TT8750 Cookbook
Ver. 1.01
TT8750CB001 Page 22
AT$EVENT=13,0,16,z,1000000
Should always be 1000000 (max distance)Replace z with actual distance to monitorMonitor Distance displaced value)
Input transition eventEvent group 13
AT$EVENT=13,3,43,2,0
ReservedReset Timer 2Reset/Restart TimerOutput eventEvent group 13
AT$EVENT=13,3,40,9,4350
OTA Message (ASCII RMC NMEA msg)User Specified number
Send OTA UDP MessageOutput eventEvent group 13
Results: A GPS RMC NMEA message will be sent to a remote userevery time the device travels zdistance orytime interval
haselapsed. The output message is described under Section 7,Results.
5. Send GPS message based on Time AND Distance.
In this instance, a GPS message will not be sent to the remote useruntil the device travels specified distance and time has expired.
Minimum time = x(x= 0 604800 seconds)
Maximum time = 0Distance = z(z= 0 1000000 meters)
AT$EVTIM1=x (x= 0 604800 seconds)
AT$EVENT=12,1,12,1,1
Ending range of 1 (high)Starting range of 1 (high)Activate Timer 2 ($EVTIM1)Input occurrence eventEvent group 12
-
7/27/2019 SkyPatrol Event Cookbook-Revision 1.01
23/52
TT8750 Cookbook
Ver. 1.01
TT8750CB001 Page 23
AT$EVENT=12,0,16,z,1000000
Should always be 1000000 (max distance)Replace z with actual distance to monitorMonitor Distance displaced value
Input transition eventEvent group 12
AT$EVENT=12,3,43,1,0
ReservedReset Timer 1Reset/Restart TimerOutput eventEvent group 12
AT$EVENT=12,3,40,8,4350
OTA Message (ASCII RMC NMEA msg)
User Specified numberSend OTA UDP MessageOutput eventEvent group 12
-
7/27/2019 SkyPatrol Event Cookbook-Revision 1.01
24/52
TT8750 Cookbook
Ver. 1.01
TT8750CB001 Page 24
Results: A GPS RMC NMEA message will be sent to a remote userevery time the device travels zdistance and xtime interval
haselapsed. The output message is described under Section 7,
Results.
6. Send GPS message based on Minimum Time AND Distance OR
when Maximum Time has elapsed.
In this instance, a GPS message will not be sent to the remote useruntil the device travels specified distance and minimum time hasexpired or distance has not been traveled and maximum time hasexpired.
Note: Maximum Time has to be greater than Minimum Time
Minimum time = x(x= 0 604800 seconds)
Maximum time = y(y= 0 604800 seconds)
Distance = z(z= 0 1000000 meters)
AT$EVTIM1=x (x= 0 604800 seconds)
AT$EVTIM2=y (y= 0 604800 seconds)
AT$EVENT=12,1,12,1,1
Ending range of 1 (high)Starting range of 1 (high)Activate Timer 2 ($EVTIM1)Input occurrence eventEvent group 12
AT$EVENT=12,0,16,z,1000000
Should always be 1000000 (max distance)Replace z with actual distance to monitorMonitor Distance displaced valueInput transition eventEvent group 12
AT$EVENT=12,3,43,1,0
ReservedReset Timer 1Reset/Restart TimerOutput eventEvent group 12
-
7/27/2019 SkyPatrol Event Cookbook-Revision 1.01
25/52
-
7/27/2019 SkyPatrol Event Cookbook-Revision 1.01
26/52
TT8750 Cookbook
Ver. 1.01
TT8750CB001 Page 26
7. Results:
A GPS RMC NMEA message will be sent to the IP address (set byAT$FRIEND) and port number (set by AT$UDPAPI).
The output message format is generated based on the number 4350set in section a above with the AT$EVENT command.
The output message format is generated based on the number 4350set in the second AT$EVENT command.
Below is the example output that would be seen if the modem weresetup to report to the Enfora test server based on example A-3.
-
7/27/2019 SkyPatrol Event Cookbook-Revision 1.01
27/52
TT8750 Cookbook
Ver. 1.01
TT8750CB001 Page 27
Described below is the data package that should be received by the Server.
Row 1 indicates the Byte number.Note: Bytes 0 through 27 are part of IPV4 header. Bytes 28 andgreater are the actual packet Payload. Bytes 32 and greater arecontrolled by the Parameter 2 value.
Row 2 displays the data in HEX format, and Row 3 and/or 4 describe each block of the message.
Byte0 Byte1 Byte2 Byte3 Byte4 Byte5 Byte6 Byte7 Byte8 Byte9 Byte10 Byte11 Byte12 Byte13 Byte14 Byte15IP Header data
IP Header
Byte16
Byte17
Byte18
Byte19
Byte20
Byte21
Byte22
Byte23
Byte24
Byte25
Byte26
Byte27
Byte28
Byte29
Byte30
Byte31
UDP Header data 00 04 02 00ASCII GPS data Status reserved
IP Header (contd) UDP Header UDP-API Header
Byte32
Byte33
Byte34
Byte35
Byte36
Byte37
Byte38
Byte39
Byte40
Byte41
Byte42
Byte43
Byte44
Byte45
Byte46
Byte47
20 20 20 20 20 20 20 20 20 38 20 20 20 20 20 20
User Specified Number (8) Modem ID
Byte48
Byte49
Byte50
Byte51
Byte52
Byte53
Byte54
Byte55
Byte56
Byte57
Byte58
Byte59
Byte60
Byte61
Byte62
Byte63
20 20 20 20 20 20 20 20 20 4d 54 5f 54 65 73 74
Modem ID continued (MT_Test)
Byte64
Byte65
Byte66
Byte67
Byte68
Byte69
Byte70
Byte71
Byte72
Byte73
Byte74
Byte75
Byte76
Byte77
Byte78
Byte79
20 66 39 2C 20 36 20 31 37 34 38 20 31 37 34 38Mask comma Data spaceModem
IDcontinued GPIO
A/D 1 A/D 2
Byte80
Byte81
Byte82
Byte83
Byte84
Byte85
Byte86
Byte87
Byte88
Byte89
Byte90
Byte91
Byte92
Byte93
Byte94
Byte95
20 31 32 20 24 47 50 52 4d 43 2c 31 39 35 33 34A/D 2
continued
Input Event Number(12)
ASCII NMEA RMC message($GPRMC,195347.92,A,3322.7284,N,09624.6839,W,56.2,059.0,210704,04,E*5F)
Byte
96Byte
97Byte
98Byte
99Byte
100Byte
101Byte
102Byte
103Byte
104Byte
105Byte
106Byte
107Byte
108Byte
109Byte
110Byte
111
!
Bytes 32 42 and 81 83 will change depending on which option (1 6) wasselected during section a.
-
7/27/2019 SkyPatrol Event Cookbook-Revision 1.01
28/52
TT8750 Cookbook
Ver. 1.01
TT8750CB001 Page 28
37 2e 39 32 2c 41 2c 33 33 32 32 2e 37 32 38 34
ASCII NMEA RMC message continued
Byte
112
Byte
113
Byte
114
Byte
115
Byte
116
Byte
117
Byte
118
Byte
119
Byte
120
Byte
121
Byte
122
Byte
123
Byte
124
Byte
125
Byte
126
Byte
1272c 4e 2c 30 39 36 32 34 2e 36 38 33 39 2c 57 2c
ASCII NMEA RMC message continued
Byte128
Byte129
Byte130
Byte131
Byte132
Byte133
Byte134
Byte135
Byte136
Byte137
Byte138
Byte139
Byte140
Byte141
Byte142
Byte143
35 36 2e 32 2c 30 35 39 2e 30 2c 32 31 30 37 30
ASCII NMEA RMC message continued
Byte
144Byte
145Byte
146Byte
147Byte
148Byte
149Byte
150Byte
151Byte
152Byte
153Byte
154
34 2c 30 34 2c 45 2a 35 46 0d 0aASCII NMEA RMC message continued
6. Geo-Fencing Configuration
a. The Mobile Tracker allows a user to configure maximum of 25 circularshape geo-fences. Mobile Trackers can be configured to send GPSmessages to a remote user (server) whenever a device enters or exits ageo-fenced area. The geo-fence feature has to be configured with twocommands: AT$GEOFNC and AT$EVENT. To configure sending
messages when a device enters or exits the geo fenced area, follow theexample below:
NOTE:
NMEA messages provide Latitude and Longitude information inDegrees Minute.Minute format.
To obtain the decimal value for Degrees, takeMinute.Minute of theactual Latitude or Longitude and divide it by 60.
Latitude value should be between 90.0 to +90.0 Degrees Longitude value should be between 180.0 to +180.0 Degrees. Latitude North of Equator line should always be positive Value. Latitude South of the Equator line should always be negative
value.
Longitude East of the GMT line should always be positive. Longitude West of the GMT line should always be negative
-
7/27/2019 SkyPatrol Event Cookbook-Revision 1.01
29/52
TT8750 Cookbook
Ver. 1.01
TT8750CB001 Page 29
North
South
EastWest
GMT
Equator
Figure 1. Map of World Displaying Latitude and Longitude
Ex: Send a NMEA RMC GPS message when the Mobile Trackermoves in/out of the geo-fence area 1. Geo fence 1 is a 100 meterradius from the center point defined by Latitude = 33 01.5023(North) and Longitude = 096 42.3853 (West). According to figure6 above, Latitude of33 01.5023 (North) would be a positive value(since its above the Equator line) but Longitude of96 42.3853(West) would be a negative value since it is west of the GMT line.
Verify each AT command sent to the modem returns OK.
Radius: 100 meters
Latitude: 33 01.5023 North = 33 +01.5023/60
= 33.02503833Longitude: 096 42.3853 West = -96 +
42.3853/60= -96.70642167
AT$GEOFNC=1,100,33.02503833,-96.70642167
a. Send a GPS message when the unit leaves geo-fence 1
-
7/27/2019 SkyPatrol Event Cookbook-Revision 1.01
30/52
TT8750 Cookbook
Ver. 1.01
TT8750CB001 Page 30
AT$EVENT=14,0,21,0,0
Transition OUT of geo-fence areaTransition OUT of geo-fence area
Geo-Fence 1Input transition eventEvent group 14
AT$EVENT=14,3,40,14,4350
OTA Message (ASCII RMC NMEA msg)User Specified numberSend OTA UDP MessageOutput eventEvent group 14
b. Send a GPS message when the unit enters geo-fence 1
AT$EVENT=15,0,21,1,1
Transition IN the geo-fence areaTransition IN the geo-fence areaGeo-Fence 1Input transition eventEvent group 15
AT$EVENT=15,3,40,15,4350
OTA Message (ASCII RMC NMEA msg)User Specified numberSend OTA UDP MessageOutput eventEvent group 15
Results: A GPS RMC NMEA message will be sent to a remote userevery time the device enters or exits the geo fence area. Theoutput message is described under Section B Results.
To add Geo-Fence 2, send the following commands to the device andverify that an OKis returned.
AT$GEOFNC=2,100,34.02503833,-97.70642167
AT$EVENT=16,0,22,0,0AT$EVENT=16,3,40,16,4350
AT$EVENT=17,0,22,1,1
AT$EVENT=17,3,40,17,4350
For additional Geofences, repeat the 5 commands below by changingthe GeoFence (index) number (A), radius (100), latitude
-
7/27/2019 SkyPatrol Event Cookbook-Revision 1.01
31/52
-
7/27/2019 SkyPatrol Event Cookbook-Revision 1.01
32/52
TT8750 Cookbook
Ver. 1.01
TT8750CB001 Page 32
A GPS RMC NMEA message will be sent to the IP address (set byAT$FRIEND) and port number (set byAT$UDPAPI) when it enters or
exits a defined geo fence.
The output message format is generated based on the number 4350 setin above example with theAT$EVENT command.
!
Bytes 32 42 will change depending on what is programmed in the userspecified field. Bytes 81 83 will change with geo-fence number
-
7/27/2019 SkyPatrol Event Cookbook-Revision 1.01
33/52
TT8750 Cookbook
Ver. 1.01
TT8750CB001 Page 33
Described below is the data package that should be received by the Server whenthe modem exits GeoFence 1.
Row 1 indicates the Byte number.Note: Bytes 0 through 27 are part of IPV4 header. Bytes 28 and
greater are the actual packet Payload. Bytes 32 and greater arecontrolled by the Parameter 2 value.
Row 2 displays the data in HEX format, and Row 3 and/or 4 describe each block of the message.
Byte0
Byte1
Byte2
Byte3
Byte4
Byte5
Byte6
Byte7
Byte8
Byte9
Byte10
Byte11
Byte12
Byte13
Byte14
Byte15
IP Header data
IP Header
Byte
16
Byte
17
Byte
18
Byte
19
Byte
20
Byte
21
Byte
22
Byte
23
Byte
24
Byte
25
Byte
26
Byte
27
Byte
28
Byte
29
Byte
30
Byte
31UDP Header data 00 04 02 00ASCII GPS data Status reserved
IP Header (contd) UDP Header UDP-API Header
Byte32
Byte33
Byte34
Byte35
Byte36
Byte37
Byte38
Byte39
Byte40
Byte41
Byte42
Byte43
Byte44
Byte45
Byte46
Byte47
20 20 20 20 20 20 20 20 31 34 20 20 20 20 20 20
User Specified Number (14) Modem ID
Byte48
Byte49
Byte50
Byte51
Byte52
Byte53
Byte54
Byte55
Byte56
Byte57
Byte58
Byte59
Byte60
Byte61
Byte62
Byte63
20 20 20 20 20 20 20 20 20 4d 54 5f 54 65 73 74
Modem ID continued (MT_Test)
Byte64
Byte65
Byte66
Byte67
Byte68
Byte69
Byte70
Byte71
Byte72
Byte73
Byte74
Byte75
Byte76
Byte77
Byte78
Byte79
20 66 39 2C 20 36 20 31 37 34 38 20 31 37 34 38Mask comma Data spaceModem
IDcontinued GPIO
A/D 1 A/D 2
Byte80
Byte81
Byte82
Byte83
Byte84
Byte85
Byte86
Byte87
Byte88
Byte89
Byte90
Byte91
Byte92
Byte93
Byte94
Byte95
20 32 31 20 24 47 50 52 4d 43 2c 31 39 32 35 32A/D 2
continued
Input Event Number(21)
ASCII NMEA RMC message($GPRMC,192527.88,A,3301.4850,N,09642.5504,W,21.1,269.8,210704,05,E*59)
Byte96
Byte97
Byte98
Byte99
Byte100
Byte101
Byte102
Byte103
Byte104
Byte105
Byte106
Byte107
Byte108
Byte109
Byte110
Byte111
37 2e 38 38 2c 41 2c 33 33 30 31 2e 34 38 35 30
ASCII NMEA RMC message continued
Byte112
Byte113
Byte114
Byte115
Byte116
Byte117
Byte118
Byte119
Byte120
Byte121
Byte122
Byte123
Byte124
Byte125
Byte126
Byte127
-
7/27/2019 SkyPatrol Event Cookbook-Revision 1.01
34/52
TT8750 Cookbook
Ver. 1.01
TT8750CB001 Page 34
2c 4e 2c 30 39 36 34 32 2e 35 35 30 34 2c 57 2c
ASCII NMEA RMC message continued
Byte128
Byte129
Byte130
Byte131
Byte132
Byte133
Byte134
Byte135
Byte136
Byte137
Byte138
Byte139
Byte140
Byte141
Byte142
Byte143
32 31 2e 31 2c 32 36 39 2e 38 2c 32 31 30 37 30
ASCII NMEA RMC message continued
Byte144
Byte145
Byte146
Byte147
Byte148
Byte149
Byte150
Byte151
Byte152
Byte153
Byte154
34 2c 30 35 2c 45 2a 35 39 0d 0a
ASCII NMEA RMC message continued
-
7/27/2019 SkyPatrol Event Cookbook-Revision 1.01
35/52
TT8750 Cookbook
Ver. 1.01
TT8750CB001 Page 35
7. Power Save Configuration
Mobile Trackers allow a user to configure the device to enter or exit lowpower mode based on Ignition and/or DTR setting. The Mobile Tracker
has to be configured via AT commands as well as the hardware has to bewired accordingly to enter low power mode. Select one of the optionsfrom 1 thru 6 below for your desired method to enter low power mode.
Note: The device does not have a DTR input. Examples 4,5,6 donot apply to the device.
Note: Example 3 only needs to be used if the MT-G does notautomatically reset when Ignition source is applied.
Note: Do not use a delay time of 0 if you are planning to include
GPS messages.
1. Enter the following command to put the device in Low Power Modeimmediately when Ignition is turned OFF. The device should respondback with OK.AT$PWRSAV=0,1,1,0
2. Enter the following command to put the device in Low Power Mode 10seconds after the Ignition has been turned OFF. The device should respondback with OK.AT$PWRSAV=0,1,10,0
3. Enter the following command to reset the device when Ignition is turnedON after being in low power mode during Ignition Off. The device shouldrespond back with OK.AT$PWRSAV=0,1,10,1
4. Enter the following command to put the device in Low Power Modeimmediately when DTR is disconnected. The device should respond backwith OK.AT$PWRSAV=1,0,1,0
5. Enter the following command to put the device in Low Power Modeimmediately when DTR is disconnected. When DTR is connected, theMT-G will reset. The device should respond back with OK.AT$PWRSAV=1,0,1,1
6. Enter the following command to put the device in Low Power Mode 10seconds after DTR is disconnected and Ignition is turned OFF. The deviceshould respond back with OK.
-
7/27/2019 SkyPatrol Event Cookbook-Revision 1.01
36/52
TT8750 Cookbook
Ver. 1.01
TT8750CB001 Page 36
AT$PWRSAV=1,1,10,0
-
7/27/2019 SkyPatrol Event Cookbook-Revision 1.01
37/52
TT8750 Cookbook
Ver. 1.01
TT8750CB001 Page 37
NOTE: In Low Power Mode, the GPS receiver is turned OFF and henceone would not get any GPS data through the serial port or OTA. However,the modem is still registered and connected to the GSM/GPRS network. Auser can also select to get notified when the Mobile Tracker enters low
power mode or exits Low Power Mode. Use the following AT commandsto configure sending of message when the device enters or exits lowpower mode.
Send a GPS message when the Mobile Tracker exits power save mode
AT$EVENT=64,0,26,0,0
Exit power save modeExit power save modeLow Power Mode EventInput transition event
Event group 64AT$EVENT=64,3,40,64,4350
OTA Message (ASCII RMC NMEA msg)User Specified numberSend OTA UDP MessageOutput eventEvent group 64
Send a GPS message when the device enters power save mode
AT$EVENT=65,0,26,1,1
Enter power save modeEnter power save modeLow Power Mode EventInput transition eventEvent group 65
AT$EVENT=65,3,40,65,4350
OTA Message (ASCII RMC NMEA msg)User Specified numberSend OTA UDP MessageOutput event
Event group 65
Results: A GPS RMC NMEA message will be sent to a remote user everytime
the device enters or exits low power mode.
-
7/27/2019 SkyPatrol Event Cookbook-Revision 1.01
38/52
TT8750 Cookbook
Ver. 1.01
TT8750CB001 Page 38
8. GPS Idle Trigger
The Mobile Tracker maintains GPS Idle count. The Idle count is incrementedevery second that the unit has not moved and is stationary in one position. The
user can elect to receive a GPS message when the Idle count exceeds. Idle countis measured in seconds.
Note: A GPS Idle Trigger message will only be sent once when the timerexpires. The message will not be repeated if the device/vehicle has notmoved.
1. To send a GPS message when the device/vehicle stays idle for 2 minutes(120 seconds), configure as follows:
AT$EVENT=68,0,30,120,1000000
Max timeout valueIdle time in seconds (120 seconds)GPS Idle Trigger Input EventInput transition eventEvent group 68
AT$EVENT=68,3,40,68,4350
OTA Message (ASCII RMC NMEA msg)User Specified numberSend OTA UDP MessageOutput event
Event group 68
2. Query the EVENT table:
AT$EVENT?
The table should reflect the following:
$EVENT: evgp evtyp evcat p1 p2
68A 0 30 120 1000000
68B 3 40 68 4350
-
7/27/2019 SkyPatrol Event Cookbook-Revision 1.01
39/52
TT8750 Cookbook
Ver. 1.01
TT8750CB001 Page 39
9. GPS Invisible Trigger
The Mobile Tracker maintains GPS Invisible count. The Invisible count isincremented every second when the unit does not have valid GPS data. The user
can elect to receive a message when the Invisible count exceeds a set period.Invisible count is measured in seconds.
Note: A GPS Invisible Trigger message will only be sent once when thetimer expires. The message will not be repeated if the device/vehicle hasnot acquired valid GPS data.
1. To send a message when the device/vehicle stays idle for 1 minutes (60seconds), configure as follows:
AT$EVENT=69,0,29,60,1000000
Max timeout valueIdle time in seconds (60 seconds)GPS Invisible Trigger Input EventInput transition eventEvent group 69
AT$EVENT=69,3,40,69,4350
OTA Message (ASCII RMC NMEA msg)User Specified numberSend OTA UDP MessageOutput eventEvent group 69
2. Query the EVENT table:
AT$EVENT?
The table should reflect the following:
$EVENT: evgp evtyp evcat p1 p2
69A 0 29 60 1000000
69B 3 40 69 4350
-
7/27/2019 SkyPatrol Event Cookbook-Revision 1.01
40/52
TT8750 Cookbook
Ver. 1.01
TT8750CB001 Page 40
10.Panic Button Sample Design
In this example the Mobile Tracker will be configured to monitor a push buttonswitch, flash a LED on switch closure, and send 10 additional messages to each
server in the AT$FRIENDS list or until one of the servers sends anacknowledgment response back. A message must be sent from the server to turnoff the flashing LED. This example requires access to a UDP server. If necessary,configure the modem per the appropriate quick start guide and use the Enfora TestServer.
1. Configure the modem to send a message twice to each server, 5 secondsapart or until one of the servers sends the acknowledgement packet back.AT$ACKTM=10,5,0
2. Add the following AT$EVENT commands.
AT$EVENT=72,0,0,1,1
Ending range of 1 (high)Starting range of 1 (high)Activity on I/O line #1 based on rangeInput transition eventEvent group 72
AT$EVENT=72,3,34,1,0
Flash ForeverStarting range of 1 ( second intervals)
GPIO3 flash Flash Line signal on GPIOline #3 based on Param1Output transition eventEvent group 72
AT$EVENT=72,3,41,911,4102
OTA Message (ASCII RMC NMEA msg)User Specified numberSend OTA UDP MessageOutput eventEvent group 72
-
7/27/2019 SkyPatrol Event Cookbook-Revision 1.01
41/52
TT8750 Cookbook
Ver. 1.01
TT8750CB001 Page 41
3. Press the Panic button on the Mobile Tracker. The LED attached toGPIO 3 will begin to flash at second intervals. Also the Mobile Trackerwill start sending UDP messages as programmed in step 2.
-
7/27/2019 SkyPatrol Event Cookbook-Revision 1.01
42/52
TT8750 Cookbook
Ver. 1.01
TT8750CB001 Page 42
4. After a couple of messages, enable the Auto ACK button. One moremessage should be sent and then the messages will stop.
-
7/27/2019 SkyPatrol Event Cookbook-Revision 1.01
43/52
TT8750 Cookbook
Ver. 1.01
TT8750CB001 Page 43
5. To extinguish to LED type in the AT Command AT$IOGP3=0 in theCommand/Data box. Click on the Write button to send the ATcommand to the Mobile Tracker. The LED attached to GPIO 3 will stopflashing.
-
7/27/2019 SkyPatrol Event Cookbook-Revision 1.01
44/52
TT8750 Cookbook
Ver. 1.01
TT8750CB001 Page 44
11.Door Switch Detect To SMS Message
In this example the Mobile Tracker will be configured to monitor a push button
switch, such as the door ajar switch mounted on a vehicle, to inform the uservia SMS messages on the state of the switch.
1. Add the following AT$EVENT commands to the Mobile Tracker StockFactory Configuration.
AT$EVENT=73,0,0,1,1
Ending range of 1 (high)Starting range of 1 (high)Activity on I/O line #1 based on rangeInput transition event
Event group 73AT$EVENT=73,3,44,1,0
N/AExecute First AT$STOATEV CommandExecute AT$STOATEVOutput transition eventEvent group 73
AT$EVENT=74,0,0,0,0
Ending range of 0 (low)
Starting range of 0 (low)Activity on I/O line #1 based on rangeInput transition eventEvent group 74
AT$EVENT=74,3,44,2,0
N/AExecute Second AT$STOATEV CommandExecute AT$STOATEVOutput transition eventEvent group 74
2. Set the Mobile Trackers AT$STOATEV to send the Door State SMSmessages.
AT$STOATEV=1, AT+CMSS=1AT$STOATEV=2, AT+CMSS=2
-
7/27/2019 SkyPatrol Event Cookbook-Revision 1.01
45/52
-
7/27/2019 SkyPatrol Event Cookbook-Revision 1.01
46/52
-
7/27/2019 SkyPatrol Event Cookbook-Revision 1.01
47/52
TT8750 Cookbook
Ver. 1.01
TT8750CB001 Page 47
AT&W
10.Turn the primary power supply OFF, the following message will be
displayed from the Mobile Tracker.
11.Turn the primary power supply ON; the following message will bedisplayed from the Mobile Tracker.
-
7/27/2019 SkyPatrol Event Cookbook-Revision 1.01
48/52
TT8750 Cookbook
Ver. 1.01
TT8750CB001 Page 48
13. Events that are biased on GPIO 1 ($IOPULUP)
In this example the Skypatrol MT-L/MT-G (TT87540/TT8750) will beconfigured to monitor and display to the terminal program, the logic state ofGPIO 1.
1. Add the following AT$EVENT commands to the Mobile Tracker StockFactory Configuration.
AT$EVENT=92,0,0,1,1
Ending range of 1 (high)Starting range of 1 (high)Activity on I/O line #4 based on rangeInput transition eventEvent group 92
AT$EVENT=92,3,44,1,0
N/A
Execute First AT$STOATEV CommandExecute AT$STOATEVOutput transition eventEvent group 92
-
7/27/2019 SkyPatrol Event Cookbook-Revision 1.01
49/52
TT8750 Cookbook
Ver. 1.01
TT8750CB001 Page 49
AT$EVENT=93,0,0,0,0
Ending range of 0 (low)Starting range of 0 (low)Activity on I/O line #4 based on range
Input transition eventEvent group 93
AT$EVENT=93,3,44,2,0
N/AExecute Second AT$STOATEV CommandExecute AT$STOATEVOutput transition eventEvent group 93
2. Set the Mobile Trackers AT$STOATEV to send the Power State viaASCII messages to the terminal program.
AT$STOATEV=1, AT$MSGSND=0,GPIO 1 is in the HIGH StateAT$STOATEV=2, AT$MSGSND=0,GPIO 1 is in the LOW State
-
7/27/2019 SkyPatrol Event Cookbook-Revision 1.01
50/52
-
7/27/2019 SkyPatrol Event Cookbook-Revision 1.01
51/52
TT8750 Cookbook
Ver. 1.01
GSM2000AN014 Page 2
-
7/27/2019 SkyPatrol Event Cookbook-Revision 1.01
52/52
TT8750 Cookbook
Ver. 1.01