aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/traccar/protocol/T800xProtocolDecoder.java
diff options
context:
space:
mode:
authorSherby <109462679+sherbinator@users.noreply.github.com>2023-10-05 22:14:55 +0200
committerGitHub <noreply@github.com>2023-10-05 22:14:55 +0200
commit945f5753595b1e413df2b13c1ffa2a6458556ce0 (patch)
tree952a6eaeb9411a86fadfdd18687d2174d8c46d84 /src/main/java/org/traccar/protocol/T800xProtocolDecoder.java
parent91cfe0412753cadb47a0b892864469a2baf4fe31 (diff)
parente3a309155a39d97bffe0e781a66070ef9e38a52f (diff)
downloadtrackermap-server-945f5753595b1e413df2b13c1ffa2a6458556ce0.tar.gz
trackermap-server-945f5753595b1e413df2b13c1ffa2a6458556ce0.tar.bz2
trackermap-server-945f5753595b1e413df2b13c1ffa2a6458556ce0.zip
Merge pull request #1 from sherbinator/T800X-protocol-fix-messages-response-for-0x2323
(Bugfix-T800X Protocol) Fix messages response for 0x2323
Diffstat (limited to 'src/main/java/org/traccar/protocol/T800xProtocolDecoder.java')
-rw-r--r--src/main/java/org/traccar/protocol/T800xProtocolDecoder.java14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/main/java/org/traccar/protocol/T800xProtocolDecoder.java b/src/main/java/org/traccar/protocol/T800xProtocolDecoder.java
index a1093fc32..3353bc57d 100644
--- a/src/main/java/org/traccar/protocol/T800xProtocolDecoder.java
+++ b/src/main/java/org/traccar/protocol/T800xProtocolDecoder.java
@@ -163,7 +163,12 @@ public class T800xProtocolDecoder extends BaseProtocolDecoder {
boolean positionType = type == MSG_GPS || type == MSG_GPS_2 || type == MSG_ALARM || type == MSG_ALARM_2;
if (!positionType) {
- sendResponse(channel, header, type, index, imei, 0);
+
+ if (header == 0x2323) {
+ sendResponse(channel, header, type, 0x0001, imei, 0);
+ } else {
+ sendResponse(channel, header, type, index, imei, 0);
+ }
}
if (positionType) {
@@ -518,7 +523,12 @@ public class T800xProtocolDecoder extends BaseProtocolDecoder {
boolean acknowledgement = AttributeUtil.lookup(
getCacheManager(), Keys.PROTOCOL_ACK.withPrefix(getProtocolName()), deviceSession.getDeviceId());
if (acknowledgement || type == MSG_ALARM || type == MSG_ALARM_2) {
- sendResponse(channel, header, type, index, imei, alarm);
+
+ if (header == 0x2323) {
+ sendResponse(channel, header, type, 0x0001, imei, alarm);
+ } else {
+ sendResponse(channel, header, type, index, imei, alarm);
+ }
}
return position;