Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to retrieve TAC from IMEI?

The problem is simple. I have an IMEI and I want to retrieve a TAC from it. How can I do it? Is there a way of recognizing how many digits should TAC have if I have just an IMEI? Is it necessary to know explicitly the year of production of the device to know it?

like image 312
Przemysław Różycki Avatar asked Jul 23 '12 13:07

Przemysław Różycki


2 Answers

Read 8 digits from beginning. TACs with 6 digits are rarely and are in the past (since 2004).

But for safety you can analyze it twice, and begin from longest version, then use short. If you find phone model, then you use that TAC. If not, then use 8 digits, because old phones are well known (in most cases).

To transform tac to phone model use databases:

  • http://www.numberingplans.com/ - paid, with downloadable CSV sample file
  • http://imei-number.com/imei-number-lookup/ - free one, but with captcha
  • http://tacdb.osmocom.org/ - free one, with downloadable CSV
  • https://imeidb.gsma.com/imei/index - "official" imei database. requires inscription.
like image 167
Michael T Avatar answered Sep 18 '22 04:09

Michael T


The first eight digits of the IMEI number is the TAC code. Prior to 2004, the first six digits were the actual device identifier and the next two were a Final Assembly Code (FAC)representing where the device was manufactured. Since then, the FAC portion has been dropped.

TAC codes are issued by two authorities (CTIA for North America and the GSM Association for everywhere else), identifiable by the first two digits. Because the TAC codes are issued sequentially, you can test positions three through six to identify the six-digit TAC codes. For example, I use code like this:

if    substr(IMEI,1,2) = '01' and substr(IMEI,1,8) < '01015900'  /* CTIA */
   or substr(IMEI,1,2) = '35' and substr(IMEI,1,8) < '35150100'  /* GSMA */
   then TAC_TYPE = '6-digit';
   else TAC_TYPE = '8-digit';

These ranges were determined by my personal inspection of the TAC code tables and are not guaranteed.

See this Wikipedia link for more info.

like image 40
BellevueBob Avatar answered Sep 21 '22 04:09

BellevueBob