aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/org/traccar/protocol/Gt06ProtocolDecoder.java4
-rw-r--r--test/org/traccar/protocol/Gt06ProtocolDecoderTest.java3
2 files changed, 6 insertions, 1 deletions
diff --git a/src/org/traccar/protocol/Gt06ProtocolDecoder.java b/src/org/traccar/protocol/Gt06ProtocolDecoder.java
index 6951b969f..703ebc6cc 100644
--- a/src/org/traccar/protocol/Gt06ProtocolDecoder.java
+++ b/src/org/traccar/protocol/Gt06ProtocolDecoder.java
@@ -61,6 +61,7 @@ public class Gt06ProtocolDecoder extends BaseProtocolDecoder {
private static final int MSG_LBS_EXTEND = 0x18;
private static final int MSG_LBS_STATUS = 0x19;
private static final int MSG_GPS_PHONE = 0x1A;
+ private static final int MSG_GPS_LBS_EXTEND = 0x1E;
private static void sendResponse(Channel channel, int type, int index) {
if (channel != null) {
@@ -116,7 +117,8 @@ public class Gt06ProtocolDecoder extends BaseProtocolDecoder {
else if (type == MSG_GPS ||
type == MSG_GPS_LBS ||
type == MSG_GPS_LBS_STATUS ||
- type == MSG_GPS_PHONE) {
+ type == MSG_GPS_PHONE ||
+ type == MSG_GPS_LBS_EXTEND) {
// Create new position
Position position = new Position();
diff --git a/test/org/traccar/protocol/Gt06ProtocolDecoderTest.java b/test/org/traccar/protocol/Gt06ProtocolDecoderTest.java
index 23fd29f39..85e4859cf 100644
--- a/test/org/traccar/protocol/Gt06ProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/Gt06ProtocolDecoderTest.java
@@ -45,6 +45,9 @@ public class Gt06ProtocolDecoderTest {
int[] buf10 = {0x78,0x78,0x19,0x10,0x0e,0x01,0x09,0x03,0x23,0x0e,0xc8,0x03,0xae,0x32,0xa6,0x06,0x53,0xcd,0xed,0x00,0x18,0x00,0x00,0x02,0x00,0x72,0xfe,0xb7,0x0d,0x0a};
verify(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertArray(buf10))));
+ int[] buf11 = {0x78,0x78,0x47,0x1e,0x0e,0x03,0x11,0x0b,0x05,0x11,0xc5,0x01,0xc6,0x64,0xfd,0x07,0x4d,0xb7,0x3f,0x02,0x18,0xa6,0x02,0xe0,0x03,0x43,0x3a,0x00,0x2f,0xed,0x40,0x43,0x3a,0x00,0x56,0xe1,0x4e,0x43,0x3a,0x00,0x56,0x10,0x4e,0x43,0x3a,0x00,0x56,0xfd,0x53,0x43,0x3a,0x00,0x2e,0xed,0x55,0x43,0x3a,0x00,0x7e,0x4b,0x57,0x43,0x3a,0x00,0x2e,0xe2,0x5a,0xff,0x00,0x02,0x01,0x20,0xf6,0x72,0x0d,0x0a};
+ verify(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertArray(buf11))));
+
}
}