From af8aaaf1879957b83af1896dc9c1f72723bfe224 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Sat, 31 Aug 2013 17:51:53 +1200 Subject: Fix H02 binary decoder --- src/org/traccar/protocol/H02ProtocolDecoder.java | 3 +-- 1 file changed, 1 insertion(+), 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) { -- cgit v1.2.3