From 74ad2ac02d59e0f809fb045eff96190c005f6e47 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Sat, 6 Sep 2014 12:31:12 +1200 Subject: Support m2m ip modem --- src/org/traccar/protocol/T55ProtocolDecoder.java | 7 ++++++- test/org/traccar/protocol/T55ProtocolDecoderTest.java | 2 ++ 2 files changed, 8 insertions(+), 1 deletion(-) 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")); -- cgit v1.2.3