From c19ed090b8d6c959ee8e3b8fab16a2137dc18ccd Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Tue, 2 Feb 2021 20:29:59 -0800 Subject: Decode additional attributes --- src/main/java/org/traccar/protocol/Minifinder2ProtocolDecoder.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/main/java/org') diff --git a/src/main/java/org/traccar/protocol/Minifinder2ProtocolDecoder.java b/src/main/java/org/traccar/protocol/Minifinder2ProtocolDecoder.java index 89217a39b..68e9e8dd5 100644 --- a/src/main/java/org/traccar/protocol/Minifinder2ProtocolDecoder.java +++ b/src/main/java/org/traccar/protocol/Minifinder2ProtocolDecoder.java @@ -189,13 +189,17 @@ public class Minifinder2ProtocolDecoder extends BaseProtocolDecoder { case 0x28: int beaconFlags = buf.readUnsignedByte(); position.set("tagId", ByteBufUtil.hexDump(buf.readSlice(6))); - buf.readUnsignedByte(); // rssi + position.set("tagRssi", buf.readUnsignedByte()); buf.readUnsignedByte(); // 1m rssi if (BitUtil.check(beaconFlags, 7)) { position.setLatitude(buf.readIntLE() * 0.0000001); position.setLongitude(buf.readIntLE() * 0.0000001); hasLocation = true; } + if (BitUtil.check(beaconFlags, 6)) { + position.set("description", buf.readCharSequence( + endIndex - buf.readerIndex(), StandardCharsets.US_ASCII).toString()); + } break; case 0x30: buf.readUnsignedInt(); // timestamp -- cgit v1.2.3