OsmAnd is an HTTP-based protocol:
If I understand why it is so
OsmAnd Live Tracking web address format:
http://demo.traccar.org:5055/?id=123456&lat={0}&lon={1}×tamp={2}&hdop={3}&altitude={4}&speed={5}
But rather asked if someone could already join the SIM808 with the server of traccar? And for tests with AT commands how do I use them?
That's a format for URL (address). It is based on HTTP protocol, as I said.
cuantic...Can you tell me if is possible to use Arduino with traccar server to see in real time the position of a car for example.
Is it possible via Osmand to transfer the values of arbitrary sensors from the device and send arbitrary commands to the device? For example, to manage a smart house?
Maybe there are other similar http protocols that are supported by the Traccar?
You can include any arbitrary parameters in OsmAnd protocol.
Thnx! Where to read more about these arbitrary parameters?
Probably in HTTP protocol specification. It's not something special unique to Traccar. It's standard HTTP request parameters.
That is, I myself can modify this protocol?
OK I'll try to understand how to do this.
You could do something the code below from the Arduino to the SIM808;
This should give you a start, it's not real code but just the format.
The OSMAND protocol is created by the con.prints below
#include "SIM808.h" #define APN "connect" #define con Serial static const char* url = "http://demo.traccar.org:5055; CGPRS_SIM808 gprs; void setup() { con.begin(9600); while (!con); for (;;) { con.print("Resetting..."); while (!gprs.init()); con.println("OK"); con.print("Setting up network..."); byte ret = gprs.setup(APN); if (ret == 0) break; con.print("Error code:"); con.println(ret); } con.println("OK"); for (;;) { if (gprs.httpInit()) break; con.println(gprs.buffer); gprs.httpUninit(); delay(1000); } } void loop() { gprs.httpConnect(url); while (gprs.httpIsConnected() == 0) { // can do something here while waiting } if (gprs.httpState == HTTP_ERROR) { con.println("Connect error"); return; } con.println(); gprs.httpRead(); int ret; while ((ret = gprs.httpIsRead()) == 0) { // can do something here while waiting } if (gprs.httpState == HTTP_ERROR) { con.println("Read error"); return; } // now we have received payload con.print("[Payload]"); con.println(gprs.buffer); // Send OSMAND data GSM_LOCATION loc; if (gprs.getLocation(&loc)) { con.print("ID:); con.print("LAT:"); con.print(loc.lat, 6); con.print(" LON:"); con.print(loc.lon, 6); con.print(" TIME:"); con.print(loc.hour); con.print(':'); con.print(loc.minute); con.print(':'); con.println(loc.second); con.print(hadop:); etc, etc } }
darreno, whether it can be used for sim800L ?
@beryindo: there is no GPS in the SIM800L so where would you get the location ?
Has anyone got some working code for the SIM808?
I am not a programmer or a coder. I have tried and failed so I am sticking to building thing. As anyone got a SIM808 to work in the Traccar server if so how you done it and is the code and diagrams available.
I am a volunteer with the British Red Cross and there are a few of us who are independently testing Traccar to see how useful and reliable it would be operationally. I also volunteer for an couple of other charitable organizations where being able to track assets such as people an vehicles would be an advantage. The big issue is cost. The Red Cross have trackers in their ambulances and other support vehicles but nothing that can the put on the dashboard of a hire vehicle that may be used on a event to move supplies around. Some of our radios have gps tracking but not enough terminals to track them on.
Personally I have been using the ios and Android client during my tests. I have bought two of the tk103 trackers from ebay and one works and one doesn't. Being able to build my own hardware tracker will solve a lot of issues especially around quality and cost.
So I suppose I am begging anyone who is gifted with the ability to code if they would be willing to help? there are a couple of things i would like on the wish list but they are simple things.
Thanks in advance,
Phil
Hi Phil,
I would like to help you and the Red Cross.
I am ex-military combat systems engineer and would love to volunteer towards your cause.
The Red Cross is near and dear to my heart, I thank you and your comrades for your volunteer service.
I currently help charity organizations like the Royal Canadian Legion, Fire and Rescue with GPS tracking.
We have tested and recommended trackers called the Oyster and Remora.
Anton has ported the protocols in Traccar and they work, we have the ability to program the Oyster and Remora to send it's data
to a Traccar server too.
Here is the mapping of Oysters and Remoras using a commercial mapping platform.
https://canada.telematics.guru
Username: traccaruser@traccar.com
Password: traccaruser2017!
I am in Toronto, but we can get a SIM808 and "get it working".
I too have struggled with the SIM808 but as coincidence has it, a member of our Internet of Things - Toronto group has extensive coding experience with the SIM808. We too want to use Traccar for volunteer organizations.
How can we collaborate??
Darren
I have a SIM808 with arduino with the SSCOM32 command commands AT the SIM I use this protocol .. I want to help me find how to send the data correctly ,,, thanks
THE LOG