The IMEI displayed in the EUI is retrieved from the network during PDP context activation, the format is as follows:
IMEI + SV (software version), based on the standard specification 3GPP TS23.003.
- Composition of IMEI
- Type Allocation Code (TAC) - 8 digits
- Serial Number (SNR) - 6 digits
- Spare digit - 1 digit
- Composition of IMEISV
- Type Allocation Code TAC - 8 digits
- Serial Number SNR - 6 digits
- Software Version Number (SVN) - 2 digits
If you want to compute the original EMEI from the IMEISV, you can apply the algorithm of Luhn. The Luhn Check Digit (CD) is computed on the 14 digits after the SVN digits are ignored:
Step 1: Double every second digit, starting from the first one on the most right.
Step 2: Add all digits that have been left out in step 1 and then add each individual digit that you got in step 1 (if you got a 12 in step 1, you need to add 1 and 2).
Step 3: If the sum obtained in step 2 ends in 0, then CD is set to 0. Otherwise, the CD is calculated by subtracting the sum from the closest higher value ending in 0 (if you got 18, then CD=20-18=2).
2+(1+2)+0+(1+0)+3+2+7+(1+8)+3+2+1+6+8+6 = 53
CD = 60 - 53 = 7
The original IMEI is:
Why my Device has hex number “f” in the IMEISV?
The API provides the IMEI+SV which means that it is the IMEI and the software version of the device. In the event that the software version is not available, the 'f' will appear and in order to get the actual IMEI, Luhn’s algorithm must be applied.