From 4fced732754e221871d52bef179d8962661f1835 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Tue, 26 Feb 2013 19:41:04 +1300 Subject: Add GpsGate version check (fix #145) --- src/org/traccar/protocol/GpsGateProtocolDecoder.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/org') 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); -- cgit v1.2.3