aboutsummaryrefslogtreecommitdiff
path: root/src/main/java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/org/traccar/protocol/H02ProtocolDecoder.java9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/main/java/org/traccar/protocol/H02ProtocolDecoder.java b/src/main/java/org/traccar/protocol/H02ProtocolDecoder.java
index 22bbe4441..137689a67 100644
--- a/src/main/java/org/traccar/protocol/H02ProtocolDecoder.java
+++ b/src/main/java/org/traccar/protocol/H02ProtocolDecoder.java
@@ -554,9 +554,18 @@ public class H02ProtocolDecoder extends BaseProtocolDecoder {
String sentence = buf.toString(StandardCharsets.US_ASCII).trim();
int typeStart = sentence.indexOf(',', sentence.indexOf(',') + 1) + 1;
int typeEnd = sentence.indexOf(',', typeStart);
+ if (typeEnd < 0) {
+ typeEnd = sentence.indexOf('#', typeStart);
+ }
if (typeEnd > 0) {
String type = sentence.substring(typeStart, typeEnd);
switch (type) {
+ case "V0":
+ case "HTBT":
+ if (channel != null) {
+ channel.writeAndFlush(new NetworkMessage(sentence, remoteAddress));
+ }
+ return null;
case "NBR":
return decodeLbs(sentence, channel, remoteAddress);
case "LINK":