aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2019-02-13 23:45:43 -0800
committerAnton Tananaev <anton.tananaev@gmail.com>2019-02-13 23:45:43 -0800
commit6fd9d34b4eaf60289462a87096fdda587ea74482 (patch)
tree0b783f06e3acad89ca2561d16e554aa100fa3b86
parent348dd070a30509794265e444027dac6f5c5e120e (diff)
downloadtrackermap-server-6fd9d34b4eaf60289462a87096fdda587ea74482.tar.gz
trackermap-server-6fd9d34b4eaf60289462a87096fdda587ea74482.tar.bz2
trackermap-server-6fd9d34b4eaf60289462a87096fdda587ea74482.zip
Support Sierra Wireless GX440 login
-rw-r--r--src/org/traccar/protocol/T55ProtocolDecoder.java2
-rw-r--r--test/org/traccar/protocol/T55ProtocolDecoderTest.java3
2 files changed, 5 insertions, 0 deletions
diff --git a/src/org/traccar/protocol/T55ProtocolDecoder.java b/src/org/traccar/protocol/T55ProtocolDecoder.java
index 214a40a49..ba231a635 100644
--- a/src/org/traccar/protocol/T55ProtocolDecoder.java
+++ b/src/org/traccar/protocol/T55ProtocolDecoder.java
@@ -249,6 +249,8 @@ public class T55ProtocolDecoder extends BaseProtocolDecoder {
if (sentence.startsWith("$PGID")) {
getDeviceSession(channel, remoteAddress, sentence.substring(6, sentence.length() - 3));
+ } else if (sentence.startsWith("$DEVID")) {
+ getDeviceSession(channel, remoteAddress, sentence.substring(7, sentence.lastIndexOf('*')));
} else if (sentence.startsWith("$PCPTI")) {
getDeviceSession(channel, remoteAddress, sentence.substring(7, sentence.indexOf(",", 7)));
} else if (sentence.startsWith("IMEI")) {
diff --git a/test/org/traccar/protocol/T55ProtocolDecoderTest.java b/test/org/traccar/protocol/T55ProtocolDecoderTest.java
index c5737f367..f21acdee7 100644
--- a/test/org/traccar/protocol/T55ProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/T55ProtocolDecoderTest.java
@@ -10,6 +10,9 @@ public class T55ProtocolDecoderTest extends ProtocolTest {
T55ProtocolDecoder decoder = new T55ProtocolDecoder(null);
+ verifyNull(decoder, text(
+ "$DEVID,0x0103846677F21422*41"));
+
verifyPosition(decoder, text(
"660420156A0066AA$GPRMC,122806.0,A,0119.212178,N,10355.000942,E,0.0,,230119,0.0,E,A*27"));