Solved

IMEI Checksum

Posted on 2004-04-18
7
2,761 Views
Last Modified: 2013-12-09
I need to check in my application if enetered IMEI number is valid.
Can someone provide me some code sample or specification about counting IMEI checkum?
0
Comment
Question by:Lukasz Lach
  • 4
  • 3
7 Comments
 
LVL 2

Expert Comment

by:anupvijay
ID: 10857640
Hi AnAkin,

I did not completely understand your question. Do you want to check the IMEI entered against the IMEI against the
phone connected to your PC or is it something else ?

Just let me know a little more about what you are trying to do.

Cheers.
0
 
LVL 5

Author Comment

by:Lukasz Lach
ID: 10860036
i have seen that some simlock applications have IMEI check. I don't want to have a moile connected to the computer. There is something like checking if IMEI is valid just by counting IMEI checksum...
0
 
LVL 2

Expert Comment

by:anupvijay
ID: 10860660
Does this look like something of use to you.
http://forums.devshed.com/t130517/s.html?highlight=Video+card+selection+for+2+monitors

By the way the IMEI/IMEISV is predefined by the ETSI and have a specific format in which it should be present.
If that is what you want, then you could find the spec at www.3gpp.org

Cheers.
0
What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

 
LVL 2

Accepted Solution

by:
anupvijay earned 250 total points
ID: 10860692
This is the spec for the Check Digit computation.

www.arib.or.jp/IMT-2000/ARIB-spec/ARIB/22016-310.PDF

HTH,
Cheers.
0
 
LVL 5

Author Comment

by:Lukasz Lach
ID: 10861163
ok i think that is what i was looking for. but i still don't understand one thing:
IMEI: 351462809239889

Sum = 3 + 1 + 0 + 1 + 8 + 6 + 4 + 8 + 0 + 9 + 4 + 3 + 1 + 8 + 8 + 1 + 6 = 71
So, 80 - 71 = 9

But what does it mean, that the sum equals 9?
How do i know IMEI is valid?
0
 
LVL 5

Author Comment

by:Lukasz Lach
ID: 10861255
oh, ok =)
0
 
LVL 5

Author Comment

by:Lukasz Lach
ID: 10862000
so...

<?php

    function imeiChecksum($imei) {

        if (strlen($imei) != 15) return False;
        $checksum = 0;
        for ($nr = 0; $nr < 14; $nr++) {
            if ($nr % 2 == 0) $checksum += $imei{$nr}; else {
                $nr2 = $imei{$nr} * 2;
                $checksum += ($nr2 % 10) + (int)($nr2 / 10);
            }
        }
        $nr = ($checksum{1} != '0') ? (int)(($checksum / 10)+1) * 10 : $checksum;
        return ($nr - $checksum) == $imei{14};
    }

    var_dump(imeiChecksum('350770205545506'));

?>
0

Featured Post

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Wireless Access Points, Network 5 65
New modem? 4 74
My smart TV isn't so smart 14 155
Cisco Prime and Maps 3 44
MAC Filtering: MAC filtering is like handing a list of names to a doorman. If someone comes to the door and mentions a name, this name is checked by the doorman on his list and granted or denied access by this. This means that if someone menti…
In this article we have discussed about the OS X EI Capitan and how to fix Wi-Fi issue in OS X El Capitan. We have explained how to delete system level preferences and create a new Wi-Fi location to resolve Wi-Fi issue.
This Micro Tutorial will show you how to maximize your wireless card to its maximum capability. This will be demonstrated using Intel(R) Centrino(R) Wireless-N 2230 wireless card on Windows 8 operating system.
Viewers will learn how to connect to a wireless network using the network security key. They will also learn how to access the IP address and DNS server for connections that must be done manually. After setting up a router, find the network security…

813 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now