From 34b614e16714090a0b09de6defa91deab882beda Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Tue, 4 Oct 2016 07:10:12 +1300 Subject: Update Smokey protocol --- src/org/traccar/protocol/SmokeyProtocolDecoder.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/org/traccar/protocol') diff --git a/src/org/traccar/protocol/SmokeyProtocolDecoder.java b/src/org/traccar/protocol/SmokeyProtocolDecoder.java index b57e05871..afdd40d1d 100644 --- a/src/org/traccar/protocol/SmokeyProtocolDecoder.java +++ b/src/org/traccar/protocol/SmokeyProtocolDecoder.java @@ -40,16 +40,18 @@ public class SmokeyProtocolDecoder extends BaseProtocolDecoder { buf.skipBytes(2); // header buf.readUnsignedByte(); // protocol version + int type = buf.readUnsignedByte(); + String id = ChannelBuffers.hexDump(buf.readBytes(8)); DeviceSession deviceSession = getDeviceSession(channel, remoteAddress, id); if (deviceSession == null) { return null; } - int type = buf.readUnsignedByte(); - if (type == 0) { + buf.readUnsignedShort(); // firmware version + /*if (channel != null) { // TODO send ack }*/ -- cgit v1.2.3