Tools/Env.: C++, VS2008, WM6.1
I currently only have the HTC Diamond Windows Mobile phone available for testing and try as I may, with all of my hacking prowess, I still cannot accomplish the task of acquiring the remaining details of Cell ID and LAC, to complete my cellular location based program.
I have managed to get the MCC and MNC, but the Cell ID and LAC numbers are still hidden to me. There must be a way of getting these, for the phone itself no doubt uses them for other things. :/
To reiterate what I have tried, it would be the following:
RIL_GetCellTowerInfo (g_hRIL); // doesn't even signal the 'ResultCallback' function.
RIL_GetCurrentOperator (g_hRIL, RIL_OPFORMAT_NUM); // calls the 'ResultCallback' function and only with this am I able to at least get the MCC and MNC.
Tried the following test code too, and nothing worked.
//constants and structures for cell ID
#define RIL_DEVSPECIFICPARAM_ENABLECELLIDSUPPORT 26
#define RIL_DEVSPECIFICPARAM_DISABLECELLIDSUPPORT 27
bool mode = true;
DWORD dwFuncID=0;
if (mode)
dwFuncID = RIL_DEVSPECIFICPARAM_ENABLECELLIDSUPPORT;
else
dwFuncID = RIL_DEVSPECIFICPARAM_DISABLECELLIDSUPPORT;
m_hrCellIdRequest_ = RIL_DevSpecific (g_hRIL,(LPBYTE) &dwFuncID, sizeof(DWORD));
// no 'ResultCallback' triggered either.
BYTE req[4]= {24, 0, 0, 0};
m_hrCellIdRequest_ = RIL_DevSpecific (g_hRIL, req, 4);
req[0]=26;
m_hrCellIdRequest_ = RIL_DevSpecific (g_hRIL, req, 4);
I even tried sending the serial AT commands to get something back. eg. "AT+CCED=0\r"
I only get a failed result of '4\r'.
I have read that the last option would be to read its internal memory. But that doesn't seem to be a general method that would work for other phones. And besides, I don't even know where to begin with that.
So I finally broke down with a plea for help to this fabulous community in that if you have somehow managed to get this information from this phone, can you please share it with us?
Or if it is impossible to get, can you explain in detail why that may be?
I just want closure of this once and for all. :)
Once you open the app, go to the "map" tab. You'll see nearby towers, and the app will draw a blue line to the tower you're connected to. Tapping on the tower will show you the tower's identifiers.
A GSM Cell-ID (CID) is a unique number by which GSM towers or the sector of the GSM tower can be identified within a location area code (LAC) or a GSM network. The first or last digits of a CID represent the sector ID. For example, if a secured M2M or LTE M simcard sees one cell tower, its Cell ID is released.
The Cell_ID is a unique code or a synchronization sequence that is assigned to each cell (i.e., a BS or a BS sector) in order to identify the cell exclusively. The scanning is performed by measuring an appropriate metric corresponding to the received RF signal strength.
The Location Area Code, abbreviated as LAC is the unique number given to each location area within the network. The served area of a cellular radio access network is usually divided into location areas, consisting of one or several radio cells.
So after yet more digging around and stubborn "googling", it seems that the reason for the original RIL_* code not working on my phone is that I am on a CDMA (UMTS) network, and not a GSM network.
The GSM network, as I learned, provides the phone with values for MCC, MNC, Cell ID, and LAC.
The CDMA network on the other hand provides a different set of numbers, which are BID, NID, and SID.
e.g. CID -> BID, LAC -> NID, MNC -> SID, MCC -> MCC
The above RIL_* interface code is popular because there are more GSM phones/networks in the world than CDMA (North America mainly).
Now without a true GSM phone at hand, I cannot really test the RIL_* interface code I have. The WM6.1 SDK Cell Emulator tool is neat, but not enough to release a product with.
This then leaves me once again asking for any help from a mobile cellular expert regarding a way to retreive the BID, NID, and SID values from my HTC Diamond phone, in the hope that they really do translate to Cell ID and LAC.
Google Mobile Maps on my phone somehow manages to perform this spectacle. I can only guess they must have found a way on the CDMA network to get the cell tower info.
Any help is appreciated. :)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With