From 2c399d684178dc0a22b1c8e50ad6eff000c41062 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Fri, 29 Nov 2019 10:32:02 -0800 Subject: Detect binary messages --- src/main/java/org/traccar/protocol/SuntechProtocolDecoder.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/main') diff --git a/src/main/java/org/traccar/protocol/SuntechProtocolDecoder.java b/src/main/java/org/traccar/protocol/SuntechProtocolDecoder.java index 601d127f1..f9fcfe79d 100644 --- a/src/main/java/org/traccar/protocol/SuntechProtocolDecoder.java +++ b/src/main/java/org/traccar/protocol/SuntechProtocolDecoder.java @@ -625,7 +625,7 @@ public class SuntechProtocolDecoder extends BaseProtocolDecoder { ByteBuf buf = (ByteBuf) msg; - if (buf.getByte(buf.readerIndex()) == (byte) 0x81) { + if (buf.getByte(buf.readerIndex() + 1) == 0) { return decodeBinary(channel, remoteAddress, buf); -- cgit v1.2.3