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. :)