From 8f2c293e0fc7a0ddcfcc4aa86cbbfc01d5b098be Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Wed, 25 Sep 2019 00:26:31 -0700 Subject: Support M101 protocol --- src/main/java/org/traccar/protocol/Jt600ProtocolDecoder.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/main/java/org/traccar') diff --git a/src/main/java/org/traccar/protocol/Jt600ProtocolDecoder.java b/src/main/java/org/traccar/protocol/Jt600ProtocolDecoder.java index da055dff3..82abeb42e 100644 --- a/src/main/java/org/traccar/protocol/Jt600ProtocolDecoder.java +++ b/src/main/java/org/traccar/protocol/Jt600ProtocolDecoder.java @@ -92,7 +92,7 @@ public class Jt600ProtocolDecoder extends BaseProtocolDecoder { buf.readByte(); // header - boolean longFormat = buf.getUnsignedByte(buf.readerIndex()) == 0x75; + boolean longFormat = buf.getUnsignedByte(buf.readerIndex()) >> 4 == 0x7; String id = String.valueOf(Long.parseLong(ByteBufUtil.hexDump(buf.readSlice(5)))); DeviceSession deviceSession = getDeviceSession(channel, remoteAddress, id); -- cgit v1.2.3