Hello,
sorry for being late.
When I send a command to the tracker (and when it works), the socket is the same. Same IP, Same Port.
However, when a command fails, the socket is closed and a new port (on the tracker) is used.
I think all is good from this side. And you ?
In fact, when a tracker is connected to my server, I put its IMEI and its socket in a sort of associative array.
Thus, I just have to specify the correct IMEI to use the correct socket. And for the moment, it's seems to work fine.
Is it what you was thinking about ?
My server use sockets to be opened to internet (Server Socket) and also, when a new tracker is connected, a new client socket is linked to it. So if I have 100 trackers, I have 100 sockets (+1 for internet).
When I started this project, I had few knowledge. I have learned a lot of thing with TCP communications, Sockets and Java thanks to Teltonika.
As recommended, I have set "Open Link Timeout" to 259200 seconds. I think I generally close the socket connection only when the tracker cut the connexion with the server (when the tracker got a "problem". Often due to bad command).
But when there is only a loss of signal, sockets should stay opened.
I am constantly learning so I will keep in mind what you was talking about in order to see how I can do it in my program. I will see more deeply how it works according to trackers.
For your question, I don't know when the ACK of the Codec 8/8E is sent. I think the ACK is sent after the reception of the command. Which, I think, is bad. I will try to confirm it.
Thanks a lot for your help !
Sincerely,
PS : You're many to help me on this subject and everyone give me very helpful answers. Thanks you !