zamojski / TowerCollector

The OpenCellID and MLS contributor's app.
Mozilla Public License 2.0
217 stars 27 forks source link

More and more U.S. good cells rejected as invalid #205

Closed jidanni closed 1 year ago

jidanni commented 1 year ago

I am investigating why, when simply driving down suburban streets at 30 mph, sometimes no points are recorded.

310,260,41602,8553995,33414,11,342,0,-113,0,42.118996666667,-87.829363333333,2.3,12.66,181.72,162.9,"2023-06-10T16:12:20.079Z",LTE,false,"2023-05-27T17:32:17.768Z","samsung SM-A136U",-85,-8,-113,18,,,,,,,,,,,,,,,1004
310,260,41490,63850499,249416,3,371,6,-101,0,42.118996666667,-87.829363333333,2.3,12.66,181.72,162.9,"2023-06-10T16:12:21.665Z",LTE,false,"2023-05-20T21:06:32.383Z","samsung SM-A136U",-110,-8,-101,,6,,,,,,,,,,,,,,66811
310,260,41490,63850499,249416,3,371,6,-101,0,42.118508333333,-87.829368333333,2.3,12.69,180.65,165.4,"2023-06-10T16:12:24.080Z",LTE,false,"2023-05-20T21:06:32.383Z","samsung SM-A136U",-110,-8,-101,,6,,,,,,,,,,,,,,66811
310,260,41490,63850499,249416,3,371,6,-101,0,42.11805500,-87.829383333333,2.3,12.48,181.8,167.2,"2023-06-10T16:12:28.086Z",LTE,false,"2023-05-20T21:06:32.383Z","samsung SM-A136U",-110,-8,-101,,6,,,,,,,,,,,,,,66811
310,260,41490,63850509,249416,13,428,11,-91,0,42.11805500,-87.829383333333,2.3,12.48,181.8,167.2,"2023-06-10T16:12:31.703Z",LTE,false,"2023-06-10T16:12:31.703Z","samsung SM-A136U",-101,-10,-91,,,,,,,,,,,,,,,,1004
310,260,41490,63850509,249416,13,428,11,-91,0,42.117608333333,-87.829398333333,2.4,12.63,181.31,165.4,"2023-06-10T16:12:32.062Z",LTE,false,"2023-06-10T16:12:31.703Z","samsung SM-A136U",-101,-10,-91,,,,,,,,,,,,,,,,1004
310,260,41490,63850509,249416,13,428,11,-91,0,42.117158333333,-87.82941500,2.3,12.53,180.74,163.1,"2023-06-10T16:12:36.081Z",LTE,false,"2023-06-10T16:12:31.703Z","samsung SM-A136U",-101,-10,-91,,,,,,,,,,,,,,,,1004
310,260,41490,63850509,249416,13,428,11,-91,0,42.116706666667,-87.829398333333,2.2,12.23,180.38,162.8,"2023-06-10T16:12:40.082Z",LTE,false,"2023-06-10T16:12:31.703Z","samsung SM-A136U",-101,-10,-91,,,,,,,,,,,,,,,,1004
310,260,41499,28052228,109579,4,21,7,-99,0,42.108213333333,-87.82948500,2.3,11.79,179.57,158.3,"2023-06-10T16:13:51.651Z",LTE,false,"2023-06-10T16:13:51.651Z","samsung SM-A136U",-115,-16,-99,18,3,,,,,,,,,,,,,,66811
310,260,41499,28052228,109579,4,21,7,-99,0,42.107706666667,-87.82949000,2.1,10.09,180.25,160.1,"2023-06-10T16:13:56.076Z",LTE,false,"2023-06-10T16:13:51.651Z","samsung SM-A136U",-115,-16,-99,18,3,,,,,,,,,,,,,,66811
310,260,41499,5334785,20839,1,210,5,-103,0,42.107618333333,-87.829493333333,2.2,9.88,181.7,160.4,"2023-06-10T16:14:01.680Z",LTE,false,"2023-05-25T21:32:29.546Z","samsung SM-A136U",-116,-14,-103,,,,,,,,,,,,,,,,66811
310,260,41499,5334785,20839,1,210,5,-103,0,42.106896666667,-87.829493333333,2.2,5.95,177.44,163.1,"2023-06-10T16:14:07.076Z",LTE,false,"2023-05-25T21:32:29.546Z","samsung SM-A136U",-116,-14,-103,,,,,,,,,,,,,,,,66811
310,260,41499,6097008,23816,112,320,0,-113,0,42.092713333333,-87.854701666667,3.5,0,345.65,178.5,"2023-06-10T16:27:01.671Z",LTE,false,"2023-05-25T17:44:08.918Z","samsung SM-A136U",-85,-8,-113,18,,,,,,,,,,,,,,,854

