microg / IchnaeaNlpBackend

Backend for UnifiedNlp that uses Mozilla Location Service for geolocation.
119 stars 28 forks source link

Ichnaea not fetching cells #38

Open Phyks opened 6 years ago

Phyks commented 6 years ago

Hi,

I'm trying to get UnifiedNlp to work on my phone running Android 4.2.2. With wifi, everything is working fine with either this backend or the AppleWifi backend. However, it seems that using wifi networks for location positionning under Android 4.2.2 requires having the wifi always on, so I'm looking for a way to rely on cell network.

Using cell network in this backend, I don't get any position. After investigating it a bit in adb logcat, this line always log "Cells: 0" which seems to mean it is not fetching the nearby cells. Not sure why :/

Thanks

crankycoder commented 6 years ago

Title is confusing. This sounds like microg is not sending cell info to ichnaea, not "ichnaea not fetching cells"

baldrianbandit commented 5 years ago

I can confirm that the backend logs that there are no cells with wifi disabled. While running SatStat in foreground:

$ adb logcat | grep -i ichnaea IchnaeaBackendService: Cells: 0

Edit: By setting "preferred network type" to "2G" in Settings / Network & Internet, I immediately get a location fix:

$ adb logcat | grep -i ichnaea IchnaeaBackendService: Cells: 6 IchnaeaBackendService: request: {"radioType":"gsm","cellTowers":[{"radioType":"gsm","mobileCountryCode":262 [...]}]}

domkrm commented 5 years ago

Please see my following comment in another issue: https://github.com/microg/IchnaeaNlpBackend/issues/50#issuecomment-546728737