-
Notifications
You must be signed in to change notification settings - Fork 4
Identifications of cells #30
Comments
Related - a separate issue or pull request:
|
I've tested switching cells yesterday in a way that I used Airplane mode, then turned Airplane mode off. When doing that, getCid() always returned -1 at first! However, switching network mode in system settings, WCDMA<>GSM<>WCDMA pref<>LTE pre never gave -1. -1 always returns "unknown" from calls like getCid, getLac and getPsc I will do few recordings today when driving home and to work tomorrow with different cell type modes. Will report back on what do I get. 👍 Concerning other issues- will fix those, I'm also bothered when opening "pick cellid" dialog and it shows me current cellid but with old stored date. And sorry about sorting history dialog- its an obvious bug, since picking them up in condition shows them okay. |
It seems like Psc is set in some phones. Maybe it is the HW. But at least my SGS2 w CM11 always have -1.That should be sufficient to not use Psc... For cdma GPS position could be used... |
I suggest the following changes:
This will invalidate the saved cell id lists, so it should be done before released on Google Play. |
I am not 100% sure the proposal is "optimal" (info is slightly conflicting), but it should be better than it is now. This will invalidate the saved cell id lists, so it should be done before released on Google Play. I suggest the following changes: * Remove Psc for GsmCellLocation (even if it could be unique for some Wcdma cells in some phones, it does not identify) * Switch order of Lac and Cid for GsmCellLocation * Handle getCid, getCi() == -1 as an error (reactivate isError()) * Add Tac() for Lte: http://people.csail.mit.edu/bkph/cellular_repeater_numerology.shtml * Mnc/Mcc can be retrieved for CellLocation, skipping for now * While it would be nice to get the sector (antenna), the rles differ. Only present for LTE
Note: The comments about sorting etc is implemented already. |
Pull request implemented, I have only used "GsmCellLocation", not "CellInfo", so I will not close it myself... |
Checking it tomorrow over highway (constantly switching 2g, 3g, lte). Current LTE cell id shows: 293:41.3.212600:31 😸 |
Plan to submit a new patch:
Incompatible changes (ie cells have to be added again) should be carefully considered first (but at least CDMA should be done). |
Yes, Samsung phones (at least of that generation) are known not to report the PSC, or any neighboring cells. This is a limitation of the firmware. A list of the limitations of a few devices can be found at https://docs.cellmapper.net/mw/index.php/Tested_Phones
+1, the MCC/MNC/LAC/CID tuple are unique (at least within the same network type—not sure if collisions between, say, a 2G cell and a 3G cell are possible). PSC is a local identifier—no two neighboring cells can have the same PSC, and no cell can have two neighbors with the same PSC. Some have suggested that carriers occasionally change the PSCs for a cell (while keeping the CID), but I have no reliable information on that.
Again, limitation of the phone firmware. There are three different API calls, and not all phones implement all of them.
Some carriers indeed encode antenna sectors in the CID (the LAC is an area code, thus different antenna sectors of the same tower would normally share the same LAC). However, this is purely by convention and entirely at the whim of the carrier—schemes vary from carrier to carrier, and are subject to change without notice. |
For me, psc is always -1. I have mostly 3G around I believe, but psc does not seem to be available.
Samsung Galaxy S2 with CM11
psc is for sure always -1 in 2g/GSM
I believe that psc should not be included for identifying with GsmCellLocation. For sure not when -1, as that should trigger the isError()
psc is scrambling code, not sure if that is applicable to identify sectors for instance.
On the other hand, I believe Lac should be included for CellIdentityGsm/Wcdma too, in addition to Mnc/Mcc/Cid.
LTE probably ok with Mnc/Mcc/Ci.
Open as an issue rather than a patch, as you likely have done more research than me, but maybe not see the psc=-1 issue
The text was updated successfully, but these errors were encountered: