aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/org/traccar/protocol/Pt60ProtocolDecoder.java1
-rw-r--r--test/org/traccar/protocol/Pt60ProtocolDecoderTest.java3
2 files changed, 4 insertions, 0 deletions
diff --git a/src/org/traccar/protocol/Pt60ProtocolDecoder.java b/src/org/traccar/protocol/Pt60ProtocolDecoder.java
index 51a916475..636d9e27e 100644
--- a/src/org/traccar/protocol/Pt60ProtocolDecoder.java
+++ b/src/org/traccar/protocol/Pt60ProtocolDecoder.java
@@ -48,6 +48,7 @@ public class Pt60ProtocolDecoder extends BaseProtocolDecoder {
.number("(d+)[,|]") // imei
.number("d+[,|]") // imsi
.groupBegin()
+ .expression("[^,|]+[,|]").optional() // firmware version
.number("[01][,|]") // state
.number("d+[,|]") // battery
.groupEnd("?")
diff --git a/test/org/traccar/protocol/Pt60ProtocolDecoderTest.java b/test/org/traccar/protocol/Pt60ProtocolDecoderTest.java
index d2e06b193..4bd9ec27d 100644
--- a/test/org/traccar/protocol/Pt60ProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/Pt60ProtocolDecoderTest.java
@@ -11,6 +11,9 @@ public class Pt60ProtocolDecoderTest extends ProtocolTest {
Pt60ProtocolDecoder decoder = new Pt60ProtocolDecoder(null);
verifyNull(decoder, text(
+ "@B#@|01|003|864891030184954|9425010450971470|S6_EN_A_V1.3.7|0|66|20181122113251|40412,10461,1,425,18|49382,10461,1,425,9|40411,10461,1,425,7|2|"));
+
+ verifyNull(decoder, text(
"@B#@|01|033|864891030184954|9425010450971470|0|4|20181120151744|"));
verifyPosition(decoder, text(