From c860f15e6a541c72d901d928941912edb943883e Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Sat, 15 Feb 2020 11:01:15 -0800 Subject: Fix checksum calculation --- src/main/java/org/traccar/protocol/GatorProtocolDecoder.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/main/java/org/traccar') diff --git a/src/main/java/org/traccar/protocol/GatorProtocolDecoder.java b/src/main/java/org/traccar/protocol/GatorProtocolDecoder.java index cce23288a..087861635 100644 --- a/src/main/java/org/traccar/protocol/GatorProtocolDecoder.java +++ b/src/main/java/org/traccar/protocol/GatorProtocolDecoder.java @@ -68,7 +68,7 @@ public class GatorProtocolDecoder extends BaseProtocolDecoder { response.writeByte(checksum); response.writeByte(type); response.writeByte(0); // subtype - response.writeByte(Checksum.sum(response.nioBuffer(2, response.writerIndex()))); + response.writeByte(Checksum.xor(response.nioBuffer(2, response.writerIndex()))); response.writeByte(0x0D); channel.writeAndFlush(new NetworkMessage(response, remoteAddress)); } -- cgit v1.2.3