diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2014-03-04 21:02:59 +1300 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2014-03-04 21:02:59 +1300 |
commit | f9187c8d4c8b9e147fcfbdf6ffaddbdfccddc88d (patch) | |
tree | 9e71ebd8a9f076285565ab2d3b2f0d9ddddff827 /src/org | |
parent | 5374aaf7948bf4a77fa11d3dfad777ee67923356 (diff) | |
download | traccar-server-f9187c8d4c8b9e147fcfbdf6ffaddbdfccddc88d.tar.gz traccar-server-f9187c8d4c8b9e147fcfbdf6ffaddbdfccddc88d.tar.bz2 traccar-server-f9187c8d4c8b9e147fcfbdf6ffaddbdfccddc88d.zip |
Add aspicore support (fix #584)
Diffstat (limited to 'src/org')
-rw-r--r-- | src/org/traccar/protocol/T55ProtocolDecoder.java | 10 |
1 files changed, 10 insertions, 0 deletions
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) { |