From 7de3f92aed50668bca4187a3b9fb784923be1b34 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Wed, 23 Sep 2015 10:50:10 +1200 Subject: Fix GT06 commands encoder --- src/org/traccar/protocol/Gt06ProtocolEncoder.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/org') diff --git a/src/org/traccar/protocol/Gt06ProtocolEncoder.java b/src/org/traccar/protocol/Gt06ProtocolEncoder.java index 09773cc45..22d62e9e5 100644 --- a/src/org/traccar/protocol/Gt06ProtocolEncoder.java +++ b/src/org/traccar/protocol/Gt06ProtocolEncoder.java @@ -18,6 +18,7 @@ package org.traccar.protocol; import org.jboss.netty.buffer.ChannelBuffer; import org.jboss.netty.buffer.ChannelBuffers; import org.traccar.BaseProtocolEncoder; +import org.traccar.Context; import org.traccar.helper.Crc; import org.traccar.model.Command; @@ -34,7 +35,7 @@ public class Gt06ProtocolEncoder extends BaseProtocolEncoder { buf.writeByte(0x80); // message type - buf.writeByte(content.length()); // command length + buf.writeByte(4 + content.length()); // command length buf.writeInt(0); buf.writeBytes(content.getBytes()); // command -- cgit v1.2.3