Local-NLP-Backend
Local-NLP-Backend copied to clipboard
Scanning failed ...
LineageOS 18 (android 11), microg installed
SatStat shows the reception of cells, but Show nearby emitters -> "Scanning failed, maybe the backend service is disabled" At the same time My Location app reports: Local NLP Backend: Some Latitude, some Longitude Accuracy: 371m (wich is strange with the cell tower in sight ...) Of course I imported the Mozialla Database befrorehand and the reported location is next to perfect (within 20m) For testing puroses I switched off WiFi scanning, to make sure only to use cell towers.
The failing scan message is strange. When you click show nearby emitters, a scan is started. Once the results are available, a location is reported and you should see the emitters. Since My Location actually gets a location, the scan must have been successful.
There is a timeout though, and after 3.5 seconds the scan failed message is shown. Mobile cell scans are usually very fast, and a typical full WiFi scan is ~2.5 s, so there should be enough time. Since you also tried without WiFi scanning, I don't know what would cause the scan to take so long. Though I think there is some sort of time limit how often microG can request scans. Maybe 10 or 20 seconds, possibly this also depends on microG version. If that is the case, you should see a scan success if you try a few times.
Accuracy: 371m (wich is strange with the cell tower in sight ...)
What accuracy would you expect? Accuracy is always between some minimum value (depends on emitter type), and the cell size as in the database (imported from Mozilla in this case).
Indeed, all very strange. I started the "Show nearby emitter", while no other application requested a position. Therefore, a time constraint should not be a problem. Only once I saw one LTE ransmitter as an answer (of course my phone is registered to the nearby transmitter anyway). "My location" always shows a position through Local NLP Backend, which is only 20 Meter from the real position (therefore I found the 371 Meter strange, also: the 371 Meter constant!) What ist the string, that I must query with logcat?
Does this help (starting "My Location":
08-04 19:14:15.264 17426 17426 I gsmloc_TelephonyHelper: CellInfo: LTE MCC=262 MNC=-1 CID=33387777 LAC=13891 dBm=2147483647
08-04 19:14:15.265 17426 17426 W gsmloc_TelephonyHelper: Fixed MNC=1
08-04 19:14:15.275 17480 17480 D BackendHelper: Failed to parse cell info CellInfoLte:{mRegistered=YES mTimeStamp=27761727643724ns mCellConnectionStatus=2147483647 CellIdentityLte:{ mCi=33387777 mPci=297 mTac=13891 mEarfcn=46 mBands=[] mBandwidth=2147483647 mMcc=262 mMnc=null mAlphaLong= mAlphaShort= mAdditionalPlmns={} mCsgInfo=null} CellSignalStrengthLte: rssi=2147483647 rsrp=2147483647 rsrq=-7 rssnr=0 cqi=0 ta=0 level=0 parametersUseForLevel=0 android.telephony.CellConfigLte :{ isEndcAvailable = false }}
08-04 19:14:15.275 17480 17480 D BackendHelper: java.lang.IllegalArgumentException: Invalid MNC: 2147483647
08-04 19:14:15.275 17480 17480 D BackendHelper: at org.microg.nlp.api.CellBackendHelper$Cell.
Indeed, all very strange. I started the "Show nearby emitter", while no other application requested a position. Therefore, a time constraint should not be a problem. Only once I saw one LTE ransmitter as an answer (of course my phone is registered to the nearby transmitter anyway).
I suspect the scan (often/sometimes) doesn''t start for some reason. Currently starting the scan is done via microG instead of calling the backend service directly, maybe this should be adjusted.
Your log lines are mostly from CellBackendHelper
, which is a component of microG / UnifiedNlp, so unfortunately no help.
You can find Local NLP logs by looking for LocalNLP
. Best do it case insensitive, then you should also find microG requesting and receiving locations from Local NLP.
"My location" always shows a position through Local NLP Backend, which is only 20 Meter from the real position (therefore I found the 371 Meter strange, also: the 371 Meter constant!)
There is no way Local NLP can determine the distance from the actual emitter. The accuracy for a single emitter is estimated from the range of the emitter according to the database, the emitter type, and the signal strength. For some phones, the signal strength isn't properly contained in the cell data (e.g. my phone always reports perfect signal for LTE). In that case, bad signal is assumed.
Well .. I do know the 20 meters is within 371 meters ... 😁 😁 😁 Only, if the 371 meter inaccuracy would be a correct answer, than one would expect the acual location to vary within those 371 meters. But it does not ... The BackendHelper complain about not being able to parse the cellinfo. E.g. CellSignalStrengthLte: rssi=2147483647 rsrp=2147483647 is very strange! Has the interface to call helpers changed?
If you only have one emitter (in that case this one LTE cell), the location is always at the center of this cell as in database. Only if you have more than one emitter the location may move (dependent on signal, but also on which emitters are found, as weak emitters are not found in every scan)
The BackendHelper complain about not being able to parse the cellinfo. E.g. CellSignalStrengthLte: rssi=2147483647 rsrp=2147483647 is very strange! Has the interface to call helpers changed?
This is normal, or at least I see the same on my phone. It seems some phones report only a few valid cells, and more invalid ones. Those are usually just ignored. LocalNLP does it too.