From 497627bc9fc7ab9330295ba463b50f4085b6be9b Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Tue, 13 Sep 2016 23:37:14 +1200 Subject: Put back H02 frame decoder hack --- src/org/traccar/protocol/H02FrameDecoder.java | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/org') diff --git a/src/org/traccar/protocol/H02FrameDecoder.java b/src/org/traccar/protocol/H02FrameDecoder.java index 572ac979e..feba8033d 100644 --- a/src/org/traccar/protocol/H02FrameDecoder.java +++ b/src/org/traccar/protocol/H02FrameDecoder.java @@ -34,6 +34,13 @@ public class H02FrameDecoder extends FrameDecoder { char marker = (char) buf.getByte(buf.readerIndex()); + while (marker != '*' && marker != '$' && buf.readableBytes() > 0) { + buf.skipBytes(1); + if (buf.readableBytes() > 0) { + marker = (char) buf.getByte(buf.readerIndex()); + } + } + if (marker == '*') { // Return text message -- cgit v1.2.3