From 8b343b37d623daf74692b62d2ffcfc6e4bce9bd6 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Fri, 24 Mar 2017 02:42:26 +1300 Subject: Fix TAIP ACK checksum --- src/org/traccar/protocol/TaipProtocolDecoder.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/org/traccar/protocol') diff --git a/src/org/traccar/protocol/TaipProtocolDecoder.java b/src/org/traccar/protocol/TaipProtocolDecoder.java index 24fe36220..309263cd5 100644 --- a/src/org/traccar/protocol/TaipProtocolDecoder.java +++ b/src/org/traccar/protocol/TaipProtocolDecoder.java @@ -182,8 +182,8 @@ public class TaipProtocolDecoder extends BaseProtocolDecoder { if (deviceSession != null) { if (sendResponse && channel != null) { if (messageIndex != null) { - String response = ">ACK;" + messageIndex + ";ID=" + uniqueId + ";"; - response += Checksum.nmea(response) + "<"; + String response = ">ACK;" + messageIndex + ";ID=" + uniqueId + ";*"; + response += String.format("%02X", Checksum.xor(response)) + "<"; channel.write(response); } else { channel.write(uniqueId); -- cgit v1.2.3