aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main/java/org/traccar/protocol/FifotrackProtocolDecoder.java6
1 files changed, 3 insertions, 3 deletions
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));
}