aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2014-09-06 12:31:12 +1200
committerAnton Tananaev <anton.tananaev@gmail.com>2014-09-06 12:31:12 +1200
commit74ad2ac02d59e0f809fb045eff96190c005f6e47 (patch)
treedca780ca736d76f18f8008bf746a755ca5c4ff17
parentc6b51634422b10766db0898b600cbc1acca94d0b (diff)
downloadtraccar-server-74ad2ac02d59e0f809fb045eff96190c005f6e47.tar.gz
traccar-server-74ad2ac02d59e0f809fb045eff96190c005f6e47.tar.bz2
traccar-server-74ad2ac02d59e0f809fb045eff96190c005f6e47.zip
Support m2m ip modem
-rw-r--r--src/org/traccar/protocol/T55ProtocolDecoder.java7
-rw-r--r--test/org/traccar/protocol/T55ProtocolDecoderTest.java2
2 files changed, 8 insertions, 1 deletions
diff --git a/src/org/traccar/protocol/T55ProtocolDecoder.java b/src/org/traccar/protocol/T55ProtocolDecoder.java
index e7a012f8d..da473d994 100644
--- a/src/org/traccar/protocol/T55ProtocolDecoder.java
+++ b/src/org/traccar/protocol/T55ProtocolDecoder.java
@@ -116,7 +116,12 @@ public class T55ProtocolDecoder extends BaseProtocolDecoder {
else if (sentence.startsWith("IMEI")) {
identify(sentence.substring(5, sentence.length()));
}
-
+
+ // Identification
+ else if (sentence.startsWith("$GPFID")) {
+ identify(sentence.substring(6, sentence.length()));
+ }
+
// Identification
else if (Character.isDigit(sentence.charAt(0)) & sentence.length() == 15) {
identify(sentence);
diff --git a/test/org/traccar/protocol/T55ProtocolDecoderTest.java b/test/org/traccar/protocol/T55ProtocolDecoderTest.java
index 4a8de708c..bf7cf9101 100644
--- a/test/org/traccar/protocol/T55ProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/T55ProtocolDecoderTest.java
@@ -12,6 +12,8 @@ public class T55ProtocolDecoderTest {
T55ProtocolDecoder decoder = new T55ProtocolDecoder(null);
decoder.setDataManager(new TestDataManager());
+
+ assertNull(decoder.decode(null, null, "$GPFID,ID123456ABC"));
assertNull(decoder.decode(null, null, "$PGID,359853000144328*0F"));