aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2017-03-24 02:42:26 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2017-03-24 11:08:15 +1300
commit8b343b37d623daf74692b62d2ffcfc6e4bce9bd6 (patch)
tree5b32004118fefa77cc7cca49a6ee5731b11596fc /src
parent6374653f51992462b92ca8bf861375ab6324047c (diff)
downloadtraccar-server-8b343b37d623daf74692b62d2ffcfc6e4bce9bd6.tar.gz
traccar-server-8b343b37d623daf74692b62d2ffcfc6e4bce9bd6.tar.bz2
traccar-server-8b343b37d623daf74692b62d2ffcfc6e4bce9bd6.zip
Fix TAIP ACK checksum
Diffstat (limited to 'src')
-rw-r--r--src/org/traccar/protocol/TaipProtocolDecoder.java4
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);