Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
New Developer
AtariPete
Posts: 8
Registered: ‎08-21-2008
My Device: Not Specified
Accepted Solution

How To Get Cell Tower Info (Cell ID,LAC, ...) from CDMA BB phones?

I'm attempting to get cell tower information on a CDMA newtwork.

 

Sepecifically, how am I able to retrive the Cell ID and LAC of a specific phone? 

 

Being familiar with GSM networks, CDMA has been a bit perplexing. Using CDMAInfo, I've gotten so far:

 

//get sid (On GSM this is the MCC) net.rim.device.api.system.CDMAInfo.getCellInfo().getSID(); //get nid (On GSM this is the MNC) net.rim.device.api.system.CDMAInfo.getCellInfo().getNID(); //get Cell ID -- Entirely not sure, guessing its the BID???? net.rim.device.api.system.CDMAInfo.getCellInfo().getBID(); //get LAC -- entirely unsure how to get the location area code for CDMA // ???

  

As you can see, I'm assuming the Cell ID is the BID (Is this correct?) If so, how do I now get the LAC? For example, GPRSInfo.GPRSCellInfo.getLAC() method does note exist in CDMAInfo.

Please use plain text.
Administrator
MSohm
Posts: 14,433
Registered: ‎07-09-2008
My Device: BlackBerry Z30, BlackBerry PlayBook
My Carrier: Bell

Re: How To Get Cell Tower Info (Cell ID,LAC, ...) from CDMA BB phones?

Location Area Code is used in GSM and UMTS networks.  It is not used in CDMA networks.
Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Found a bug? Report it using Issue Tracker
Please use plain text.
New Developer
AtariPete
Posts: 8
Registered: ‎08-21-2008
My Device: Not Specified

Re: How To Get Cell Tower Info (Cell ID,LAC, ...) from CDMA BB phones?


MSohm wrote:
Location Area Code is used in GSM and UMTS networks.  It is not used in CDMA networks.

THanks for this. But what about BID? Am I right in assuming this is the cell ID?

 

Please use plain text.
Developer
Developer
gtj
Posts: 319
Registered: ‎07-20-2008
My Device: Not Specified

Re: How To Get Cell Tower Info (Cell ID,LAC, ...) from CDMA BB phones?

The concepts are a little different.   BID (Base Station ID) is probably more equal to the BSIC (Base Station Identity Code).  In any case, the SID (System ID) is the highest in the hierarchy and BID is the lowest with Network ID (NID) in the middle.

 

Please use plain text.
Developer
morganbelford
Posts: 35
Registered: ‎12-12-2008
My Device: Not Specified

Re: How To Get Cell Tower Info (Cell ID,LAC, ...) from CDMA BB phones?

Does anyone have a small set of valid test CMDA SID, BID and NID values?
Please use plain text.
Developer
marchywka
Posts: 1,415
Registered: ‎07-30-2008
My Device: Not Specified

Re: How To Get Cell Tower Info (Cell ID,LAC, ...) from CDMA BB phones?

[ Edited ]

[ note: the locations below likely do not reflect Atlanta and contain at least one unknown

location, should be somewhere in conus fwiw, LOL . ]

 

Did you see my earlier post regarding CDMA and google tower data base?

At least one of their pages IIRC claimed you could use NID for LAC but I never got it

to work. I've also got some short command line utilities to generate binary post data for

testing ( use with wget for example, you don't seem to need to fake the user agent LOL),

 

java xxxx 1 20442 6105 > aaaaa

wget -O aaaax -S -v --post-file=aaaaa "http://www.google.com/glm/mmap"

to dump output:

java xxxxx aaaax

 

No warrantee but you can try these if you like that should be circa NY, SF, and Atlanta

( it wouldn't be any fun if I told you which I thought was which )

 

$ cat xxxx.xxx | sed -n 's/.*bid=/bid=/p' | sed -e 's/\(sid=[^&]*\)&.*/\1/' |urldecode -html |  sort | uniq -c

 

22 bid=273&nid=2&sid=4195
   8 bid=325&nid=2&sid=4195
  28 bid=4928&nid=3&sid=40
   2 bid=713&nid=2&sid=4195
  78 bid=784&nid=2&sid=22
  30 bid=786&nid=2&sid=4195
 124 bid=814&nid=2&sid=22

 

 

CDMAInfo.CDMACellInfo cci= CDMAInfo.getCellInfo();
   m_cell=cci.getBID();
   adr+="&bid="+m_cell;
   adr+="&nid="+cci.getNID();
  // not sure if this is a good idea or not ? LOL

m_lac=cci.getNID();
   adr+="&sid="+cci.getSID();

 

 

 

Message Edited by marchywka on 12-12-2008 09:27 AM
Please use plain text.
Developer
morganbelford
Posts: 35
Registered: ‎12-12-2008
My Device: Not Specified

Re: How To Get Cell Tower Info (Cell ID,LAC, ...) from CDMA BB phones?

That was just what I needed!  Thank you so much.
Please use plain text.
Developer
GasBot
Posts: 57
Registered: ‎03-24-2009
My Device: Not Specified

Re: How To Get Cell Tower Info (Cell ID,LAC, ...) from CDMA BB phones?

Can anyone help clarify this for me?  I have no clue what this all means or how to encode the bid/sid/nid data and send it to Google.
Please use plain text.
Developer
Developer
gtj
Posts: 319
Registered: ‎07-20-2008
My Device: Not Specified

Re: How To Get Cell Tower Info (Cell ID,LAC, ...) from CDMA BB phones?

I don't think anyone has figured out what to send to google for CDMA networks.  If you know how to do it for GSM, you could just try substituting values until you get a valid response.  
Please use plain text.
Developer
marchywka
Posts: 1,415
Registered: ‎07-30-2008
My Device: Not Specified

Re: How To Get Cell Tower Info (Cell ID,LAC, ...) from CDMA BB phones?

google maps works fine on my vz phone without assiest AFAIK. I have lots of cell info and a test program

but never got it to work. i think some cell info from ATT worked right away and the forum posts I found didn't work

out.

 

Please use plain text.