aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/protocol
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2018-11-24 20:18:13 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2018-11-24 20:18:13 +1300
commit80d858b847cba10197ff64ffeaba8293e7a1276a (patch)
treeb8ecceb76beeb8866ba3f5f3f97461369d3be57a /src/org/traccar/protocol
parent26a22bfb11e7e71ce06628ee397eb06b2a66d231 (diff)
downloadtrackermap-server-80d858b847cba10197ff64ffeaba8293e7a1276a.tar.gz
trackermap-server-80d858b847cba10197ff64ffeaba8293e7a1276a.tar.bz2
trackermap-server-80d858b847cba10197ff64ffeaba8293e7a1276a.zip
Support GT06 ICCID decoding
Diffstat (limited to 'src/org/traccar/protocol')
-rw-r--r--src/org/traccar/protocol/Gt06ProtocolDecoder.java11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/org/traccar/protocol/Gt06ProtocolDecoder.java b/src/org/traccar/protocol/Gt06ProtocolDecoder.java
index 3bbc09e2a..9431af030 100644
--- a/src/org/traccar/protocol/Gt06ProtocolDecoder.java
+++ b/src/org/traccar/protocol/Gt06ProtocolDecoder.java
@@ -739,23 +739,22 @@ public class Gt06ProtocolDecoder extends BaseProtocolDecoder {
getLastLocation(position, null);
if (subType == 0x00) {
-
position.set(Position.KEY_POWER, buf.readUnsignedShort() * 0.01);
return position;
-
} else if (subType == 0x05) {
-
int flags = buf.readUnsignedByte();
position.set(Position.KEY_DOOR, BitUtil.check(flags, 0));
position.set(Position.PREFIX_IO + 1, BitUtil.check(flags, 2));
return position;
-
+ } else if (subType == 0x0a) {
+ buf.skipBytes(8); // imei
+ buf.skipBytes(8); // imsi
+ position.set("iccid", ByteBufUtil.hexDump(buf.readSlice(8)));
+ return position;
} else if (subType == 0x0d) {
-
buf.skipBytes(6);
return decodeFuelData(position, buf.toString(
buf.readerIndex(), buf.readableBytes() - 4 - 2, StandardCharsets.US_ASCII));
-
}
} else if (type == MSG_X1_PHOTO_DATA) {