Closed gloschtla closed 3 years ago
Why does it require to filter with Mobile Network Code list, even though the Mobile Country Code list should already filter the MNCs? The "GSM Location Service" seemed to be the only backend for "UnifiedNlp" (No GApps) that would be easy to use. Not everyone has the ability to use a script to create the database on PC and thereafter sending it to the android device.
You should take a look at DejaVu Nlp Backend. It’s meant to replace this one and the Local Wifi one.
I had already installed all other backend APKs found in F-Droid, including DejaVu Nlp Backend. LocalGsmNlpBackend is the only one that provides any easy-looking database configuration through "UnifiedNlp".
But UnifiedNlp 1.6.8 keeps telling that "The system did not bind the UnifiedNlp service" even after rebooting Android 7.1.2 on Galaxy S3.
The message you are getting about MNC filters is informational, not an error. If that field is left blank (the way I always run it) then data for all MNC (carriers) for all MCC selected will be loaded into the database. Your error when updating the database is independent of that.
Also, for what it is worth, based on https://en.wikipedia.org/wiki/Mobile_country_code I don't think your 5 digit NMC codes are valid. And if not valid no data will pass the filter. If your phone has enough storage to store all data for your desired region(s), it is much easier to leave that field blank. Yes you will get the "no MNC filters" informational message but that is not a problem or a bug. It is simply a statement of fact that the backend will "assume all networks" are to be loaded.
Usually the error when updating the database occurs because of a network issue. Unfortunately, a logcat from when the error occurred is probably the only way to narrow that down more.
The reason is this: Most phones, including the one I was using when I wrote this backend, don't have enough storage to download the ZIP file from OCID and/or Mozilla and then unzip it before processing the comma separated value records there in. For example, the ZIP file from Mozilla today is just under 514MB in size and unzips to a CSV file of 1.75 GB.
So what the backend does is it chains stream objects together: File (https)->unzip->CSV-> to get CSV value records "on the fly" that are then examined and, if they pass the MCC and MNC filters, are added to a new copy of a database. Once that is successful, the old database is closed and the new database opened for use for position estimation.
If there is a network glitch detected by the file/https stream object the reason for that is lost by the unzip stream object and the backend does not know what happened, only that "an error occurred". And the unzip stream object has no way of being told where it was in unzipping a stream, so the backend can't restart the operation from where it failed, it has to resume from the beginning.
In my case, the LineageOS ROM for my current phone I has a bug where it restarts the WLAN/WiFi every 30 minutes or so. Normally this is not noticeable, but it takes longer than 30 minutes for my phone to download and process data from OCID or Mozilla. The result is a rather frustrating time trying to do this and I often have to fall back to using the "Download chosen areas from lacells (data may be old)" option. This pulls in much smaller files (more likely to succeed before WiFi is restarted). That data is pulled from https://wvengen.github.io/lacells/about.html and it is unclear how often the scripts that build those files run.
If you post the snippet of logcat from when the download failure actually occurs, I might be able to help you determine what is going wrong. In my case, I simply wrote a new backend called Déjá Vu, referred to in a previous response on this bug report, that doesn't need to do a database download of cell towers to work. It also doesn't have a lot of settings and controls that result in support issues like this one.
Regarding your biggest problem though: "The system did not bind the UnifiedNlp service". Until that is fixed none of the above will be used. Starting with Android 6, you will need to have UnifiedNlp installed in /system/priv-apps/
Also there seems to be some confusion about installing both microG and UnifiedNlp. You don't need to do that as microG includes UnifiedNlp. This is assuming, of course, that you are running a Google free phone. If Google's "gapps" is installed, then none of the microG/UnifiedNlp stuff will be able to bind as the Google stuff will have already done it.
I have handed off this project to @devee. The new official repository for this work is a now at https://gitlab.com/deveee/Local-GSM-Backend.
If this is still an issue, please open it on the new repository with the new maintainer.
"Error during updating database" Download stucks even though I provided imput to all 3 required fields in "advanced settings": my OpenCellID, MCC filter defined by my chosen "Areas" (countries) in "settings", and MNC filter collected by mefrom Wikipedia.
MNC: 26201,26202,26203,24201,24202,24214,24206,23001,23002,23003,24001,24002,24006,24007,22801,22802,22803
MCC: 240,262,242,238,230,228,260