diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2017-03-24 02:42:26 +1300 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2017-03-24 11:08:15 +1300 |
commit | 8b343b37d623daf74692b62d2ffcfc6e4bce9bd6 (patch) | |
tree | 5b32004118fefa77cc7cca49a6ee5731b11596fc /src/org | |
parent | 6374653f51992462b92ca8bf861375ab6324047c (diff) | |
download | trackermap-server-8b343b37d623daf74692b62d2ffcfc6e4bce9bd6.tar.gz trackermap-server-8b343b37d623daf74692b62d2ffcfc6e4bce9bd6.tar.bz2 trackermap-server-8b343b37d623daf74692b62d2ffcfc6e4bce9bd6.zip |
Fix TAIP ACK checksum
Diffstat (limited to 'src/org')
-rw-r--r-- | src/org/traccar/protocol/TaipProtocolDecoder.java | 4 |
1 files changed, 2 insertions, 2 deletions
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); |