aboutsummaryrefslogtreecommitdiff
path: root/src/org
diff options
context:
space:
mode:
Diffstat (limited to 'src/org')
-rw-r--r--src/org/traccar/protocol/Gl200TextProtocolDecoder.java8
-rw-r--r--src/org/traccar/protocol/Vt200ProtocolDecoder.java2
2 files changed, 8 insertions, 2 deletions
diff --git a/src/org/traccar/protocol/Gl200TextProtocolDecoder.java b/src/org/traccar/protocol/Gl200TextProtocolDecoder.java
index 57fecc3fe..63adb1c70 100644
--- a/src/org/traccar/protocol/Gl200TextProtocolDecoder.java
+++ b/src/org/traccar/protocol/Gl200TextProtocolDecoder.java
@@ -66,7 +66,7 @@ public class Gl200TextProtocolDecoder extends BaseProtocolDecoder {
.expression("(?:[^,]+)?,") // device name
.number("(xx),") // state
.expression("(?:[0-9F]{20})?,") // iccid
- .number("d{1,2},")
+ .number("(d{1,2}),") // rssi
.number("d{1,2},")
.expression("[01],") // external power
.number("([d.]+)?,") // odometer or external power
@@ -388,6 +388,10 @@ public class Gl200TextProtocolDecoder extends BaseProtocolDecoder {
}
private Object decodeInf(Channel channel, SocketAddress remoteAddress, String sentence) {
+
+ org.traccar.helper.PatternUtil.MatchResult matchResult =
+ org.traccar.helper.PatternUtil.checkPattern(PATTERN_INF.pattern(), sentence);
+
Parser parser = new Parser(PATTERN_INF, sentence);
Position position = initPosition(parser, channel, remoteAddress);
if (position == null) {
@@ -396,6 +400,8 @@ public class Gl200TextProtocolDecoder extends BaseProtocolDecoder {
position.set(Position.KEY_STATUS, parser.next());
+ position.set(Position.KEY_RSSI, parser.nextInt());
+
parser.next(); // odometer or external power
position.set(Position.KEY_BATTERY, parser.nextDouble(0));
diff --git a/src/org/traccar/protocol/Vt200ProtocolDecoder.java b/src/org/traccar/protocol/Vt200ProtocolDecoder.java
index f9683f12f..111c29313 100644
--- a/src/org/traccar/protocol/Vt200ProtocolDecoder.java
+++ b/src/org/traccar/protocol/Vt200ProtocolDecoder.java
@@ -57,7 +57,7 @@ public class Vt200ProtocolDecoder extends BaseProtocolDecoder {
int type = buf.readUnsignedShort();
buf.readUnsignedShort(); // length
- if (type == 0x2084 || type == 0x2082) {
+ if (type == 0x2086 || type == 0x2084 || type == 0x2082) {
Position position = new Position();
position.setProtocol(getProtocolName());