Archive for the 'General' Category

Programmatically retrieving the IMEI or ESN number for mobile devices and the peculiar problem in doing this with windows mobile.

Saturday, February 21st, 2009

While writing commercial applications which require some sort of licensing/copy protection/user duplication prevention ,developers need to have a method for retrieving any unique id associated with a device.For most practical purposes this unique id is the IMEI(International Mobile Equipment Identity) or the ESN(Electronic Serial Number)of the mobile device.On all phones this can be retrieved by dialing “*#06#”.A few  mobile platforms have this exposed by way of native API’s which return the IMEI/ESN  of the device.On some mobile platforms such as Windows mobile, these API are restricted and need the application to be signed for the API to function properly.But there exists a way in which the IMEI/ESN can be retrieved by all applications regardless of the platform,this approach uses the GSM/CDMA modem to get the IMEI /ESN .All that is required is to programmatic ally open a serial port connection to the modem(mostly on COM9) ,initialize the modem and then send the “AT+CGSN” command.In response the modem will give you the IMEI/ESN of the device.In case you are not able to establish a connection on COM9, try polling all the available COM ports and see which one responds to specific commands.

Back from slumber…..!

Saturday, February 21st, 2009

There’s a lot that has kept me out of action for the past 3 years,personal as well as professional.I’ve grown older professionally and personally(my receding hairline is a testament to it!).I’ve restarted the blog because i believe that i have a lot to offer in terms of my perspective on technology.So here it is hoping that i can stay true to that….

Back :)

Thursday, February 2nd, 2006