aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2016-10-04 07:10:12 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2016-10-04 07:10:12 +1300
commit34b614e16714090a0b09de6defa91deab882beda (patch)
tree5ee0479e21cb8f526e76de5ff096b1655b5652e8
parent8f7ed4ed8ab881c480c22f605d1ff14918a3e43f (diff)
downloadtrackermap-server-34b614e16714090a0b09de6defa91deab882beda.tar.gz
trackermap-server-34b614e16714090a0b09de6defa91deab882beda.tar.bz2
trackermap-server-34b614e16714090a0b09de6defa91deab882beda.zip
Update Smokey protocol
-rw-r--r--src/org/traccar/protocol/SmokeyProtocolDecoder.java6
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
}*/