From dcdea45edb7ee84b3eafd5593965e30b5cc077ab Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Mon, 28 Nov 2011 11:47:28 +0000 Subject: --- src/org/traccar/protocol/gl100/Gl100ProtocolDecoder.java | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/org/traccar/protocol/gl100') diff --git a/src/org/traccar/protocol/gl100/Gl100ProtocolDecoder.java b/src/org/traccar/protocol/gl100/Gl100ProtocolDecoder.java index e2c576d69..25ce737fc 100644 --- a/src/org/traccar/protocol/gl100/Gl100ProtocolDecoder.java +++ b/src/org/traccar/protocol/gl100/Gl100ProtocolDecoder.java @@ -84,6 +84,14 @@ public class Gl100ProtocolDecoder extends OneToOneDecoder { String sentence = (String) msg; + // Send response + if (sentence.contains("AT+GTHBD=")) { + String response = "+RESP:GTHBD,GPRS ACTIVE,"; + response += sentence.substring(9, sentence.lastIndexOf(',')); + response += '\0'; + channel.write(response); + } + // Parse message Matcher parser = pattern.matcher(sentence); if (!parser.matches()) { -- cgit v1.2.3