From a3269fda8b77c6af0e810222dae4aff6faf1df3f Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Fri, 12 Apr 2019 22:31:00 -0700 Subject: Fix Fifotrack photo command --- src/main/java/org/traccar/protocol/FifotrackProtocolDecoder.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/main/java/org/traccar/protocol') diff --git a/src/main/java/org/traccar/protocol/FifotrackProtocolDecoder.java b/src/main/java/org/traccar/protocol/FifotrackProtocolDecoder.java index beaa34125..35696ee12 100644 --- a/src/main/java/org/traccar/protocol/FifotrackProtocolDecoder.java +++ b/src/main/java/org/traccar/protocol/FifotrackProtocolDecoder.java @@ -97,9 +97,9 @@ public class FifotrackProtocolDecoder extends BaseProtocolDecoder { private void requestPhoto(Channel channel, SocketAddress socketAddress, String imei, String file) { if (channel != null) { - String content = "D06," + file + "," + photo.writerIndex() + "," + Math.min(1024, photo.writableBytes()); - int length = 1 + imei.length() + 1 + content.length() + 5; - String response = String.format("@@%02d,%s,%s*", length, imei, content); + String content = "1,D06," + file + "," + photo.writerIndex() + "," + Math.min(1024, photo.writableBytes()); + int length = 1 + imei.length() + 1 + content.length(); + String response = String.format("##%02d,%s,%s*", length, imei, content); response += Checksum.sum(response) + "\r\n"; channel.writeAndFlush(new NetworkMessage(response, socketAddress)); } -- cgit v1.2.3