aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/org/traccar/protocol/AtrackFrameDecoder.java2
-rw-r--r--src/org/traccar/protocol/AtrackProtocolDecoder.java1
-rwxr-xr-xtools/hex.sh3
3 files changed, 4 insertions, 2 deletions
diff --git a/src/org/traccar/protocol/AtrackFrameDecoder.java b/src/org/traccar/protocol/AtrackFrameDecoder.java
index 267b6de12..90dfa68b6 100644
--- a/src/org/traccar/protocol/AtrackFrameDecoder.java
+++ b/src/org/traccar/protocol/AtrackFrameDecoder.java
@@ -25,7 +25,7 @@ public class AtrackFrameDecoder extends LengthFieldBasedFrameDecoder {
private static final int KEEPALIVE_LENGTH = 12;
public AtrackFrameDecoder() {
- super(1024, 4, 2, 6, 0);
+ super(1024, 4, 2);
}
@Override
diff --git a/src/org/traccar/protocol/AtrackProtocolDecoder.java b/src/org/traccar/protocol/AtrackProtocolDecoder.java
index ba03e0642..66ef0b322 100644
--- a/src/org/traccar/protocol/AtrackProtocolDecoder.java
+++ b/src/org/traccar/protocol/AtrackProtocolDecoder.java
@@ -69,6 +69,7 @@ public class AtrackProtocolDecoder extends BaseProtocolDecoder {
position.setDeviceId(getDataManager().getDeviceByImei(id).getId());
} catch(Exception error) {
Log.warning("Unknown device - " + id);
+ return null;
}
// Date and time
diff --git a/tools/hex.sh b/tools/hex.sh
index 9e5dd025d..8045d405b 100755
--- a/tools/hex.sh
+++ b/tools/hex.sh
@@ -1 +1,2 @@
-echo 4d434750005e930100080102041804000000200f20000000005e7500000000000000000000005af400040204da4da30367195703e8030000000000000000021a111e08dd0760 | perl -ne 's/([0-9a-f]{2})/print chr hex $1/gie' | nc -v -w 10 localhost 5033
+echo fe0200014104d8f1968201df40501e58003301e000014104d8f19682525ecd5d525ee344525ee35effc88815026ab4d70000020000104403de01000b0000000007d007d000 | perl -ne 's/([0-9a-f]{2})/print chr hex $1/gie' | nc -v -w 10 localhost 5044
+