Mozilla Location Service Usage

absingh8 years ago

Hello!

I have been trying to use the Mozilla Location Service (MLS) with Traccar. There are two points that I am trying to clear up.

  1. The documentation makes me think that no API key is required if we use MLS and one is only needed for OpenCellId. However, the API docs of MLS on their website say that they DO require an API key. When I checked the traccar server code, it seems to use an API key "test". Am not sure if this works or not. I will test with logs and diagnostics, but any help or thoughts about if my observation would be appreciated.

  2. As of now, it seems like traccar only uses the Cell ID part of MLS. There are protocols (such as watch) which do send Wi-Fi information too. Any plans of integrating this in the near future? If not, probably I would like to take it up and contribute.

Thanks
Abhishek

Anton Tananaev8 years ago
  1. I just have added support for API key, so you can use it. By default Traccar uses "test" key.

  2. There is a plan to support additional LBS data. Contributions would be more than welcome.

Nick6 years ago

Hello Anton and all,

I'm using latest Traccar 4.0, and not having success with LBS-only tracking when vehicles are in basement and without GPS signal.
I have read that it uses the Io parameters sent by devices and Traccar uses either OpencellID or Mozilla services.

My questions are:

  1. How accurate is the location with LBS tracking, and
  2. With below config in my file, what wrong I may be doing? I'm still getting the last valid location when I power On the device at a different location without GPS signal, and the Valid flag says no(invalid)

I have tried either Mozilla or OpencellID with the same results
For Mozilla API

<entry key='geolocation.enable'>true</entry>
<entry key='geolocation.type'>mozilla</entry>
<entry key='geolocation.key'>test</entry>

For opencellID/LocationIQ API (default)

<entry key='geolocation.enable'>true</entry>
<entry key='geolocation.key'>XXXmyAPIkeyXX</entry>
Anton Tananaev6 years ago

Have you checked logs? Are you sure you are using valid API keys?

Nick6 years ago

Hi Anton,
Yes I checked wrapper as well as main tracker-log, there are not such logs for failed geolocation. Traccar simply shows last valid location with the device as online, but I know the device is way off that lat-long.
Any clues?

Anton Tananaev6 years ago

It means that it's not called for some reason. Are you sure your device doesn't report location?

Nick6 years ago

Hi Anton,
I was wrong, there are logs generated, as follows:

WARN: Geocoding failed - javax.ws.rs.NotAuthorizedException: HTTP 401 Unauthorized - ResponseProcessingException (...) ```

My config is as follows:

```javascript
    <entry key='geolocation.enable'>true</entry> 
    <entry key='geolocation.type'>mozilla</entry>
    <entry key='geolocation.key'>test</entry>
    <entry key='geolocation.processInvalidPositions'>true</entry>
Anton Tananaev6 years ago

Geocoding and geolocation are two completely different things, so the warning is completely irrelevant here.