aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2018-11-19 23:49:54 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2018-11-19 23:49:54 +1300
commit8e859763e2d9f1805301b19f01430b1aeaae98c5 (patch)
tree4edbd9fa72680e5541261cd5a20713c570dfb058
parent7dd73afe4fe7f07e93e7fbfbb7ed4e1e4e94d10a (diff)
downloadtraccar-server-8e859763e2d9f1805301b19f01430b1aeaae98c5.tar.gz
traccar-server-8e859763e2d9f1805301b19f01430b1aeaae98c5.tar.bz2
traccar-server-8e859763e2d9f1805301b19f01430b1aeaae98c5.zip
Update XRB 28 responses
-rw-r--r--src/org/traccar/protocol/Xrb28ProtocolDecoder.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/org/traccar/protocol/Xrb28ProtocolDecoder.java b/src/org/traccar/protocol/Xrb28ProtocolDecoder.java
index 9c5bc741a..527fa4254 100644
--- a/src/org/traccar/protocol/Xrb28ProtocolDecoder.java
+++ b/src/org/traccar/protocol/Xrb28ProtocolDecoder.java
@@ -77,12 +77,12 @@ public class Xrb28ProtocolDecoder extends BaseProtocolDecoder {
if (channel != null) {
if (type.matches("L0|L1|W0|E1")) {
channel.write(new NetworkMessage(
- sentence.substring(0, 27).replace("SCOR", "SCOS") + "#\n",
+ "\u00ff\u00ff*SCOS" + sentence.substring(5, 27) + "#\n",
remoteAddress));
} else if (type.equals("R0") && pendingCommand != null) {
String command = pendingCommand.equals(Command.TYPE_ALARM_ARM) ? "L1," : "L0,";
channel.write(new NetworkMessage(
- sentence.substring(0, 25).replace("SCOR", "SCOS") + command + sentence.substring(30) + "\n",
+ "\u00ff\u00ff*SCOS" + sentence.substring(5, 25) + command + sentence.substring(30) + "\n",
remoteAddress));
pendingCommand = null;
}