From 972f237cd98dc477a1b497fed8270e3bdd6b6813 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Mon, 2 Dec 2019 08:56:33 -0800 Subject: Update frame decoder --- src/main/java/org/traccar/protocol/SuntechFrameDecoder.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/main/java/org/traccar/protocol') diff --git a/src/main/java/org/traccar/protocol/SuntechFrameDecoder.java b/src/main/java/org/traccar/protocol/SuntechFrameDecoder.java index 7b8337468..8748ecc61 100644 --- a/src/main/java/org/traccar/protocol/SuntechFrameDecoder.java +++ b/src/main/java/org/traccar/protocol/SuntechFrameDecoder.java @@ -32,7 +32,7 @@ public class SuntechFrameDecoder extends BaseFrameDecoder { protected Object decode( ChannelHandlerContext ctx, Channel channel, ByteBuf buf) throws Exception { - if (buf.getByte(buf.readerIndex()) == (byte) 0x81) { + if (buf.getByte(buf.readerIndex() + 1) == 0) { int length = 1 + 2 + buf.getShort(buf.readerIndex() + 1); if (buf.readableBytes() >= length) { -- cgit v1.2.3