diff options
author | mattti-post <60095729+mattti-post@users.noreply.github.com> | 2020-06-15 16:58:43 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-15 07:58:43 -0700 |
commit | 4c44e55db10fd7ad5c5d50b9cc6ff66e6fe02934 (patch) | |
tree | e2684bc145f6d89dbd35f2a961cb5d293890f546 /src/main/java | |
parent | 94c04282f1b3792bc2c16758049a57f4c42941c9 (diff) | |
download | trackermap-server-4c44e55db10fd7ad5c5d50b9cc6ff66e6fe02934.tar.gz trackermap-server-4c44e55db10fd7ad5c5d50b9cc6ff66e6fe02934.tar.bz2 trackermap-server-4c44e55db10fd7ad5c5d50b9cc6ff66e6fe02934.zip |
Update WatchProtocolEncoder.java (#4545)
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
Diffstat (limited to 'src/main/java')
-rw-r--r-- | src/main/java/org/traccar/protocol/WatchProtocolEncoder.java | 2 |
1 files changed, 1 insertions, 1 deletions
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: |