Wednesday, May 14, 2008

Getiing Location Information (IMEI,MCC,MNC,LAC,CELLID) without GPS

We can get network related information like CELLID , Mobile Network Code ,Mobile Country Code , Location Area Code from mobile device and these network information will help you to find location of mobile user.I got eperience of these network information on different platform.Hope this information will help for LBS app developer.

Network Data information

For Blackberry:
I tested this code on 8800,8320,8100,8300 got all correct network information.

GPRSCellInfo cellinfo;
cellinfo = GPRSInfo.getCellInfo();

For Motorola :
Tested on v3xx,v3x .for testing this code your application must be signed.

lac = System.getProperty("LocAreaCode")
imsi = System.getProperty("IMSI")
mcc = imsi.substring(0,3);
mnc = imsi.substring(3,6);

For Windows Mobile :

Tested on motorola MC35 (windows mobile 5,.net 2.0)
HTC s710(windows mobile 6.0,.net 2.0)

DLL needed : ril.dll,cellcore.dll

Marshal.PtrToStructure(lpData, rilCellTowerInfo);
uint UiValue = rilCellTowerInfo.dwCellID;
cellid = String.Format("{0:X2}", UiValue);
mcc = rilCellTowerInfo.dwMobileCountryCode;
mnc = rilCellTowerInfo.dwMobileNetworkCode;
UiValue = rilCellTowerInfo.dwLocationAreaCode;
lac = String.Format("{0:X2}", UiValue);
IMEI will get using tapi class

For Sony-Ericsson :

All sony-ericsson 7.3 platform above will support this.

MCC=System.getProperty(s1 = "")

On Nokia .....(From reference) :

>>> import com.symbian.epoc.etel
>>> a = com.symbian.epoc.etel.Etel
>>> b= a.getPhone()
>>> print b.getPhoneId().serialNumber

>>> import
>>> m =,p)
>>> mads = m.getAddresses()
>>> m = mads[0]
>>> print m.getSubscriptionId

This is not "pure" java, but Jython which acesses Javaphone library, but you should get the point.

And, once you read the IMEI and IMSI... and hence you detect your SIM has been changed by the THIEF who STOLE your phone, you can start a call which can't be stopped by the phone user!
 p =
 ts = p.getTerminals()
 t = ts[0]
 tads = t.getAddresses()
tad = tads[0]
 mc = p.createCall()
call = mc.connect(t,tad,"number") 

Getting IMEI  from all major platforms:

  1. Nokia
    • System.getProperty("phone.imei");
    • System.getProperty("");
    • System.getProperty("");  ....For S40 fp1 onwards but binary need to be signed
  2. Sony Ericsson
    • System.getProperty("com.sonyericsson.imei");
  3. Samsung
    • System.getProperty("");
  4. Motorola
    • System.getProperty("IMEI");
    • System.getProperty("com.motorola.IMEI");
  5. Siemens
    • System.getProperty("com.siemens.IMEI");
  6.  LG
    • System.getProperty("com.lge.imei");


Gino T said...

know you this function for nokia? thnks.

AJAY said...

Hi Dear !
For nokia series 40 you will not get all parameter which i mentioned in blog.
But for nokia series 60 you can use symbian code to get these parameter.

atleta said...

The Nokia information is quite useless as it requires the javaphone APIm which is not available on CLDC. It was only ever used in the 9210. However you can of course doi these things from Symbian and very probably from python (suing PyS60).

Anonymous said...


for Moto,

imsi = System.getProperty("IMSI")
mcc = imsi.substring(0,3);
mnc = imsi.substring(3,6);

Does Google map need mcc/mnc from imsi?

How about the roaming situation in which current PLMN is not the same as imsi?

AJAY said...

Google map doesn't need of MCC/MNC its working on longitude and latitude.

But for getting Lon and Lat you will need MCC and MNC if device doesnt support GPS

Anonymous said...

Hi Ajay,

Where can i get some information related to Google map API used for cell-locationg methord without GPS feature?


AJAY said...

no u can not work on google map without GPS..for that u need to get MCC,MNC,LAC which will help u to get long and lati.
But u need to have DB related to this to work on MCC,MNC which is not possible without help of operator.

atleta said...

AJAY: Sorry, but you're wrong. Google do have a cellid database, and continously build it with the help of the mobile gmaps application. Whenever a GPS enabled device makes a query it also sends the cell id info which they assemble into a map. Devices without a GPS will send the cell id info only (of course MNC, etc.) and google will show them their approximate location. I don't know how it works (how the requests should look like), but this is the mechanics behind.

AJAY said...

Yes,the same thing i was explained.
Google map has DB of long and lati..which was created with help of MCC,MNC..this is Standard DB created in world..not exact but aprox.
Check my work with ..
Here you will feel EXP.

Anonymous said...

Do you know if it is possible to get actual RSSI values for S40 or S60 phones?

AJAY said...

Hi ,
Receiver Signal Strength Indicator (RSSI) is not part of my work,but as per my knowledge for S60 CTelphone class can help to get these values.
But for S40 its quite difficult case ,please try "" in system properties.

eryn said...

Is it possible to detect neighbour cell tower information on BlackBerry?

nagu said...

Hi, this is nagu my request is using j2me how can i get cell ID from nearest tower.This should be compitable on all java enabled phones.Please help me.

Nilesh S. Yerunkar said...

hello ajay,
will u help me for ,
get cell id in Nokia S60 & s40..


Thanks & Regards

Abhijit said...

hi Ajay!

can you help me to identify Samsung mobile CellID,IMEI no.
System.getProperty("") and System.getProperty("device.cellid")
I try this but it is not working.

Android app developers said...

Your blog information has very good effort.This is one of the significant post.

SHYAM said...

Thank you for the info. It sounds pretty user friendly. I guess I’ll pick one up for fun. thank u

J2ME Developer

Ayuyazi said...

Hi Ajay I am working in J2ME location based application and I need to read a list of cell id (more than two) from Nokia S60 or S40 Cell phone. How can I do it.