From f439d7b06285ce442cd721391aadede3ff6ac702 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Tue, 29 May 2018 20:20:12 +1200 Subject: Implement Sabertek response --- src/org/traccar/protocol/SabertekProtocolDecoder.java | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src') diff --git a/src/org/traccar/protocol/SabertekProtocolDecoder.java b/src/org/traccar/protocol/SabertekProtocolDecoder.java index d1f88dc5e..715aa37f2 100644 --- a/src/org/traccar/protocol/SabertekProtocolDecoder.java +++ b/src/org/traccar/protocol/SabertekProtocolDecoder.java @@ -15,6 +15,7 @@ */ package org.traccar.protocol; +import org.jboss.netty.buffer.ChannelBuffers; import org.jboss.netty.channel.Channel; import org.traccar.BaseProtocolDecoder; import org.traccar.DeviceSession; @@ -69,6 +70,9 @@ public class SabertekProtocolDecoder extends BaseProtocolDecoder { } DeviceSession deviceSession = getDeviceSession(channel, remoteAddress, parser.next()); + if (channel != null) { + channel.write(ChannelBuffers.wrappedBuffer(new byte[]{(byte) (deviceSession != null ? 0x06 : 0x15)})); + } if (deviceSession == null) { return null; } -- cgit v1.2.3