diff options
Diffstat (limited to 'src/org/traccar')
-rw-r--r-- | src/org/traccar/protocol/H02ProtocolDecoder.java | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/org/traccar/protocol/H02ProtocolDecoder.java b/src/org/traccar/protocol/H02ProtocolDecoder.java index b11a1e0e6..b78f21d8d 100644 --- a/src/org/traccar/protocol/H02ProtocolDecoder.java +++ b/src/org/traccar/protocol/H02ProtocolDecoder.java @@ -179,9 +179,12 @@ public class H02ProtocolDecoder extends BaseProtocolDecoder { .number("(x+),") // lac .number("(x+)#") // cid .or() - .expression(",.*") + .number(",(d+),") + .number("(d+),") + .number("(d+),") + .number("(d+)#") .or() - .text("#") + .any() .groupEnd() .compile(); @@ -262,6 +265,12 @@ public class H02ProtocolDecoder extends BaseProtocolDecoder { position.setNetwork(new Network(CellTower.fromLacCid(parser.nextInt(16), parser.nextInt(16)))); } + if (parser.hasNext(4)) { + for (int i = 1; i <= 4; i++) { + position.set(Position.PREFIX_IO + i, parser.nextInt()); + } + } + return position; } |