aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/traccar')
-rw-r--r--src/org/traccar/protocol/Gps103ProtocolDecoder.java11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/org/traccar/protocol/Gps103ProtocolDecoder.java b/src/org/traccar/protocol/Gps103ProtocolDecoder.java
index 2558c1c33..f96f30090 100644
--- a/src/org/traccar/protocol/Gps103ProtocolDecoder.java
+++ b/src/org/traccar/protocol/Gps103ProtocolDecoder.java
@@ -94,14 +94,19 @@ public class Gps103ProtocolDecoder extends BaseProtocolDecoder {
Integer index = 1;
// Get device by IMEI
- if (!identify(parser.group(index++))) {
+ String imei = parser.group(index++);
+ if (!identify(imei)) {
return null;
}
position.setDeviceId(getDeviceId());
// Alarm message
- position.set(Event.KEY_ALARM, parser.group(index++));
-
+ String alarm = parser.group(index++);
+ position.set(Event.KEY_ALARM, alarm);
+ if (channel != null && alarm.equals("help me")) {
+ channel.write("**,imei:" + imei + ",E;", remoteAddress);
+ }
+
// Date
Calendar time = Calendar.getInstance(TimeZone.getTimeZone("UTC"));
time.clear();