A question about command feature

Hey there,

Well, I am building a TCP client that implements osmand protocol to easier my own life. This requirement came across my workflow to test some positions of my own fake device on map. With this CLI that I am building it's possible I put any coordinates or others attributes from my own terminal.

I already created the sender to send these attributes as coordinates of fake device by osmand protocol but I didn't understand the why of I don't receive the command from the server.

Using the Traccar I found out that the server send commands to TCP clients (devices) by their address persisted when some signal comes on from them. But using my own client from terminal I don't receive any command.

Follow the repository of source code: https://github.com/guiferpa/traccar-channel
Take a look at file: https://github.com/guiferpa/traccar-channel/blob/master/cmd/tch/main.go

This project's for community, feel free to later merge him with official traccar org

Many tks for attention

Anton Tananaev4 years ago

It's not possible to send commands via HTTP protocol. Only for raw TCP ones.

Is it because the Traccar server close the connection when I send the coordinates from osmand protocol?

Do you have some suggestions about which protocol I can use for this interaction with Traccar server?

Anton Tananaev4 years ago

Almost any protocol other than OsmAnd:

https://www.traccar.org/protocols/

Ryan S3 years ago

How can you view responses from the device after sending the TCP commands to the device?

Anton Tananaev3 years ago

If device sends a result and it's supported by Traccar, you should get a "result" event.