Skip to content

Commit

Permalink
Huabao Protocol: Add CC888 heartbeat packet
Browse files Browse the repository at this point in the history
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
  • Loading branch information
bharrisau authored Oct 25, 2022
1 parent eef6c34 commit 8fe9e3f
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ public HuabaoProtocolDecoder(Protocol protocol) {
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;
Expand Down Expand Up @@ -224,7 +225,7 @@ protected Object decode(
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);

Expand Down

0 comments on commit 8fe9e3f

Please sign in to comment.