aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org
diff options
context:
space:
mode:
authorAnton Tananaev <anton@traccar.org>2023-07-12 07:44:58 -0700
committerAnton Tananaev <anton@traccar.org>2023-07-12 07:44:58 -0700
commit2be2a4558ace9825a69aecf6329305490eb5fe5e (patch)
tree4ad3ff12e9b51d50117046cc69ae505f46f7d151 /src/main/java/org
parent7325030436e5fc42b6998240a0c5696a1d4fed5a (diff)
downloadtrackermap-server-2be2a4558ace9825a69aecf6329305490eb5fe5e.tar.gz
trackermap-server-2be2a4558ace9825a69aecf6329305490eb5fe5e.tar.bz2
trackermap-server-2be2a4558ace9825a69aecf6329305490eb5fe5e.zip
Support JM-VL03 messages
Diffstat (limited to 'src/main/java/org')
-rw-r--r--src/main/java/org/traccar/protocol/Gt06ProtocolDecoder.java14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/main/java/org/traccar/protocol/Gt06ProtocolDecoder.java b/src/main/java/org/traccar/protocol/Gt06ProtocolDecoder.java
index e1bc2b5ad..f7cdd3920 100644
--- a/src/main/java/org/traccar/protocol/Gt06ProtocolDecoder.java
+++ b/src/main/java/org/traccar/protocol/Gt06ProtocolDecoder.java
@@ -96,7 +96,7 @@ public class Gt06ProtocolDecoder extends BaseProtocolDecoder {
public static final int MSG_INFO = 0x94;
public static final int MSG_SERIAL = 0x9B;
public static final int MSG_STRING_INFO = 0x21;
- public static final int MSG_GPS_2 = 0xA0; // GK310
+ public static final int MSG_GPS_LBS_7 = 0xA0; // GK310 & JM-VL03
public static final int MSG_LBS_2 = 0xA1; // GK310
public static final int MSG_WIFI_3 = 0xA2; // GK310
public static final int MSG_FENCE_SINGLE = 0xA3; // GK310
@@ -170,7 +170,7 @@ public class Gt06ProtocolDecoder extends BaseProtocolDecoder {
case MSG_GPS_LBS_STATUS_4:
case MSG_GPS_PHONE:
case MSG_GPS_LBS_EXTEND:
- case MSG_GPS_2:
+ case MSG_GPS_LBS_7:
case MSG_FENCE_SINGLE:
case MSG_FENCE_MULTI:
return true;
@@ -192,7 +192,7 @@ public class Gt06ProtocolDecoder extends BaseProtocolDecoder {
case MSG_GPS_LBS_STATUS_2:
case MSG_GPS_LBS_STATUS_3:
case MSG_GPS_LBS_STATUS_4:
- case MSG_GPS_2:
+ case MSG_GPS_LBS_7:
case MSG_FENCE_SINGLE:
case MSG_FENCE_MULTI:
case MSG_LBS_ALARM:
@@ -351,7 +351,7 @@ public class Gt06ProtocolDecoder extends BaseProtocolDecoder {
lac = buf.readUnsignedShort();
}
long cid;
- if (type == MSG_LBS_ALARM) {
+ if (type == MSG_LBS_ALARM || type == MSG_GPS_LBS_7) {
cid = buf.readLong();
} else if (type == MSG_GPS_LBS_6) {
cid = buf.readUnsignedInt();
@@ -919,6 +919,12 @@ public class Gt06ProtocolDecoder extends BaseProtocolDecoder {
}
}
+ if (type == MSG_GPS_LBS_7) {
+ position.set(Position.KEY_IGNITION, buf.readUnsignedByte() > 0);
+ buf.readUnsignedByte(); // upload mode
+ position.set(Position.KEY_ARCHIVE, buf.readUnsignedByte() > 0 ? true : null);
+ }
+
if (buf.readableBytes() == 4 + 6) {
position.set(Position.KEY_ODOMETER, buf.readUnsignedInt());
}