Trying to implement GPS103 protocol using arduino

Bahiru5 years ago

Im using demo server to test my connection because i dont have server.
I can see my device online on server after sending a login packet. Server replied LOAD to the login request. Then after I am able to send the keepalive/heart beat packet and successfully received Ack from Server which is ON. However, the moment the device send location data to server the device become offline after updating the data on server. then a minute later the tcp connection goes down.

AT+CIPSEND
>##,imei:866771024070798,A;

SEND OK
LOAD
AT+CIPSEND
>866771024070798


SEND OK
ON
> 
866771024070798
**,imei:866771024070798,B

AT+CIPSEND

imei:866771024070798,tracker,1312170400,,F,230030.000,A,2455.3288,N,06705.8537,E,0.00,0,,0,0,0.00%,,;


SEND OK
ON
AT+CIPSTART="TCP","46.101.24.212","5001"

ERROR

ALREADY CONNECT

CLOSED

I cant figure out why connection is closed and device goes offline after uploading data to server. Can anyone help? Thanks

jaroja44 years ago

Hi Bahiru.
Did you manage to implement the GPS103 protocol in arduino?

I want to use arduino with traccar. But I don't know how to send commands from the Traccar al Arduino application.
Any advice is welcome! Thank you.

treblig4 years ago

@jaroja4: you're not giving enough details as to what you're trying to achieve, where's the arduino, how it's linked to net, what commands, for what purpose, etc.
As far as I know, you'll need to do development work on Traccar and/or your device for anything that's beyond sending a known protocol to Traccar.

jaroja44 years ago

Treblig thanks for your answer.

I have an arduino one
A SIM808

I can track the arduino and also send variables such as temperature, vibration. This using OsmAnd.

Now I want to send a command from traccar in the opposite direction. For example, turn off the car or close the door with arduino

treblig4 years ago

If I understand :
a) Somewhere, you have tracking device(s) made of an Arduino that drives a SIM808. You pull info from the GPS part of the SIM808, process it with the Arduino to put it in OSMAND format and then send that message to Traccar IP and port with the 2G part of the SIM808.

b) Somewhere else you have a Traccar server that receives the OSMAND message from your device, processes it and saves it in its database.

I haven't used Traccar in a couple of years but I can't recall seeing anywhere an option to "action" anything remote from Traccar to devices and, furthermore, I'm pretty sure Traccar has no idea where it would need to send those "actions" (Traccar does not know the IP and port of the various devices it manages). As far as I know, the Traccar server listens to a number of ports expecting messages in a specific format for each of these ports but it "talks" to no one (short of a web browser) on the net.

So, unless I'm totally wrong, you would have to develop your very own system to manage IPs and ports of your device(s), send "actions" commands to the device(s), process them on the device(s), manage the status of the "actions", send back acknowledgement once "action" is taken, secure the whole thing to avoid hacking, design electronic interfaces between your device(s) and lights/doors/engine to act upon "actions" received, etc.
And if you wanted to integrate your system into Traccar (why ?), you'd have a hard time maintaining new releases of Traccar.
Your project is not for the faint-hearted and I'm not even talking about security and legal issues of shutting down the engine or lights of a moving car...

treblig4 years ago