Network info from 9500 (Series 80)

Login to reply to this topic.
Fri, 2005-08-12 09:50
Joined: 2005-02-11
Forum posts: 214
Has anyone solved how to get Network operator's name out from Series 80?

CTelephony::GetCurrentNetworkInfo() totaly freezes my phone (although I can get IMSI value with CTelephony).
RBasicGsmPhone that I use for Series 60 doesn't work in Series 80  Sad


"I only know that I know nothing." (Socrates)


Tue, 2006-01-24 12:51
Joined: 2005-10-10
Forum posts: 37
Re: Network info from 9500 (Series 80)
Hi Rhio,

I'm also working on the same program... I need to retrieve the IMSI number... U said that u've done it using the CTelephony API.

Can u please post a code snippet to tell me how u did this???

This would be a lot of help to us!!!

Thanks...

Ashwin...

The Cruise is on...

Thu, 2006-01-26 08:37
Joined: 2005-02-11
Forum posts: 214
Re: Network info from 9500 (Series 80)
Code:
//header


class CIMSI : public CActive
{
public:
CIMSI();

// Construction
void ConstructL();

// Destruction
~CIMSI();

static CIMSI* NewL();

// Issue request: retrieve IMSI
void GetIMSI(TRequestStatus &aStatus); // MOD: now passes a request object

// Cancel request
void DoCancel();

// Service completed request
void RunL();

// MOD: IsRetrieved() is no longer needed
//TBool IsRetrieved() { return iRetrieved;}

private:
CTelephony* iTelephony; // telephony object we own

CTelephony::TSubscriberIdV1 iV1;
CTelephony::TSubscriberIdV1Pckg * iPkg;

//MOD: Removed iRetrieved member, added pointer to request status object
//TBool iRetrieved;
TRequestStatus *iIMSIStatus;

public:
TBuf<30> retrievedIMSI;
};

//code
CIMSI::CIMSI() : CActive(EPriorityStandard)
{
// iRetrieved = EFalse; // MOD: No longer needed
}

CIMSI* CIMSI::NewL()
{
CIMSI* self =new(ELeave) CIMSI();
CleanupStack::PushL(self);
self->ConstructL();
CleanupStack::Pop(self);
return self;
}

void CIMSI::ConstructL()
{
iPkg = new (ELeave) CTelephony::TSubscriberIdV1Pckg(iV1);
iTelephony = CTelephony::NewL();
CActiveScheduler::Add(this);
}

CIMSI::~CIMSI()
{
Cancel(); // if any request outstanding, calls DoCancel() to cleanup
delete iTelephony;
delete iPkg;
}

void CIMSI::GetIMSI(TRequestStatus& aStatus)
{
aStatus=KRequestPending; // MOD: Set status to pending
iIMSIStatus = &aStatus; // MOD: Save pointer to requeststatus object
iTelephony->GetSubscriberId(iStatus, *iPkg );
//iTelephony->GetPhoneId( iStatus, *iPkg );
SetActive();
CActiveScheduler::Start();
}

void CIMSI::RunL()
{
if ( (iStatus == KErrNone) )
{
retrievedIMSI = (*iPkg)().iSubscriberId; // Read IMSI from package buffer
}
CActiveScheduler::Stop();

User::RequestComplete(iIMSIStatus,iStatus.Int());
}

void CIMSI::DoCancel()
{
Cancel();
}


//implement
CIMSI* IMSI = CIMSI::NewL();
TRequestStatus status;
IMSI->GetIMSI(status);
User::WaitForRequest(status);
if (status==KErrNone)
             aIMSI.Copy(IMSI->retrievedIMSI);
delete IMSI;




"I only know that I know nothing." (Socrates)

Mon, 2007-02-19 10:25
Joined: 2004-09-15
Forum posts: 25
Re: Network info from 9500 (Series 80)
hi riho,

how did u solve it?
any clue..

regards,
-Rx-lee
Mon, 2007-02-19 10:31
Joined: 2005-02-11
Forum posts: 214
Re: Network info from 9500 (Series 80)
Browsed the internet and Symbian forums

"I only know that I know nothing." (Socrates)

Wed, 2007-02-21 04:36
Joined: 2004-09-15
Forum posts: 25
Re: Network info from 9500 (Series 80)
have u solved it?
i use CTelephony
- GetCurrentNetworkName --> return blank
- GetOperatorName --> return blank
- GetCurrentNetworkInfo --> my phone freeze

can u post me snippet of ur codes?
Thanks,
Rx-lee
Wed, 2007-02-21 09:05
Joined: 2005-02-11
Forum posts: 214
Re: Network info from 9500 (Series 80)
Don't you know how to scroll pages? There is code sample above

"I only know that I know nothing." (Socrates)

Thu, 2007-02-22 05:38
Joined: 2004-09-15
Forum posts: 25
Re: Network info from 9500 (Series 80)
hey, i know how to scroll. and i read that u are questioning about getting network operator name which is the same question as mine. and... your codes is about IMSI rite?

what i ask is have you solved to get network operator's name (coz i still get my phone freeze)? and if you have, how? can u post some snippet of ur codes?
  • Login to reply to this topic.