From 1b4bcb2cef3f4e3907ed0820478f2f3cae245c7f Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Sat, 15 Jul 2017 11:41:44 +1200 Subject: Fix TK103 identification issue --- src/org/traccar/protocol/Tk103ProtocolDecoder.java | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) (limited to 'src/org/traccar') diff --git a/src/org/traccar/protocol/Tk103ProtocolDecoder.java b/src/org/traccar/protocol/Tk103ProtocolDecoder.java index 4c7da12e0..0106e5bf3 100644 --- a/src/org/traccar/protocol/Tk103ProtocolDecoder.java +++ b/src/org/traccar/protocol/Tk103ProtocolDecoder.java @@ -200,17 +200,11 @@ public class Tk103ProtocolDecoder extends BaseProtocolDecoder { if (channel != null) { String id = sentence.substring(0, 12); String type = sentence.substring(12, 16); - if (type.equals("BP00") || type.equals("BP05")) { - String content = sentence.substring(16); - if (content.length() >= 15) { - getDeviceSession(channel, remoteAddress, content.substring(0, 15)); - } - if (type.equals("BP00")) { - channel.write("(" + id + "AP01HSO)"); - return null; - } else if (type.equals("BP05")) { - channel.write("(" + id + "AP05)"); - } + if (type.equals("BP00")) { + channel.write("(" + id + "AP01HSO)"); + return null; + } else if (type.equals("BP05")) { + channel.write("(" + id + "AP05)"); } } -- cgit v1.2.3