Join Today













Site Sponsor
Results 1 to 2 of 2

Threaded View

  1. #1

    iPhone Moderator, Trusted Guru &
    CDMA GURUS Booster
    rich hathaway's Avatar


    Join Date
    Apr 2010
    Location
    kansas city
    Posts
    2,963
    Rep Power
    5945

    Default IMEI:GUIDE- Description and how to generate checksum

    First off,this is for educational purposes only so lets not get off on a bunch of stuff about changing it.

    ok first off a little history about imei

    (from wiki)--->IMEI is short for International Mobile Equipment Identity and is a unique number given to every single mobile phone, typically found behind the battery.
    IMEI numbers of cellular phones connected to a GSM network are stored in a database (EIR - Equipment Identity Register) containing all valid mobile phone equipment.
    When a phone is reported stolen or is not type approved, the number is marked invalid.

    Now what it is comprised of---> For the IMEI format prior to 2003, the GSMA guideline was to have this Check Digit always transmitted to the network as zero. This guideline seems to have disappeared for the format valid from 2003 and onwards.

    As of 2004, the format of the IMEI is
    AA-BBBBBB-CCCCCC-D
    although it may not always be displayed this way. The IMEISV drops the Luhn check digit (last digit) in favour of an additional two digits for the Software Version Number (SVN), making the format AA-BBBBBB-CCCCCC-EE


    SEE PIC BELOW FOR DETAIL



    Now that we see how it is made up,lets look at how to calculate the checksum for it.

    The checksum is comprised using the "Luhn algorithm",it is really very easy to understand and works like this



    so really it is just simple math to double every second digit starting with the second,then add the sum of those single digits to get 52(for this imei),now just remember that this sum must be divisible by 10 so we will be adding 8 to get 60 which is divisible by 10 so our checksum will be 8 so our imei is 490154203237518

    i have a checksum calc i will post here for you all to use,also i will post some source for you to make your own if you wish.



    [hide-thanks]
    my tool and 2 sources for your own tools here ----> [Only registered and activated users can see links. ]


    neither of the below sources are mine or are from my tool
    both are included in the file above
    this source is in c#

    private Boolean ValidateIMEI(string IMEI)
    {
    if (IMEI.Length != 15)
    return false;
    else
    {
    Int32[] PosIMEI = new Int32[15];
    for (int innlop = 0; innlop < 15; innlop++)
    {
    PosIMEI[innlop] = Convert.ToInt32(IMEI.Substring(innlop, 1));
    if (innlop % 2 != 0) PosIMEI[innlop] = PosIMEI[innlop] * 2;
    while (PosIMEI[innlop] > 9) PosIMEI[innlop] = (PosIMEI[innlop] % 10) + (PosIMEI[innlop] / 10);
    }

    Int32 Totalval = 0;
    foreach (Int32 v in PosIMEI) Totalval += v;
    if (0 == Totalval % 10)
    return true;
    else
    return false;
    }

    }

    below source is for excel



    Option Explicit

    Function AddLuhnDigit(target As Range) As String
    Dim sTmp As String
    Dim i As Integer, iTmp As Integer

    For i = 2 To Len(target.Text) Step 2
    sTmp = sTmp & (CInt(Mid(target.Text, i, 1)) * 2)
    Next i

    For i = 1 To Len(sTmp)
    iTmp = iTmp + CInt(Mid(sTmp, i, 1))
    Next i

    For i = 1 To Len(target.Text) Step 2
    iTmp = iTmp + CInt(Mid(target.Text, i, 1))
    Next i

    AddLuhnDigit = target.Text & Iif((10 - (iTmp Mod 10))=10,"0",(10 - (iTmp Mod 10)))

    End Function


    You can then use it on your sheet like any other formula, so assuming your list of numbers is in column A, then put =AddLuhnDigit(A1) in B1 and copy down.[/hide-thanks]

    please feel free to add anything to this thread
    Last edited by rich hathaway; 04-04-2014 at 06:16 PM.
    Custom tools and custom phone & mifi firmwares built to your specs.Contact me !

    I WILL NOT ANSWER SUPPORT QUESTIONS THRU PRIVATE MSG.
    See mifis.us for unlimited data on vzw-AT&T-TMO-or some MVNO's (Resellers welcome)

    www.mifis.us <--get yer unlimited data mifis here


 

Similar Threads

  1. How can I generate the Akey for Virgin Mobile? I have talk and text, but no web
    By Jonathan White in forum Srpint MVNO general discussion
    Replies: 0
    Last Post: 12-24-2013, 09:14 PM
  2. Solution for IMEI and SPC.
    By Jhornands in forum GSM ANDROID Devices
    Replies: 12
    Last Post: 08-15-2013, 05:44 PM
  3. Replies: 0
    Last Post: 05-01-2013, 01:40 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •