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(-) (limited to 'src/org/traccar/protocol') 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