aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/protocol/H02ProtocolDecoder.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/traccar/protocol/H02ProtocolDecoder.java')
-rw-r--r--src/org/traccar/protocol/H02ProtocolDecoder.java3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/org/traccar/protocol/H02ProtocolDecoder.java b/src/org/traccar/protocol/H02ProtocolDecoder.java
index 7bf589bef..463c0af27 100644
--- a/src/org/traccar/protocol/H02ProtocolDecoder.java
+++ b/src/org/traccar/protocol/H02ProtocolDecoder.java
@@ -64,8 +64,7 @@ public class H02ProtocolDecoder extends BaseProtocolDecoder {
buf.readByte(); // marker
// Identification
- String id = String.valueOf(
- (buf.readUnsignedInt() << 8) + buf.readUnsignedByte());
+ String id = ChannelBufferTools.readHexString(buf, 10);
try {
position.setDeviceId(getDataManager().getDeviceByImei(id).getId());
} catch(Exception error) {