diff options
author | Anton Tananaev <anton@traccar.org> | 2023-10-01 05:39:45 +0900 |
---|---|---|
committer | Anton Tananaev <anton@traccar.org> | 2023-10-01 05:39:45 +0900 |
commit | 65f54c200cf0dcadaa9a1ce685e3eaeb88ce7506 (patch) | |
tree | 6d53d15fb47a9a5785737462f72c6c93a7505bbf /src/main/java/org/traccar/protocol | |
parent | fae601aa36d83828cba16e3405ada179ce7d1e57 (diff) | |
download | trackermap-server-65f54c200cf0dcadaa9a1ce685e3eaeb88ce7506.tar.gz trackermap-server-65f54c200cf0dcadaa9a1ce685e3eaeb88ce7506.tar.bz2 trackermap-server-65f54c200cf0dcadaa9a1ce685e3eaeb88ce7506.zip |
Support FMT100 EYE beacon
Diffstat (limited to 'src/main/java/org/traccar/protocol')
-rw-r--r-- | src/main/java/org/traccar/protocol/TeltonikaProtocolDecoder.java | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/src/main/java/org/traccar/protocol/TeltonikaProtocolDecoder.java b/src/main/java/org/traccar/protocol/TeltonikaProtocolDecoder.java index e888642b4..16c1dd210 100644 --- a/src/main/java/org/traccar/protocol/TeltonikaProtocolDecoder.java +++ b/src/main/java/org/traccar/protocol/TeltonikaProtocolDecoder.java @@ -588,6 +588,34 @@ public class TeltonikaProtocolDecoder extends BaseProtocolDecoder { } index += 1; } + } else if (id == 10829 || id == 10831) { + ByteBuf data = buf.readSlice(length); + data.readUnsignedByte(); // header + for (int i = 1; data.isReadable(); i++) { + ByteBuf beacon = data.readSlice(data.readUnsignedByte()); + while (beacon.isReadable()) { + int parameterId = beacon.readUnsignedByte(); + int parameterLength = beacon.readUnsignedByte(); + switch (parameterId) { + case 0: + position.set("tag" + i + "Rssi", (int) beacon.readByte()); + break; + case 1: + String beaconId = ByteBufUtil.hexDump(beacon.readSlice(parameterLength)); + position.set("tag" + i + "Id", beaconId); + break; + case 13: + position.set("tag" + i + "LowBattery", beacon.readUnsignedByte()); + break; + case 14: + position.set("tag" + i + "Battery", beacon.readUnsignedShort()); + break; + default: + beacon.skipBytes(parameterLength); + break; + } + } + } } else { position.set(Position.PREFIX_IO + id, ByteBufUtil.hexDump(buf.readSlice(length))); } |