aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/protocol
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/traccar/protocol')
-rw-r--r--src/org/traccar/protocol/OigoProtocolDecoder.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/org/traccar/protocol/OigoProtocolDecoder.java b/src/org/traccar/protocol/OigoProtocolDecoder.java
index 799f47ea3..bbea38183 100644
--- a/src/org/traccar/protocol/OigoProtocolDecoder.java
+++ b/src/org/traccar/protocol/OigoProtocolDecoder.java
@@ -54,7 +54,7 @@ public class OigoProtocolDecoder extends BaseProtocolDecoder {
DeviceSession deviceSession;
switch (BitUtil.to(tag, 3)) {
case 0:
- String imei = ChannelBuffers.hexDump(buf.readBytes(9)).substring(1, 1 + 15);
+ String imei = ChannelBuffers.hexDump(buf.readBytes(8)).substring(1);
deviceSession = getDeviceSession(channel, remoteAddress, imei);
break;
case 1:
@@ -75,6 +75,8 @@ public class OigoProtocolDecoder extends BaseProtocolDecoder {
position.setProtocol(getProtocolName());
position.setDeviceId(deviceSession.getDeviceId());
+ position.set(Position.KEY_EVENT, buf.readUnsignedByte());
+
int mask = buf.readInt();
if (BitUtil.check(mask, 0)) {