From 94d95ebeb1168ff235aa49a24c0ba0ed62b1125b Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Wed, 30 Jun 2021 22:17:02 -0700 Subject: Ignore keepalive messages --- src/main/java/org/traccar/protocol/UuxProtocolDecoder.java | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/main/java/org') diff --git a/src/main/java/org/traccar/protocol/UuxProtocolDecoder.java b/src/main/java/org/traccar/protocol/UuxProtocolDecoder.java index 545784865..1081fa811 100644 --- a/src/main/java/org/traccar/protocol/UuxProtocolDecoder.java +++ b/src/main/java/org/traccar/protocol/UuxProtocolDecoder.java @@ -40,6 +40,7 @@ public class UuxProtocolDecoder extends BaseProtocolDecoder { public static final int MSG_IMMOBILIZER = 0x9E; public static final int MSG_ACK = 0xD0; public static final int MSG_NACK = 0xF0; + public static final int MSG_KEEPALIVE = 0xFF; private void sendResponse(Channel channel, int productCode, int protocolVersion, int type) { if (channel != null && BitUtil.check(protocolVersion, 7)) { @@ -71,6 +72,10 @@ public class UuxProtocolDecoder extends BaseProtocolDecoder { buf.readUnsignedByte(); // length int type = buf.readUnsignedByte(); + if (type == MSG_KEEPALIVE) { + return null; + } + String vehicleId = buf.readCharSequence(10, StandardCharsets.US_ASCII).toString(); DeviceSession deviceSession = getDeviceSession(channel, remoteAddress, vehicleId); if (deviceSession == null) { -- cgit v1.2.3