diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2016-10-04 07:10:12 +1300 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2016-10-04 07:10:12 +1300 |
commit | 34b614e16714090a0b09de6defa91deab882beda (patch) | |
tree | 5ee0479e21cb8f526e76de5ff096b1655b5652e8 /src/org/traccar | |
parent | 8f7ed4ed8ab881c480c22f605d1ff14918a3e43f (diff) | |
download | trackermap-server-34b614e16714090a0b09de6defa91deab882beda.tar.gz trackermap-server-34b614e16714090a0b09de6defa91deab882beda.tar.bz2 trackermap-server-34b614e16714090a0b09de6defa91deab882beda.zip |
Update Smokey protocol
Diffstat (limited to 'src/org/traccar')
-rw-r--r-- | src/org/traccar/protocol/SmokeyProtocolDecoder.java | 6 |
1 files changed, 4 insertions, 2 deletions
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 }*/ |