Return Network type (GSM-UMTS)

Login to reply to this topic.
Wed, 2007-03-07 11:37
Joined: 2006-10-17
Forum posts: 85
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);
iMode = iNetworkInfoV1.iMode;
iAccess = iNetworkInfoV1.iAccess;
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).

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

Wed, 2007-03-07 14:03
Joined: 2004-05-24
Forum posts: 982
Re: Return Network type (GSM-UMTS)
GetCurrentNetworkInfo is an asyn method.

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

Thu, 2007-03-08 18:23
Joined: 2006-10-17
Forum posts: 85
Re: Return Network type (GSM-UMTS)
Hi pirosl,

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.
Thu, 2007-03-08 22:32
Joined: 2004-05-24
Forum posts: 982
Re: Return Network type (GSM-UMTS)
Normally should work. Do you have problems on a specific phone? Or on all tested phones?

pirosl

Fri, 2007-03-09 09:46
Joined: 2006-10-17
Forum posts: 85
Re: Return Network type (GSM-UMTS)
I tried only with 3250, anyway I'm able to get all network information returned in iNetworkInfoV1 like mobile country code, cell id, . . . only iNetworkInfoV1.iMode and iNetworkInfoV1.iAccess are Unknown
Here my simple code:
Code:
void CNetworkInfo::GetNetworkInfo()
{
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....
Fri, 2007-03-09 12:57
Joined: 2006-12-15
Forum posts: 45
Re: Return Network type (GSM-UMTS)
Hello Luca,

Did you have "Network Services" capability ?


Regards,
tushar

Tushar Bhattacharyya

Fri, 2007-03-09 15:51
Joined: 2006-10-17
Forum posts: 85
Re: Return Network type (GSM-UMTS)
Hi tusharbhatta,

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  Huh
Fri, 2007-03-09 15:54
Joined: 2004-05-24
Forum posts: 982
Re: Return Network type (GSM-UMTS)
I guess your code has to be tested on other phones also

pirosl

  • Login to reply to this topic.