As you see, it is not a lack of coverage.

The final point is when, parked, I apparently woke it up temporarily.

I have turned off battery optimization, etc. as much as I can for this app here on Samsung Android 13.

Turning on debugging logging solved it, but that is a lot of overhead.

20230611T093350

zamojski commented 1 year ago

Without details from debug log it's impossible to tell the reason for that case.

jidanni commented 1 year ago

OK, today I think I found the answer, in this log, 2023-06-17-10-43-14.zip

It is throwing away "invalid 5G cells".

jidanni commented 1 year ago

Screenshot_20230617_104337_Tower Collector.jpg

Here I notice no points collected for the last 21 minutes.

jidanni commented 1 year ago

Screenshot_20230618_052536_Tower Collector.jpg

So I turned on logging, and the only points recorded are the blue, but my real path was the red dots I added to the map.

jidanni commented 1 year ago

2023-06-18-05-30-57.csv.zip

Before 11:30 all the cells were rejected.

Then a mile east, at 11:32, it started rejecting cells again.

These are good Tmobile cells.

jidanni commented 1 year ago

OK, looking at https://github.com/zamojski/TowerCollector/blob/master/app/src/main/java/info/zamojski/soft/towercollector/collector/validators/specific/NrCellValidator.java ...

jidanni commented 1 year ago

Here I have lined up a bad one and a good one from the log,

Cell invalid: CellNr (network=Network(mcc=310, mnc=260, iso=US), nci=4303061294, tac=10623744, pci=295,
Cell   valid: CellLte(network=Network(mcc=310, mnc=260, iso=US), eci=30857584,   tac=41602,    pci=208,

band=BandNr (downlinkArfcn=520110, downlinkFrequency=2600550, number=38, name=2600),
band=BandLte(downlinkEarfcn=854,                              number=2,  name=1900), aggregatedBands=[], bandwidth=null,

signal=SignalNr (        csiRsrp=null, csiRsrq=null, csiSinr=null, ssRsrp=-123, ssRsrq=-15, ssSinr=-2),
signal=SignalLte(rssi=-103, rsrp=-116.0,  rsrq=-13.0, cqi=null, snr=null, timingAdvance=0),

connectionStatus=NoneConnection(),    subscriptionId=4, timestamp=8058520)
connectionStatus=PrimaryConnection(), subscriptionId=4, timestamp=8060170)

Maybe related to https://github.com/mroczis/netmonster-core/issues/3 ?

@zamojski Maybe add a preference to override "NoneConnection()", else vast swaths of the United States will get rejected.

jidanni commented 1 year ago

Here's some screenshots of other apps handling the cells TowerCollector rejects,

NetMonster, Screenshot_20230622_141706_NetMonster.jpg

Netmonitor, Screenshot_20230622_141735_Netmonitor.jpg

Screenshot_20230622_141911.jpg

zamojski commented 1 year ago

I've discovered a bug in 5G parameters validator which doesn't accept some TAC values. The accepted value should be between 0 and 16777215 inclusive. Whenever I find some time to fix and publish the update you'll get it working.