Android LTE 和 GSM 网络的 eCGI 和 CGI

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/20981074/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-20 03:45:57  来源:igfitidea点击:

eCGI and CGI for LTE and GSM networks

androidgsmcellular-networklteumts

提问by MikeW

I'm trying to determine the CGI (the Cell Global Identifier) the UE is connected to.

我正在尝试确定 UE 连接到的 CGI(小区全局标识符)。

From the 3GPP specs, it's defined as follows:

根据 3GPP 规范,它的定义如下:

  • 3G: CGI = PLMN-ID + LA code + CID
  • 4G: ECGI = PLMN-ID + ECI
  • 3G:CGI = PLMN-ID + LA 代码 + CID
  • 4G:ECGI = PLMN-ID + ECI

I can already get the LAC (location area code) and CID (Cell ID) from the system. And I can generate the PLMN-ID from the MCC (Mobile Country Code) and MNC (Mobile Network Code).

我已经可以从系统中获取 LAC(位置区号)和 CID(小区 ID)。我可以从 MCC(移动国家代码)和 MNC(移动网络代码)生成 PLMN-ID。

My question is can I also get the CGI from the system?

我的问题是我也可以从系统中获取 CGI 吗?

回答by user3227007

The CGI (2G and 3G) and eCGI (ofr 4G) is always a 15 decimal digit code

CGI(2G 和 3G)和 eCGI(来自 4G)始终是 15 位十进制数字代码

For 2G 3G and 4g networks the five first digits are the MCC (Mobile Country Code) and the MNC (Mobile Network Code)

对于 2G 3G 和 4g 网络,前五位数字是 MCC(移动国家代码)和 MNC(移动网络代码)

For 2G and 3G networs the next 5 digits are the LAC (Location Area Code) and the last five the Cell ID within the LAC

对于 2G 和 3G 网络,接下来的 5 位数字是 LAC(位置区号),最后五位是 LAC 内的小区 ID

For 4G networs the 10 digits are then eNB and split in a 7 digits code plus a 3 digits code for the Cell ID.

对于 4G 网络,10 位数字是 eNB,然后分成 7 位数字代码和 3 位数字代码作为小区 ID。

The point is that some systems or applications works with de whole CGI or eCGI and other systems works with the spparate blocks: (MCC-MNC-LAC-CID or MCC-MCC-eNB)

关键是一些系统或应用程序与整个 CGI 或 eCGI 一起工作,而其他系统与单独的块一起工作:(MCC-MNC-LAC-CID 或 MCC-MCC-eNB)

Translating from a 15 digit code to the blocks requiere knowing the cell technology in order to know if you have to split the las 10 digits in two 5 digits blocks or in a 7 and 3 digits blocks.

从 15 位代码转换为块需要了解单元技术才能知道是否必须将 las 10 位分成两个 5 位块或 7 位和 3 位块。

In the other hand, if you want to "translate" the blocks into a 15 digits code, you have to pad then blocks to reach the 15 digits length, so if you have 213-01-123-5 it can be 213010012300005 (2G or 3G) or 21301000012305

另一方面,如果要将块“翻译”为 15 位代码,则必须填充块以达到 15 位长度,因此如果您有 213-01-123-5,则可以是 213010012300005(2G或 3G) 或 21301000012305

Google API ofr geolocation has a non-mandatory field for technology, but I think that it should be mandatory.

Google API ofr geolocation 有一个非强制性的技术领域,但我认为它应该是强制性的。

I'm afraid that it is really going to be a problem.

恐怕真的会出问题。