CalAmp Bogota - LM Direct July 2017 PDF

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 25

LM Direct & GPSTRAX

CalAmp

2017
Training

Presenter: Marcella Deridder


© 2017 CalAmp CONFIDENTIAL and PROPRIETARY
LEARNING OBJECTIVES

• By the end of this lesson you will:

- Recognize and explain the use of the different message types in LM Direct

- Understand the LM Direct Message Flow

- Understand how to configure an LMU for serial debug

© 2017 CalAmp | COMPANY CONFIDENTIAL | 2


LM Direct Protocol

• Common for all CalAmp Devices

• Usually UDP, but can use TCP

• 13 different message types (0 to 14)

© 2017 CalAmp | COMPANY CONFIDENTIAL | 3


LM Direct Message Flow

© 2017 CalAmp | COMPANY CONFIDENTIAL | 4


Message Structure

These fields
present only if
Options corresponding
Header bit is set on
options byte.

Message
Header

Message
Contents

© 2017 CalAmp | COMPANY CONFIDENTIAL | 5


Type 0 – Null Message

Keeps connection to server


Just contains header
open

Updates IP address

© 2017 CalAmp | COMPANY CONFIDENTIAL | 6


Type 1 – Acknowledge Message

ACK/NAK receipt of NACK includes reason for


message from LMU/Server failure

Can use Unacknowledged


Messaging, but no
guaranteed delivery

© 2017 CalAmp | COMPANY CONFIDENTIAL | 7


Type 2 – Event Report

• Most common message

• Event codes selected to match


back-end application

• Size varies depending on number


of accumulators included

© 2017 CalAmp | COMPANY CONFIDENTIAL | 8


Type 3 – ID Report

Reports Device information Contains script, firmware and


to PULS or other server status information

© 2017 CalAmp | COMPANY CONFIDENTIAL | 9


Type 4 – User Message

Passes data from server to


host serial port, and vice Maximum data payload is
versa 848 bytes

Includes GPS information


when sent by LMU

© 2017 CalAmp | COMPANY CONFIDENTIAL | 10


Type 5 – Application Message

Messages used to manage


applications: Can be sent by device or
• Geo-Zone programming
• Vehicle bus data server
• Motion logs

Includes GPS information

© 2017 CalAmp | COMPANY CONFIDENTIAL | 11


Type 6 – Parameter Message

Functions include:
o Update Begin
Used to read or write
o Read
parameters
o Write
o Update End

S-Registers can be modified


Reads/Writes include as parameter 1024,
parameter ID and index
index (S-Reg – 120)

© 2017 CalAmp | COMPANY CONFIDENTIAL | 12


Type 7 – Unit Request Message

Possible actions include:


 Reboot device
Used by server to
 Version report
request device action
 GPS status report
 Real-time PEG action

© 2017 CalAmp | COMPANY CONFIDENTIAL | 13


Type 8 – Locate Report Message

Sent by LMU in response


to Unit Request Message Same GPS information
(Action Code 10) as Event Report

Includes default
accumulator list

© 2017 CalAmp | COMPANY CONFIDENTIAL | 14


Type 9 – User Message with Accumulators

Includes default S-Register 140 controls


accumulators addition of accumulators

© 2017 CalAmp | COMPANY CONFIDENTIAL | 15


Type 10 – Mini-Event Report

Smaller version of Event


Report Message: Reduced status
information
20 bytes vs. 40 bytes

Includes default Sent from script using


accumulators separate PEG action (81)

© 2017 CalAmp | COMPANY CONFIDENTIAL | 16


Type 11 – Mini User Message

© 2017 CalAmp | COMPANY CONFIDENTIAL | 17


Type 12 – Mini Application Message

Smaller version Basically standard


Application Message with
of Application Message GPS data removed

Set S-Register 177 bit 7 to


Only time tag included use Mini Application
Message format

© 2017 CalAmp | COMPANY CONFIDENTIAL | 18


Type 13 – Device Version Report Message

Requested by:
Passes device version info • PEG Action 49, Modifier 40 or 41
to inbound or maintenance • Parameter 2312, bits 8-14, set to 1
server • LMD Unit Request Msg Type 7,
Action Code 2

© 2017 CalAmp | COMPANY CONFIDENTIAL | 19


Type 14 – Application Message with Accumulators

Like App Msg Type 5 but


with the addition of
Can be sent by device or
accumulators :
• Parameter 781 controls which server
accumulators are included

Includes GPS information

© 2017 CalAmp | COMPANY CONFIDENTIAL | 20


LM Direct Debug

Set S-Register 125 to enable debug messages


- Value of 3 enables PEG debug only
- Value of 7 gives PEG and modem debug

Set bit 4 of S-Register 124 to enable Hex Dump

Use LMU Toolbox to decode raw messages

© 2017 CalAmp | COMPANY CONFIDENTIAL | 21


Sample Transaction
Receive ACK
app[23:43:56] Comm Rcv Pkt, Len=38
45 00 00 26 6B 91 40 00 6E 11 8D DA
44 69 F2 37 4B D9 90 E1 50 14 50 1E 00
12 48 38 02 01 00 03 02 00 00 00 00 00
app[23:43:56] LMD: UDP Message
Received
02 01 00 03 02 00 00 00 00 00
app[23:43:56] LMD: Rcv Response #3
from 68.105.242.55:20500, len=10
app[23:43:56] Ack (Type2,Ack0)

© 2017 CalAmp | COMPANY CONFIDENTIAL | 22


LMU Toolbox

© 2017 CalAmp | COMPANY CONFIDENTIAL | 23


GPS Trax
Includes the following
• GPSTrax Service, Database, Web Application, Wcf Service,
Built-In message support
• Null, Ack, Event Report, ID Report, User Message, Application,
Parameter Read/Write, Unit Request, Locate Report, Mini
Event/User/App report,
• Outbound, Unit Request , Application Message , Parameter Write
Provide GPSTrax Documentation and support
Simple installation package
Sample Code

© 2016 CalAmp | COMPANY CONFIDENTIAL |


24
Questions?

© 2017 CalAmp | COMPANY CONFIDENTIAL | 25

You might also like