7

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

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

  • 3G: CGI = PLMN-ID + LA code + 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).

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

MikeW
  • 151
  • 1
  • 2
  • 5
  • 1
    You've answered your own question, surely - make it up from the plmn id + LAC + Cell Id? – user1725145 Jan 08 '14 at 09:46
  • That's true; however I'd like to know that the CGI I generate is a valid number when I use it. And getting the CGI from the system would help confirm it. This is because when generating the PLMN-ID, I had to shift the numbers in a non-intuitive way... I tried to google for an example of a CGI or eCGI but I couldn't find any. – MikeW Jan 09 '14 at 17:29
  • I highly dislike this method of describing network ID numbers. We are talking about integers, so thinking mathematically `CGI = PLMN-ID + LA code + CID` is incorrect. Since this actually refers to string concatenation. – Joakim Oct 07 '14 at 09:43
  • I agree with you that they are string concatenations. There seems to be very sparse documented examples (none I could find actually)! Do you know of any? – MikeW Oct 09 '14 at 00:42

1 Answers1

6

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

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

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

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

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

Translating from a 15 digit code to the blocks require knowledge of the cell technology, in order to know if you have to split the last 10 digits in two 5 digits blocks or in a 7 and 3 digits blocks.

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

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

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

sagivd
  • 120
  • 2
  • 11