邻近的小区信息是不准确的 [英] Neighbouring cell information is inaccurate

查看:411
本文介绍了邻近的小区信息是不准确的的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想利用移动信息有关相邻小区,在Android通过 TelephonyManager 类和 getNeighboringCellInfo 方法。下面我张贴的code的一部分(大多取自公开渠道)来完成的工作,而这code产生其输出(在所附截图所示)的一个例子。在code和图像都放在为是无任何变化,所以它应该是比较容易联想到一个具有其他并确保它应该正常工作(当然也有可能是错误的,我忽略了)。

I'm trying to make use of a mobile information about neighbouring cells, available on Android via TelephonyManager class and its getNeighboringCellInfo method. Below I'm posting a part of code (mostly taken from publicly available sources) which does the job, and one example of output which this code produces (shown in attached screenshot). The code and the image are placed "as is" without any changes, so it should be relatively easy to associate one with the other and make sure it should work correctly (of course, there can be errors which I overlooked).

的问题是,周边小区确实常常包含与不正确的元素(我的了解)的数据,如列表:

The problem is that the list of neighbouring cells does often contain elements with "incorrect" (to my understanding) data, such as:

  1. NeighboringCellInfo 所有特性 - LAC CID PSC - 设置为-1,只有 RSSI 现场显得意味深长;
  2. NeighboringCellInfo LAC 等于0;这是否意味着 LAC 是一样的当前活动单元格?
  3. NeighboringCellInfo RSSI 值的范围[0,31],而不是 UNKNOWN_RSSI ;这样的值可以为正(33,如截图所示),负(他们看起来像一个适当的原始RSSI值,即无需从 ASU 转换);
  4. 列表在同一个地理位置没有表现出像我期待的一致性而获得的元素,这是在连续两次扫描每个人都可以有一个元素省略了对方一眼,而忽略元素的RSSI水平是不是列表中的一个最低电平(事实上它们的RSSI的可以比目前使用的细胞大);我承认这可能是正确的行为,如果每一个细胞的信号往往是非常不稳定,但我不知道如果这是真的,一般用于GSM和/或UMTS网络。当前小区总是具有良好定义的所有领域,但其RSSI可以变化非常迅速地在范围为30 dBm的(说从-60到-90)。
  5. 同为4,但大约一致从一天到另一天。在一个高度城市化和成熟的环境下,我期望每天都能看到细胞的相同的列表,但他们以这样的方式各不相同,有一天我甚至不看一提有关的单元格是在一个$活动单元格p $ pviuos一天。
  1. a NeighboringCellInfo with all properties - lac, cid, psc - set to -1, and only rssi field seems meaningful;
  2. a NeighboringCellInfo with lac equal to 0; does this mean that the lac is the same as current active cell?
  3. a NeighboringCellInfo with rssi value outside the range [0, 31] and not UNKNOWN_RSSI; such values can be as positive (33, as shown in the screenshot), as negative (they look like a proper raw rssi value, that is without the need to convert from asu);
  4. list elements obtained in the same geolocation do not demonstrate consistency as much as I'd expect, that is in two consecutive scans every one can have an element omitted in the other one, and the omitted elements' rssi levels are not of a most low level in the list (in fact their rssi's can be larger than for currently used cell); I admit this could be right behaviour if every cell signal tends to be very unstable, but I'm not sure if it's true in general for GSM and/or UMTS networks. Current cell always has all fields defined well, but its rssi can vary very quickly in a range of 30 dBm (say from -60 to -90).
  5. The same as 4, but about consistency from one day to another. In a highly urbanized and matured environment I'd expect to see the same list of cells every day, yet they vary in such a way, that one day I don't even see a mention about a cell that was active cell in a previuos day.

这一切意味着移动技术的正常运作,某种可能的省电优化,或缺陷在一个特定的设备(LG的Optimus One在我的情况)?

Does all this mean a normal functioning of mobile technology, some sort of possibly powersaving optimizations, or a flaw in a specific device (LG Optimus One in my case)?

请提出一个如何获得在Android小区环境一致的读数,如果这是可能的。

Please suggest how can one obtain consistent readings from cell environment on Android, if this is possible.

GsmCellLocation cellLocation = (GsmCellLocation)telephonyManager.getCellLocation();

String networkOperator = telephonyManager.getNetworkOperator();
int type = telephonyManager.getNetworkType();
String mcc = networkOperator.substring(0, 3);
String mnc = networkOperator.substring(3);
textMCC.setText("mcc: " + mcc + " mnc: " + mnc);
textMNC.setText("operator: " + networkOperator);

int cid = cellLocation.getCid();
int lac = cellLocation.getLac();
int psc = cellLocation.getPsc();
textGsmCellLocation.setText(cellLocation.toString());
textCID.setText("lac: " + String.valueOf(lac) + " cid: " + String.valueOf(cid) + " psc: " + String.valueOf(psc) + " type: " + String.valueOf(type) + " rssi: " + String.valueOf(currentCellRSSI));

TextView Neighboring = (TextView)findViewById(R.id.neighboring);
List<NeighboringCellInfo> NeighboringList = telephonyManager.getNeighboringCellInfo();

String stringNeighboring = "Neighboring List - Lac : Cid : Psc : type : RSSI\n";
for(int i = 0; i < NeighboringList.size(); i++)
{
  String dBm;
  int rssi = NeighboringList.get(i).getRssi();
  if(rssi == NeighboringCellInfo.UNKNOWN_RSSI)
  {
    dBm = "Unknown RSSI";
  }
  else
  {
    if(rssi >= 0 && rssi < 32)
    {
      dBm = String.valueOf(-113 + 2 * rssi) + " dBm";
    }
    else
    {
      dBm = "Unknown value:" + Integer.toString(rssi);
    }
  }

  stringNeighboring = stringNeighboring
    + String.valueOf(NeighboringList.get(i).getLac()) + " : "
    + String.valueOf(NeighboringList.get(i).getCid()) + " : "
    + String.valueOf(NeighboringList.get(i).getPsc()) + " : "
    + String.valueOf(NeighboringList.get(i).getNetworkType()) + " : "
    + dBm + "\n";
}

Neighboring.setText(stringNeighboring);

推荐答案

邻接细胞报道于两种不同的方法:

Neighboring cells are reported in two different ways:

在GSM / GPRS(这似乎是你,当你把你的截图在网络上),你应该得到的MCC / MNC / LAC / CID元组的相邻小区。我看你得到有效的CID值。力晶将永远是-1,如果你是一个GSM(2.xG)网络上,作为PSC对GSM没有意义(PSC是CDMA参数和GSM是基于TDMA)。

On GSM/GPRS (which seems to be the network you were on when you took your screenshot) you should get the MCC/MNC/LAC/CID tuple for the neighboring cells. I see you get valid CID values. The PSC will always be -1 if you're on a GSM (2.xG) network, as the PSC has no meaning on GSM (PSC is a CDMA parameter and GSM is TDMA-based).

在UMTS的东西是不同的:对于邻国只有PSC报告细胞,你不会找到他们的其他参数,除非你连接到它们

On UMTS things are different: For neighboring cells only the PSC is reported, and you will not find out their other parameters unless you connect to them.

LTE在原理类似于UMTS,但略有不同的名字:不是LAC和CID你有TAC(跟踪区域code)和CI(小区标识);而不是PSC你有一个PCI(物理小区ID)。但是,它们基本上是相同的作为它们的UMTS对应

LTE is in principle similar to UMTS, but with slightly different names: instead of LAC and CID you have TAC (Tracking Area Code) and CI (Cell Identity); instead of a PSC you have a PCI (Physical Cell ID). However, they do essentially the same as their UMTS counterparts.

请注意,但是,实施差异很大的设备之间:有些手机将不报告PSC即使在3G网络,有的将永远不会报告相邻小区。该歌Nexus S(因为大多数的三星建造的设备)的报告也没有。

Note, however, that implementation varies greatly between devices: Some phones will not report PSC even on 3G networks, and some will never report neighboring cells. The Nexus S (as most Samsung-built devices) reports neither.

不能确定LAC = 0,虽然。它可能意味着相同的LAC作为当前单元格,在这种情况下,这将是有趣的,看看从一个位置区,那里的手机可以拿起细胞多的LAC边界的输出。 (难道我们会看到细胞来自LA的吗?还是刚刚从我们LA?什么LAC会从邻近的LA小区报?)

Not sure about the LAC=0, though. It might mean "same LAC as current cell", in which case it would be interesting to see the output from the boundary of a Location Area, where the phone can pick up cells with multiple LACs. (Would we be seeing cells from both LAs? Or just from "our" LA? What LAC would be reported for cells from a neighboring LA?)

这篇关于邻近的小区信息是不准确的的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