LBS Functions in Traccar

George Civic3 years ago

Hi Anton.
Please if you could help me understand the use of geolocation by LBS in Traccar. I have configured the traccar.xml file with the directives to enable LBS with a valid APIKEY from google.

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

The doubts are:

  1. On the map or in the device status data, where or how do I identify consciously that LBS is being used to geolocate instead of gps?

  2. The LBS lat,lon data is recorded in the route history file to be displayed in the reports section? If so, how do they differ which are from GPS and which from LBS?

  3. I am using the client app as a device. How do I explicitly enable this traccar client to send geolocation over LBS? Or does it do it in automatic when they cannot be obtained from the GPS of the smartphone -either because it is under a thick roof or because user deactivates the gps-?

  4. If It is deactivated the GPS of the smartphone (for user or for closed place), the main "switch" of the App Service Status (stopped or execution service) must remain activated so that it can send LBS to the server?

  5. If I close the App and the service remains in the background, it will continue to send LBS if the GPS is disabled (either explicitly or because I am in a closed place under a thick roof).

  6. When LBS is being used from device client (obviously because there is no GPS for some reason), in display and map server it appear as "online" or the online staus is only labelled for gps coordinates exclusively ?

  7. When Traccar Client App is completly disabled even in background or finished battery, even so, if I consult the map of the server it will continue to use LBS ? The question is directed to know how to save or not use the very expensive Google API of LBS ?

Thank you very much in advance

Jorge

Anton Tananaev3 years ago

That's a lot of questions.

George Civic3 years ago

Sorry, I didn't know there was a limit.

Anton Tananaev3 years ago

There's no limit, of course. Good luck.

homa3 years ago

Hi. and what ansver on it)))
How I see, traccar application don't send LBS data. It's true? How I can fix it?

Anton Tananaev3 years ago

Traccar Client doesn't send raw cell/wifi information, but it uses it on the phone to get the location.

homa3 years ago

If I turn off GPS on my phone, traccar application stop send any messages to server

Anton Tananaev3 years ago

Have you turned off ONLY GPS or all location services? Screenshot please.

homa3 years ago

may be you are right. I have only one checkbox for location:

drawing

sorry for russian phone interface

Anton Tananaev3 years ago

That disables everything including GPS and cell/wifi, so obviously you won't get any data.

homa3 years ago

Hi again! I have Sinotrack st-903 device (protocol h02). It send LBS data in attributes lo01-lo04:
lo1 (250) - MCC
lo2 (02) - MNC
lo3 - (9701) ?? LAC or CellID
lo4 - (4742) ?? CellID or LAC
How I can use it as right LBS-parametrs? LBS will help for GPS work, or LBS will work whel GPS is not available?
Thanks in advance!

Anton Tananaev3 years ago

Traccar should use LBS when GPS is not available, assuming it's enabled.

MK2 years ago

I think it is good idea to add something to this topic with a lot of question about LBS tracking without opening the new one ;)

I configured traccar to use OpenCelliD (https://www.traccar.org/lbs-geolocation/) and I think it works properly - I'm receiving every week report from OpenCelliD about summary usage. Only traccar is configured to use this data, so...

But there is a small problem. And actually, I can't decide if it is good or not very well ;)

I make some analysis of logs and I found that:

LBS data are sent to traccar. They are decoded properly (?) by traccar. And they are not visible (??) on the map...

The problem is that the date decoded from LBS data is not correct. I don't know if incorrect date is sent with LBS data or traccar incorrectly decodes the date.

I think it is good example:

2022-03-03 11:54:14  INFO: [30fb3f03: h02 < 5.173.145.55] HEX: 2a48512c3836353230353033373530363231382c56332c3233333731342c32363030362c30312c3030323032312c3036323438302c3133342c2d38362c303241442c302c582c3233303730342c4646464646424646230d0a
2022-03-03 11:54:15  INFO: [30fb3f03] id: 865205037506218, time: 2004-07-24 01:37:14, lat: 50.41499, lon: 18.87506, course: 0.0

When I set traccar to show route from 24-07-2004 the location is displayed on the map.

Good or bad? As I found in "Traccar Client for Android", it is possible to buffer data if the network is unavailable for some time. An then if the device connect to the network the pack of data will be send to traccar server with the dates included. So it is ok, that traccar uses the date included with the data, not the server date. But with LBS location ... like above.

Anton Tananaev2 years ago

You should probably create a separate thread. And also please provide protocol documentation.