Return Network type (GSM-UMTS)
| Wed, 2007-03-07 11:37 | |
|
|
Hi,
I'm using S60 3rd and I'd like to get the actual network type to which my device is connected (GSM - UMTS). I use: Code: iTelephony->GetCurrentNetworkInfo(iStatus,iNetworkInfoV1Pckg); but iMode is always ENetworkModeUnknown and iAccess is always ENetworkAccessUnknown. Anyway my device is connected to GSM network. I also use the required capabilities (ReadDeviceData and Location).iMode = iNetworkInfoV1.iMode; iAccess = iNetworkInfoV1.iAccess; Could please anyone suggest to me how can I retrieve currently connected network? What's wrong or missing with my code? Thanks a lot Bye, Luca |






Forum posts: 982
you should have smth like:
iTelephony->GetCurrentNetworkInfo(iStatus, iNetworkInfoV1Pckg);
SetActive();
And in RunL method
CTelephony::TNetworkMode mode = iNetworkInfoV1.iMode;
But as documentation says "This functionality is not available when the phone is in "flight" mode."
pirosl
Forum posts: 85
I' m using correctly active object like you suggest, and I'm not in flight mode, but I have:
iMode = ENetworkModeUnknown;
iAccess = ENetworkAccessUnknown;
Any idea?
Luca.
Forum posts: 982
pirosl
Forum posts: 85
Here my simple code:
{
iTelephony->GetCurrentNetworkInfo(iStatus,iNetworkInfoV1Pckg);
SetActive();
}
void CNetworkInfo::RunL()
{
if(iStatus==KErrNone)
  {
  iMCC = iNetworkInfoV1.iCountryCode; // ok
  iMNC = iNetworkInfoV1.iNetworkId; // ok
  iMode = iNetworkInfoV1.iMode;  // Unknown
  iAccess = iNetworkInfoV1.iAccess; // Unknown
  }
The documentation says:"ENetworkAccessUnknown is used when there is no network activity and therefore no RAT active", but I can receive or make phone call....
Forum posts: 45
Did you have "Network Services" capability ?
Regards,
tushar
Tushar Bhattacharyya
Forum posts: 85
I didn't, I tried to add it...but with tha same result.
It could be a capability problem but I've documentation's capabilities (ReadDeviceData and Location) so I'm on the horns of a dilemmaÂ
Forum posts: 982
pirosl