From f9187c8d4c8b9e147fcfbdf6ffaddbdfccddc88d Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Tue, 4 Mar 2014 21:02:59 +1300 Subject: Add aspicore support (fix #584) --- src/org/traccar/protocol/T55ProtocolDecoder.java | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src') diff --git a/src/org/traccar/protocol/T55ProtocolDecoder.java b/src/org/traccar/protocol/T55ProtocolDecoder.java index 0cd7ca1b7..72cb32816 100644 --- a/src/org/traccar/protocol/T55ProtocolDecoder.java +++ b/src/org/traccar/protocol/T55ProtocolDecoder.java @@ -107,6 +107,16 @@ public class T55ProtocolDecoder extends BaseProtocolDecoder { Log.warning("Unknown device - " + id); } } + + // Identification + else if (sentence.startsWith("IMEI")) { + String id = sentence.substring(5, sentence.length()); + try { + deviceId = getDataManager().getDeviceByImei(id).getId(); + } catch(Exception error) { + Log.warning("Unknown device - " + id); + } + } // Identification else if (Character.isDigit(sentence.charAt(0)) & sentence.length() == 15) { -- cgit v1.2.3