From 80228457f46daf759a096aa2221fc0f8c92db5d6 Mon Sep 17 00:00:00 2001 From: 5of9 Date: Fri, 2 Jun 2017 18:40:48 +0200 Subject: Update Command.java Added gsmstatus and devicestatus for wondexprotocol --- src/org/traccar/model/Command.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/org/traccar/model/Command.java b/src/org/traccar/model/Command.java index 190c0d753..c512c9c0a 100644 --- a/src/org/traccar/model/Command.java +++ b/src/org/traccar/model/Command.java @@ -47,6 +47,8 @@ public class Command extends Message { public static final String TYPE_FIRMWARE_UPDATE = "firmwareUpdate"; public static final String TYPE_SET_CONNECTION = "setConnection"; public static final String TYPE_SET_ODOMETER = "setOdometer"; + public static final String TYPE_GET_GSMSTATUS = "getGsmstatus"; + public static final String TYPE_GET_DEVICESTATUS = "getDevicestatus"; public static final String TYPE_MODE_POWER_SAVING = "modePowerSaving"; public static final String TYPE_MODE_DEEP_SLEEP = "modeDeepSleep"; -- cgit v1.2.3 From 086737f56f74790ec5e73184ce5463d86269f888 Mon Sep 17 00:00:00 2001 From: 5of9 Date: Fri, 2 Jun 2017 18:41:39 +0200 Subject: Update WondexProtocol.java Added Devicestatus and GSM Status --- src/org/traccar/protocol/WondexProtocol.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/org/traccar/protocol/WondexProtocol.java b/src/org/traccar/protocol/WondexProtocol.java index e7e13c63a..d03a0febd 100644 --- a/src/org/traccar/protocol/WondexProtocol.java +++ b/src/org/traccar/protocol/WondexProtocol.java @@ -31,8 +31,11 @@ public class WondexProtocol extends BaseProtocol { super("wondex"); setTextCommandEncoder(new WondexProtocolEncoder()); setSupportedCommands( + Command.TYPE_GET_DEVICESTATUS, + Command.TYPE_GET_GSMSTATUS, Command.TYPE_REBOOT_DEVICE, Command.TYPE_POSITION_SINGLE, + Command.TYPE_GET_VERSION, Command.TYPE_IDENTIFICATION); } -- cgit v1.2.3 From e196d58afbb6cac1b83ac5e464b68e759cbe5c87 Mon Sep 17 00:00:00 2001 From: 5of9 Date: Fri, 2 Jun 2017 18:43:26 +0200 Subject: Update WondexProtocolEncoder.java Identifaction was wrong, Result was the Version, Identification added and Version corrected, added Battery Status and GSM Status, as also added in the command.java and wondexprotocol.java --- src/org/traccar/protocol/WondexProtocolEncoder.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/org/traccar/protocol/WondexProtocolEncoder.java b/src/org/traccar/protocol/WondexProtocolEncoder.java index 8f9887b10..5034add8c 100644 --- a/src/org/traccar/protocol/WondexProtocolEncoder.java +++ b/src/org/traccar/protocol/WondexProtocolEncoder.java @@ -28,9 +28,15 @@ public class WondexProtocolEncoder extends StringProtocolEncoder { switch (command.getType()) { case Command.TYPE_REBOOT_DEVICE: return formatCommand(command, "$WP+REBOOT={%s}", Command.KEY_DEVICE_PASSWORD); + case Command.TYPE_GET_DEVICESTATUS: + return formatCommand(command, "$WP+TEST={%s}", Command.KEY_DEVICE_PASSWORD); + case Command.TYPE_GET_GSMSTATUS: + return formatCommand(command, "$WP+GSMINFO={%s}", Command.KEY_DEVICE_PASSWORD); + case Command.TYPE_IDENTIFICATION: + return formatCommand(command, "$WP+IMEI={%s}", Command.KEY_DEVICE_PASSWORD); case Command.TYPE_POSITION_SINGLE: return formatCommand(command, "$WP+GETLOCATION={%s}", Command.KEY_DEVICE_PASSWORD); - case Command.TYPE_IDENTIFICATION: + case Command.TYPE_GET_VERSION: return formatCommand(command, "$WP+VER={%s}", Command.KEY_DEVICE_PASSWORD); default: Log.warning(new UnsupportedOperationException(command.getType())); -- cgit v1.2.3 From b4be185da201f2ad10bc13a3ec1b3d8464fdfadc Mon Sep 17 00:00:00 2001 From: 5of9 Date: Fri, 2 Jun 2017 21:55:48 +0200 Subject: Update WondexProtocolDecoder.java Didn't show $MSG messages from the tracker, example hex: 2017-06-02 21:43:43 DEBUG: [BEEC07FB: 5032 < 2.247.253.121] HEX: 244d53473a47534d494e464f3d6e65747a636c75622b2c33302c312c300d0a $MSG:GSMINFO=netzclub+,30,1,0[13][10] --- src/org/traccar/protocol/WondexProtocolDecoder.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/org/traccar/protocol/WondexProtocolDecoder.java b/src/org/traccar/protocol/WondexProtocolDecoder.java index dc334becc..8249d2c68 100644 --- a/src/org/traccar/protocol/WondexProtocolDecoder.java +++ b/src/org/traccar/protocol/WondexProtocolDecoder.java @@ -69,7 +69,8 @@ public class WondexProtocolDecoder extends BaseProtocolDecoder { return null; } else if (buf.toString(StandardCharsets.US_ASCII).startsWith("$OK:") - || buf.toString(StandardCharsets.US_ASCII).startsWith("$ERR:")) { + || buf.toString(StandardCharsets.US_ASCII).startsWith("$ERR:") + || buf.toString(StandardCharsets.US_ASCII).startsWith("$MSG:")) { DeviceSession deviceSession = getDeviceSession(channel, remoteAddress); -- cgit v1.2.3 From 0f4bd1a1480d0cc8cdce8bcfa2ce2b0e654be0bf Mon Sep 17 00:00:00 2001 From: Florian Date: Fri, 2 Jun 2017 22:40:03 +0200 Subject: Update Command.java --- src/org/traccar/model/Command.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/org/traccar/model/Command.java b/src/org/traccar/model/Command.java index c512c9c0a..ddbbae4d5 100644 --- a/src/org/traccar/model/Command.java +++ b/src/org/traccar/model/Command.java @@ -47,8 +47,8 @@ public class Command extends Message { public static final String TYPE_FIRMWARE_UPDATE = "firmwareUpdate"; public static final String TYPE_SET_CONNECTION = "setConnection"; public static final String TYPE_SET_ODOMETER = "setOdometer"; - public static final String TYPE_GET_GSMSTATUS = "getGsmstatus"; - public static final String TYPE_GET_DEVICESTATUS = "getDevicestatus"; + public static final String TYPE_GET_MODEM_STATUS = "getModemstatus"; + public static final String TYPE_GET_DEVICE_STATUS = "getDevicestatus"; public static final String TYPE_MODE_POWER_SAVING = "modePowerSaving"; public static final String TYPE_MODE_DEEP_SLEEP = "modeDeepSleep"; -- cgit v1.2.3 From a0666633c64b4ff6f9ee6f1c57aed19343afa61e Mon Sep 17 00:00:00 2001 From: Florian Date: Fri, 2 Jun 2017 22:41:28 +0200 Subject: Update WondexProtocol.java --- src/org/traccar/protocol/WondexProtocol.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/org/traccar/protocol/WondexProtocol.java b/src/org/traccar/protocol/WondexProtocol.java index d03a0febd..ef25265aa 100644 --- a/src/org/traccar/protocol/WondexProtocol.java +++ b/src/org/traccar/protocol/WondexProtocol.java @@ -31,8 +31,8 @@ public class WondexProtocol extends BaseProtocol { super("wondex"); setTextCommandEncoder(new WondexProtocolEncoder()); setSupportedCommands( - Command.TYPE_GET_DEVICESTATUS, - Command.TYPE_GET_GSMSTATUS, + Command.TYPE_GET_DEVICE_STATUS, + Command.TYPE_GET_MODEM_STATUS, Command.TYPE_REBOOT_DEVICE, Command.TYPE_POSITION_SINGLE, Command.TYPE_GET_VERSION, -- cgit v1.2.3 From 77547acdb01922f3c077ee18a39fc81b3be6c242 Mon Sep 17 00:00:00 2001 From: Florian Date: Fri, 2 Jun 2017 22:42:53 +0200 Subject: Update WondexProtocolEncoder.java --- src/org/traccar/protocol/WondexProtocolEncoder.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/org/traccar/protocol/WondexProtocolEncoder.java b/src/org/traccar/protocol/WondexProtocolEncoder.java index 5034add8c..6258c1fe6 100644 --- a/src/org/traccar/protocol/WondexProtocolEncoder.java +++ b/src/org/traccar/protocol/WondexProtocolEncoder.java @@ -28,9 +28,9 @@ public class WondexProtocolEncoder extends StringProtocolEncoder { switch (command.getType()) { case Command.TYPE_REBOOT_DEVICE: return formatCommand(command, "$WP+REBOOT={%s}", Command.KEY_DEVICE_PASSWORD); - case Command.TYPE_GET_DEVICESTATUS: + case Command.TYPE_GET_DEVICE_STATUS: return formatCommand(command, "$WP+TEST={%s}", Command.KEY_DEVICE_PASSWORD); - case Command.TYPE_GET_GSMSTATUS: + case Command.TYPE_GET_MODEM_STATUS: return formatCommand(command, "$WP+GSMINFO={%s}", Command.KEY_DEVICE_PASSWORD); case Command.TYPE_IDENTIFICATION: return formatCommand(command, "$WP+IMEI={%s}", Command.KEY_DEVICE_PASSWORD); -- cgit v1.2.3 From d6e8af781b125cf11b6a74b51ac6283e3235ad50 Mon Sep 17 00:00:00 2001 From: Florian Date: Sat, 3 Jun 2017 21:13:26 +0200 Subject: Update Command.java --- src/org/traccar/model/Command.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/org/traccar/model/Command.java b/src/org/traccar/model/Command.java index ddbbae4d5..6a48b14e9 100644 --- a/src/org/traccar/model/Command.java +++ b/src/org/traccar/model/Command.java @@ -47,8 +47,8 @@ public class Command extends Message { public static final String TYPE_FIRMWARE_UPDATE = "firmwareUpdate"; public static final String TYPE_SET_CONNECTION = "setConnection"; public static final String TYPE_SET_ODOMETER = "setOdometer"; - public static final String TYPE_GET_MODEM_STATUS = "getModemstatus"; - public static final String TYPE_GET_DEVICE_STATUS = "getDevicestatus"; + public static final String TYPE_GET_MODEM_STATUS = "getModemStatus"; + public static final String TYPE_GET_DEVICE_STATUS = "getDeviceStatus"; public static final String TYPE_MODE_POWER_SAVING = "modePowerSaving"; public static final String TYPE_MODE_DEEP_SLEEP = "modeDeepSleep"; -- cgit v1.2.3