"How To" Series: Retrieving IMSI and IMEI on Windows Mobile

I had to retrieve the IMSI and IMEI on Windows Mobile for a particular project.
What I needed actually was the IMSI , because it may be used in OMA Client Provisioning through WAP Push scenarios. It may be very practical for the enterprise to manage its devices remotely and I will post more on that topic later on.

In order to retreive IMSI and IMEI, one have to deal with the Telephony API and PInvoke.
In general the magic is done by invoking the native lineGetGeneralInfo routine from TAPI.

You may download the full source code from here
the original code article may be found here


There is another approach as well - buy the Telephony library from OpenNETCF

Links
What is IMSI
What is IMEI
OMA Client Provisioning for Windows Mobile
The sample source code

Comments

# re: "How To" Series: Retrieving IMSI and IMEI on Windows Mobile

Monday, July 23, 2007 11:29 AM by Shadowmite

Thank you for making this available, it's kind of pathetic that Alex sold out his free library to do this sort of thing which is now sold for unheard of pricing schemes only a idiot would pay. It's nice to have another source for this info.

# re: "How To" Series: Retrieving IMSI and IMEI on Windows Mobile

Tuesday, July 24, 2007 9:07 AM by Rajat Solanki

Hi,

THANKS A LOT.

i don't have words to say thank, but thanks to concern and sending me FINAL, ACCOMPLISH ANSWER.

may i get your e-mail id?

please, despritally i am waiting.

bye

regards Rajat.

# re: "How To" Series: Retrieving IMSI and IMEI on Windows Mobile

Thursday, August 02, 2007 9:55 AM by Rajat Solanki

Hi,

thanks to make it, It is all working, but when I could use it on SmartPhone I got a problem that at this time I can fullfil and pass successfully LineGetGeneralInfo function.

It retrieves non-zero.

I dont know why?

but all on pocketpc it is wokring fine.

bye

regards Rajat

# re: "How To" Series: Retrieving IMSI and IMEI on Windows Mobile

Tuesday, March 04, 2008 11:12 PM by Gerard Lim

Hi

I am testing your project using Pocket PC 2003 and WM6.  It works nicely on Pocket PC 2003 but fails at Tapi.LineOpen(...).  I did not change any code, just changed the Target Platform to WM6 Classic and Professional.

Has the Tapi.lib changed?

Thanks.

# re: "How To" Series: Retrieving IMSI and IMEI on Windows Mobile

Saturday, March 08, 2008 10:24 AM by Vlad

Hi Gerard

As with regards to the below, try to sign the code you are deploying with a certificate that gives you privileged rights.

On smartphones it seems that access rights are a bit more tight than PPC.

I did this for the samples above and it works.

See: msdn2.microsoft.com/.../ms839377.aspx

Also, using VS2005 is easier, just go to project properties, devices tab, and enable the "authenticode signing". Select privileged certificates (you have them in c:\Program Files\Windows CE Tools\wce500\Windows Mobile 5.0 Smartphone SDK\Tools ) and you have a winner.

Thanks Ruslan for the wonderfull code above!

# re: "How To" Series: Retrieving IMSI and IMEI on Windows Mobile

Monday, March 17, 2008 5:02 AM by Gerard Lim

Thank you VERY VERY MUCH, VLAD.  It worked once I got a privileged certificate into my project.  Now, to get email going...

Beats buying OpenNETCF stuff..

# re: "How To" Series: Retrieving IMSI and IMEI on Windows Mobile

Wednesday, May 28, 2008 11:11 PM by kelly818

weather can get the device's brand and type??

# re: "How To" Series: Retrieving IMSI and IMEI on Windows Mobile

Wednesday, May 28, 2008 11:13 PM by kelly818

whether can get the device's brand and type??

# re: "How To" Series: Retrieving IMSI and IMEI on Windows Mobile

Thursday, August 20, 2009 10:30 AM by Zahoor

I ran this application on WM6.0. I got the Manufacturer, Model,revision,IMEI but did not get IMSI.

When i tried it on emulator i could not get any thing but on device i got every thing other then IMSI.

Any Idea?

Thnx in advance