From a027cac70cabb54328ace242c3f91ae91203a0e9 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Wed, 16 Jan 2013 18:16:22 +1300 Subject: Fix T55 protocol (fix #119) --- src/org/traccar/protocol/T55ProtocolDecoder.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/org/traccar') diff --git a/src/org/traccar/protocol/T55ProtocolDecoder.java b/src/org/traccar/protocol/T55ProtocolDecoder.java index 8903bf3e1..76f43e2cf 100644 --- a/src/org/traccar/protocol/T55ProtocolDecoder.java +++ b/src/org/traccar/protocol/T55ProtocolDecoder.java @@ -70,7 +70,7 @@ public class T55ProtocolDecoder extends BaseProtocolDecoder { // Detect device ID if (sentence.contains("$PGID")) { - String imei = sentence.substring(6, 6 + 15); + String imei = sentence.substring(6, sentence.length() - 3); try { deviceId = getDataManager().getDeviceByImei(imei).getId(); } catch(Exception error) { -- cgit v1.2.3