aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/traccar')
-rw-r--r--src/org/traccar/protocol/At2000Protocol.java7
-rw-r--r--src/org/traccar/protocol/At2000ProtocolDecoder.java2
2 files changed, 6 insertions, 3 deletions
diff --git a/src/org/traccar/protocol/At2000Protocol.java b/src/org/traccar/protocol/At2000Protocol.java
index 418619cb4..35aa0b469 100644
--- a/src/org/traccar/protocol/At2000Protocol.java
+++ b/src/org/traccar/protocol/At2000Protocol.java
@@ -20,6 +20,7 @@ import org.jboss.netty.channel.ChannelPipeline;
import org.traccar.BaseProtocol;
import org.traccar.TrackerServer;
+import java.nio.ByteOrder;
import java.util.List;
public class At2000Protocol extends BaseProtocol {
@@ -30,13 +31,15 @@ public class At2000Protocol extends BaseProtocol {
@Override
public void initTrackerServers(List<TrackerServer> serverList) {
- serverList.add(new TrackerServer(new ServerBootstrap(), getName()) {
+ TrackerServer server = new TrackerServer(new ServerBootstrap(), getName()) {
@Override
protected void addSpecificHandlers(ChannelPipeline pipeline) {
pipeline.addLast("frameDecoder", new At2000FrameDecoder());
pipeline.addLast("objectDecoder", new At2000ProtocolDecoder(At2000Protocol.this));
}
- });
+ };
+ server.setEndianness(ByteOrder.LITTLE_ENDIAN);
+ serverList.add(server);
}
}
diff --git a/src/org/traccar/protocol/At2000ProtocolDecoder.java b/src/org/traccar/protocol/At2000ProtocolDecoder.java
index 17da0eef7..f1399b731 100644
--- a/src/org/traccar/protocol/At2000ProtocolDecoder.java
+++ b/src/org/traccar/protocol/At2000ProtocolDecoder.java
@@ -50,7 +50,7 @@ public class At2000ProtocolDecoder extends BaseProtocolDecoder {
private static void sendResponse(Channel channel) {
if (channel != null) {
- ChannelBuffer response = ChannelBuffers.directBuffer(BLOCK_LENGTH);
+ ChannelBuffer response = ChannelBuffers.directBuffer(ByteOrder.LITTLE_ENDIAN, BLOCK_LENGTH);
response.writeByte(MSG_ACKNOWLEDGEMENT);
response.writeMedium(1);
response.writeByte(0x00); // success