aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2017-09-13 04:38:18 +1200
committerAnton Tananaev <anton.tananaev@gmail.com>2017-09-13 14:49:58 +1200
commite05f0b83a911c522123a5a2cd14d6c16bd2de027 (patch)
treeaa2de6cb187fd06c8d9f46689e5d5989fb359add
parent195e7b5b45c08fa4fad4f9c8797f8807ded1dbea (diff)
downloadtrackermap-server-e05f0b83a911c522123a5a2cd14d6c16bd2de027.tar.gz
trackermap-server-e05f0b83a911c522123a5a2cd14d6c16bd2de027.tar.bz2
trackermap-server-e05f0b83a911c522123a5a2cd14d6c16bd2de027.zip
Fix GV200 INF message decoding
-rw-r--r--src/org/traccar/protocol/Gl200TextProtocolDecoder.java2
-rw-r--r--test/org/traccar/protocol/Gl200TextProtocolDecoderTest.java3
2 files changed, 4 insertions, 1 deletions
diff --git a/src/org/traccar/protocol/Gl200TextProtocolDecoder.java b/src/org/traccar/protocol/Gl200TextProtocolDecoder.java
index 988fd71c8..090e02812 100644
--- a/src/org/traccar/protocol/Gl200TextProtocolDecoder.java
+++ b/src/org/traccar/protocol/Gl200TextProtocolDecoder.java
@@ -65,7 +65,7 @@ public class Gl200TextProtocolDecoder extends BaseProtocolDecoder {
.expression("(?:[0-9A-Z]{17},)?") // vin
.expression("(?:[^,]+)?,") // device name
.number("(xx),") // state
- .expression("(?:[0-9F]{20})?,") // iccid
+ .expression("(?:[0-9Ff]{20})?,") // iccid
.number("(d{1,2}),") // rssi
.number("d{1,2},")
.expression("[01],") // external power
diff --git a/test/org/traccar/protocol/Gl200TextProtocolDecoderTest.java b/test/org/traccar/protocol/Gl200TextProtocolDecoderTest.java
index 812973fb8..2b0395e48 100644
--- a/test/org/traccar/protocol/Gl200TextProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/Gl200TextProtocolDecoderTest.java
@@ -11,6 +11,9 @@ public class Gl200TextProtocolDecoderTest extends ProtocolTest {
Gl200TextProtocolDecoder decoder = new Gl200TextProtocolDecoder(new Gl200Protocol());
verifyAttributes(decoder, buffer(
+ "+RESP:GTINF,04040E,861074023747143,gv200,41,8959301000648637556f,24,0,1,0,1,4.4,0,1,0,0,20170912221854,0,00,01,-0500,1,20170912193448,1D5B$"));
+
+ verifyAttributes(decoder, buffer(
"+RESP:GTINF,210102,354524044950583,,42,89011702272048900184,11,99,0,,,4.08,0,1,1,0,0,20170831170831,87,0.00,,,,20170831171010,0064$"));
verifyPosition(decoder, buffer(