diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2013-02-26 19:41:04 +1300 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2013-02-26 19:41:04 +1300 |
commit | 4fced732754e221871d52bef179d8962661f1835 (patch) | |
tree | 8a5e7e0b43620d62a0db6a749824351721e71feb /src/org/traccar/protocol | |
parent | fbba01063cf4f79d83d58700f1e19486c8b26f16 (diff) | |
download | traccar-server-4fced732754e221871d52bef179d8962661f1835.tar.gz traccar-server-4fced732754e221871d52bef179d8962661f1835.tar.bz2 traccar-server-4fced732754e221871d52bef179d8962661f1835.zip |
Add GpsGate version check (fix #145)
Diffstat (limited to 'src/org/traccar/protocol')
-rw-r--r-- | src/org/traccar/protocol/GpsGateProtocolDecoder.java | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/org/traccar/protocol/GpsGateProtocolDecoder.java b/src/org/traccar/protocol/GpsGateProtocolDecoder.java index f755a4ce5..ab9a8a872 100644 --- a/src/org/traccar/protocol/GpsGateProtocolDecoder.java +++ b/src/org/traccar/protocol/GpsGateProtocolDecoder.java @@ -87,8 +87,13 @@ public class GpsGateProtocolDecoder extends BaseProtocolDecoder { } } + // Protocol version check + else if (sentence.startsWith("$FRVER,")) { + send(channel, "$FRVER,1,1,GpsGate Server 1.0"); + } + // Process data - else if (sentence.contains("$GPRMC") && deviceId != null) { + else if (sentence.startsWith("$GPRMC,") && deviceId != null) { // Parse message Matcher parser = pattern.matcher(sentence); |