LBS location protocol

Meir99 3 years ago

Hello I have few units of a IoT temperature and humidity sensor device over GSM. I am wiling to use it as LBS tracker, no GPS module on board. Which protocol is best to use in order to track on Traccar. I have source codes and compiler of the board ,I can change the firmware codes and download into MCU.

Thank you

Anton Tananaev3 years ago

The simplest is probably the OsmAnd protocol.

Track-trace3 years ago

@Meir99

LBS is very inaccurate

Meir99 3 years ago

Thank you for replies.

@Anton Tananaev
I am familiar with OsmAnd protocol. But never saw LBS parameter in string.

@Track-trace
No need accuracy just know roughly where. No GPS modules on the PCB..

Anton Tananaev3 years ago

We do support cell and wifi for it. Check the protocol decoder.

JonMoJo13 days ago

Hi Anton,

Sorry to re-open this, but can you link to more detail on this for OsmAnd? I have found the documentation:
e.g.

http://demo.traccar.org:5055/?id=12345&lat=48.8566&lon=2.3522&timestamp=1609459200000&cell=208,10,12345,67890,50&wifi=00:11:22:33:44:55,-70

If I am getting data from 'AT+CCED' for multiple base stations and can output those in JSON for Google (below), but can I format/package this on the query string to pass onto LBS (Google) via OsmAnd*?
Can I POST this in as an JSON payload?

For reference, using 'basic' OsmAnd in my application has been working seamlessly, where simple geographic coordinates are given (e.g. WiFi or GPS).
*(I would do this in the application on an ESP32, but my SIM modem device is not happy handling HTTPS - It has all the functionality, I just can't get it to return a result successfully)
e.g.

{
  "cellTowers": [
    {
      "cellId": xxxxxx571,
      "locationAreaCode": 0,
      "mobileCountryCode": 234,
      "mobileNetworkCode": 10,
      "signalStrength": -94
    },
    {
      "cellId": 123,
      "locationAreaCode": 0,
      "mobileCountryCode": 234,
      "mobileNetworkCode": 10,
      "signalStrength": -94
    },
    {
      "cellId": 123,
      "locationAreaCode": 0,
      "mobileCountryCode": 234,
      "mobileNetworkCode": 10,
      "signalStrength": -105
    },
    {
      "cellId": 45678,
      "locationAreaCode": 0,
      "mobileCountryCode": 234,
      "mobileNetworkCode": 10,
      "signalStrength": -102
    },
    {
      "cellId": 45678,
      "locationAreaCode": 0,
      "mobileCountryCode": 234,
      "mobileNetworkCode": 10,
      "signalStrength": -107
    }
  ]
}
Anton Tananaev13 days ago

We don't support cell data in JSON. Your query parameters look almost correct. The MAC address should have - instead of :.

JonMoJo13 days ago

Thanks Anton,

...and thanks for tidying up my post.

Would this work?

http://traccar.blah.com:5055/?id=861123055177859&
cell=234,10,0,129203571,-94&
cell=234,10,0,280,-94&
cell=234,10,0,280,-105&
cell=234,10,0,39250,-102&
cell=234,10,0,39250,-107

...and I don't understand - The MAC address should have - instead of :.

Anton Tananaev13 days ago

I'm confused. Why do you have new lines in a URL?

JonMoJo13 days ago

Just to make it more humanly readable - It's for me. I'll remove them in my final code.

Anton Tananaev13 days ago

Have you tried it?

JonMoJo13 days ago

Yes - I tried it as a raw URL and It gave a result that 'appeared' to work (Traccar recorded the device as online), but it's not moved from my test bench so the geographic information may not have been updated.

Anton Tananaev13 days ago

Have you enabled geolocation on your server?

JonMoJo13 days ago

Tried it again (ensuring no line returns) and it changed position with an inaccuracy of about 500m.

JonMoJo13 days ago

Yes

<entry key='geolocation.enable'>true</entry>
<entry key='geolocation.type'>google</entry>
<entry key='geolocation.key'>YOUR API KEY</entry>