aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/protocol
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/traccar/protocol')
-rw-r--r--src/org/traccar/protocol/EelinkProtocolDecoder.java5
-rw-r--r--src/org/traccar/protocol/T55ProtocolDecoder.java6
2 files changed, 8 insertions, 3 deletions
diff --git a/src/org/traccar/protocol/EelinkProtocolDecoder.java b/src/org/traccar/protocol/EelinkProtocolDecoder.java
index 009baebd0..e63189dae 100644
--- a/src/org/traccar/protocol/EelinkProtocolDecoder.java
+++ b/src/org/traccar/protocol/EelinkProtocolDecoder.java
@@ -99,10 +99,11 @@ public class EelinkProtocolDecoder extends BaseProtocolDecoder {
}
}
- else if (type == MSG_GPS ||
+ else if (deviceId != null &&
+ (type == MSG_GPS ||
type == MSG_ALARM ||
type == MSG_STATE ||
- type == MSG_SMS) {
+ type == MSG_SMS)) {
// Create new position
Position position = new Position();
diff --git a/src/org/traccar/protocol/T55ProtocolDecoder.java b/src/org/traccar/protocol/T55ProtocolDecoder.java
index 0f2da7d65..25b7f367f 100644
--- a/src/org/traccar/protocol/T55ProtocolDecoder.java
+++ b/src/org/traccar/protocol/T55ProtocolDecoder.java
@@ -101,7 +101,11 @@ public class T55ProtocolDecoder extends BaseProtocolDecoder {
if (!sentence.startsWith("$") && sentence.contains("$")) {
int index = sentence.indexOf("$");
- identify(sentence.substring(0, index));
+ String id = sentence.substring(0, index);
+ if (id.endsWith(",")) {
+ id = id.substring(0, id.length() - 1);
+ }
+ identify(id);
sentence = sentence.substring(index);
}