aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAnton Tananaev <anton@traccar.org>2022-06-29 17:33:08 -0700
committerAnton Tananaev <anton@traccar.org>2022-06-29 17:33:08 -0700
commite374041be79c95465cb4aea4d482ee90f5e531f5 (patch)
tree992b4edfe08b7729dd11d389b54f1496237f74f0 /src
parentef523bb4db2c48d7d07a326157d5758199ed293f (diff)
downloadtrackermap-server-e374041be79c95465cb4aea4d482ee90f5e531f5.tar.gz
trackermap-server-e374041be79c95465cb4aea4d482ee90f5e531f5.tar.bz2
trackermap-server-e374041be79c95465cb4aea4d482ee90f5e531f5.zip
Decode TLW2-12BL network info
Diffstat (limited to 'src')
-rw-r--r--src/main/java/org/traccar/protocol/T800xProtocolDecoder.java3
-rw-r--r--src/test/java/org/traccar/protocol/T800xProtocolDecoderTest.java3
2 files changed, 5 insertions, 1 deletions
diff --git a/src/main/java/org/traccar/protocol/T800xProtocolDecoder.java b/src/main/java/org/traccar/protocol/T800xProtocolDecoder.java
index b7a89f2e9..6e09e6e3b 100644
--- a/src/main/java/org/traccar/protocol/T800xProtocolDecoder.java
+++ b/src/main/java/org/traccar/protocol/T800xProtocolDecoder.java
@@ -58,6 +58,7 @@ public class T800xProtocolDecoder extends BaseProtocolDecoder {
public static final int MSG_DRIVER_BEHAVIOR_1 = 0x05; // 0x2626
public static final int MSG_DRIVER_BEHAVIOR_2 = 0x06; // 0x2626
public static final int MSG_BLE = 0x10;
+ public static final int MSG_NETWORK_2 = 0x11;
public static final int MSG_GPS_2 = 0x13;
public static final int MSG_ALARM_2 = 0x14;
public static final int MSG_COMMAND = 0x81;
@@ -167,7 +168,7 @@ public class T800xProtocolDecoder extends BaseProtocolDecoder {
return decodePosition(channel, deviceSession, buf, type, index, imei);
- } else if (type == MSG_NETWORK && header == 0x2727) {
+ } else if (type == MSG_NETWORK && header == 0x2727 || type == MSG_NETWORK_2) {
Position position = new Position(getProtocolName());
position.setDeviceId(deviceSession.getDeviceId());
diff --git a/src/test/java/org/traccar/protocol/T800xProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/T800xProtocolDecoderTest.java
index b5917e3cc..10d0aad59 100644
--- a/src/test/java/org/traccar/protocol/T800xProtocolDecoderTest.java
+++ b/src/test/java/org/traccar/protocol/T800xProtocolDecoderTest.java
@@ -12,6 +12,9 @@ public class T800xProtocolDecoderTest extends ProtocolTest {
var decoder = inject(new T800xProtocolDecoder(null));
verifyAttributes(decoder, binary(
+ "2525110055000208677300508924902206262035310c540045004c00430045004c0004454447450847534d20313930300f323134303734323036373835323839143839333430373131373930303936383037363846"));
+
+ verifyAttributes(decoder, binary(
"27271000247bd00860112047066487210407034238000005d7d17365e625ff640a730148"));
verifyAttributes(decoder, binary(