aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/traccar/protocol
diff options
context:
space:
mode:
authorBen Harris <mail@bharr.is>2022-10-25 11:06:27 +0800
committerGitHub <noreply@github.com>2022-10-25 11:06:27 +0800
commit8fe9e3f6ce857705fa609aa2728f73fdf98f3dbb (patch)
tree74f732ce68e38786a9b8e7e2f13300601b682e6b /src/main/java/org/traccar/protocol
parenteef6c34d403fa5bf2ca0ae757792633c36052769 (diff)
downloadtrackermap-server-8fe9e3f6ce857705fa609aa2728f73fdf98f3dbb.tar.gz
trackermap-server-8fe9e3f6ce857705fa609aa2728f73fdf98f3dbb.tar.bz2
trackermap-server-8fe9e3f6ce857705fa609aa2728f73fdf98f3dbb.zip
Huabao Protocol: Add CC888 heartbeat packet
From CC888 protocol When vehicle engine is OFF, the device will stop uploading location information to platform server, it will send heart beat message to platform server every 2 minutes, the heart beat message ID is 0x0506, the message body of heart beat message is empty. The platform will reply device with general replay message ID 0x8001
Diffstat (limited to 'src/main/java/org/traccar/protocol')
-rw-r--r--src/main/java/org/traccar/protocol/HuabaoProtocolDecoder.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main/java/org/traccar/protocol/HuabaoProtocolDecoder.java b/src/main/java/org/traccar/protocol/HuabaoProtocolDecoder.java
index 27555d46d..cbaa6b9fd 100644
--- a/src/main/java/org/traccar/protocol/HuabaoProtocolDecoder.java
+++ b/src/main/java/org/traccar/protocol/HuabaoProtocolDecoder.java
@@ -51,6 +51,7 @@ public class HuabaoProtocolDecoder extends BaseProtocolDecoder {
public static final int MSG_GENERAL_RESPONSE = 0x8001;
public static final int MSG_GENERAL_RESPONSE_2 = 0x4401;
public static final int MSG_HEARTBEAT = 0x0002;
+ public static final int MSG_HEARTBEAT_2 = 0x0506;
public static final int MSG_TERMINAL_REGISTER = 0x0100;
public static final int MSG_TERMINAL_REGISTER_RESPONSE = 0x8100;
public static final int MSG_TERMINAL_CONTROL = 0x8105;
@@ -224,7 +225,7 @@ public class HuabaoProtocolDecoder extends BaseProtocolDecoder {
formatMessage(MSG_TERMINAL_REGISTER_RESPONSE, id, false, response), remoteAddress));
}
- } else if (type == MSG_TERMINAL_AUTH || type == MSG_HEARTBEAT || type == MSG_PHOTO) {
+ } else if (type == MSG_TERMINAL_AUTH || type == MSG_HEARTBEAT || type == MSG_PHOTO || type == MSG_HEARTBEAT_2) {
sendGeneralResponse(channel, remoteAddress, id, type, index);