From 4c44e55db10fd7ad5c5d50b9cc6ff66e6fe02934 Mon Sep 17 00:00:00 2001 From: mattti-post <60095729+mattti-post@users.noreply.github.com> Date: Mon, 15 Jun 2020 16:58:43 +0200 Subject: Update WatchProtocolEncoder.java (#4545) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Based on protocol documentation, the implementation of Command.TYPE_POSITION_SINGLE is wrong. "RG" message is supposed to be issued when requesting location data from BTS (no gps signal) "CR" message instructs the terminal to wake up gps module immediately and send gps positions in 10 sec intervals during the timespan of 3 minutes. https://www.traccar.org/protocols/ Communication Protocol.doc 比电协议V1.8(20160926).doc https://github.com/tananaev/traccar/files/213814/3g.elec.comm.protocol.docx --- src/main/java/org/traccar/protocol/WatchProtocolEncoder.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/main/java/org/traccar') diff --git a/src/main/java/org/traccar/protocol/WatchProtocolEncoder.java b/src/main/java/org/traccar/protocol/WatchProtocolEncoder.java index f285267ba..f1904ea4d 100644 --- a/src/main/java/org/traccar/protocol/WatchProtocolEncoder.java +++ b/src/main/java/org/traccar/protocol/WatchProtocolEncoder.java @@ -135,7 +135,7 @@ public class WatchProtocolEncoder extends StringProtocolEncoder implements Strin case Command.TYPE_CUSTOM: return formatTextCommand(channel, command, command.getString(Command.KEY_DATA)); case Command.TYPE_POSITION_SINGLE: - return formatTextCommand(channel, command, "RG"); + return formatTextCommand(channel, command, "CR"); case Command.TYPE_SOS_NUMBER: return formatTextCommand(channel, command, "SOS%s,%s", Command.KEY_INDEX, Command.KEY_PHONE); case Command.TYPE_ALARM_SOS: -- cgit v1.2.3