Hello,
could you post here how do you send commands on this protocol?
I am interested in learning ...
Hello guys, could someone who has already managed to send OSMAnd commands help me?
I'm not asking for a ready-made solution, but just to give me a starting point for me to study about it, because my internet searches were a failure and I don't know anything.
Thanks to anyone who helps me.
I "think" I know what you are asking.
When a device does a "GET" to submit position data the server gives a response. Normally it is an empty response.
When you queue up a command it waits until the next "GET" happens and sends the command back as part of the response packet. That is why you will see the command as queued.
I suggest using a tool called "Postman" that will make seeing what is happening easier.
Hi Vince,
Thanks for responding. The problem isn't that the command is queued (that's actually the expected behavior), the problem is that sometimes I get the message "Command Sent" as if Traccar server thinks there is a persistent connection between itself and the device submitting location data, and I think it tries to send the command instantly. There may be a such a connection on devices that use TCP sockets, but not on devices that use the OSMAnd protocol. I've been looking at the github repo to understand how OSMAnd commands work and I think this line may be the cause of the issue I'm having. I'm guessing that sometimes the "supportsLiveCommands" variable is set to True for OSMAnd devices when it should be False, though I might be wrong about that.
That's a final variable, so that's the only place it's set.
Hello, I'm trying to use commands with the OSMAnd protocol. Sometimes they work and sometimes they don't. I noticed that when they work, the Traccar web interface shows a message that says "Command queued" and when they don't work it says "Command sent". It also seems like the commands are queued correctly when the device is in the online or offline state, but not in the unknown state. How can I fix that?