×

Discussion Board

Results 1 to 7 of 7
  1. #1
    Registered User
    Join Date
    Oct 2004
    Posts
    5

    how to retrieve Batterry & Signal Strength in SDK Series60 ( 6.1 )

    how to retrieve Batterry & Signal Strength in SDK Series60 ( 6.1 )
    i search for long time but i find it use etelmm.lib and etelmm.h and i use it from UIQ Version 2.0 but when i only declare RMobilePhone instance, then compile and run when i run my APP it show "System error" immediatly , can anyone give me advice ? ?

    thank in advance

  2. #2
    Regular Contributor
    Join Date
    May 2004
    Location
    NRW/ Germany
    Posts
    188
    I don't really know what you want to do.
    If you try to read out Sig and Battery on a 6.1 device search the forum for etelbgsm and signal strength, you'll find plenty of information.

    Arne

  3. #3
    Registered User
    Join Date
    Oct 2004
    Posts
    5
    I have use etelbgsm to retrieve battery strength it work fine,
    but when i retrieve Signal strength by

    RBasicGsmPhone::SignalStrengthNotification(TRequestStatus&,TInt32);
    it take so much time to retrieve and sometime it's half my program

    can anyone tell me how to solve my problem ? thank so much

  4. #4
    Super Contributor
    Join Date
    Mar 2003
    Posts
    580

    Re: how to retrieve Batterry & Signal Strength in SDK Series60 ( 6.1 )

    Quote Originally Posted by pro9rammer
    I have use etelbgsm to retrieve battery strength it work fine,
    but when i retrieve Signal strength by

    RBasicGsmPhone::SignalStrengthNotification(TRequestStatus&,TInt32);
    it take so much time to retrieve and sometime it's half my program

    can anyone tell me how to solve my problem ? thank so much
    I know this is an old topic, but could Pro9rammer or anybody other show here the code to retrieve the battery strength?

  5. #5
    Registered User
    Join Date
    Mar 2008
    Posts
    2

    Re: how to retrieve Batterry & Signal Strength in SDK Series60 ( 6.1 )

    Hi,
    I'm a beginner here and have started working on 7650 on getting signal strength for a month now. but no luck as well. I get zero values and I don't know what the problem of my code is.

    If some expert would post some advice or sample code, I would be grateful.

    Here's the code I have been using, it's copied from somewhere in the forum, with some alterations:

    void CMyAppAppUi::GetSignalStrengthL(TInt& aStr)
    {
    TInt enumphone = 1;
    RTelServer server;
    RBasicGsmPhone phone;
    RTelServer::TPhoneInfo info;
    TRequestStatus status;
    TInt32 sigstrength;

    _LIT(KTsyName, "phonetsy.tsy");

    User::LeaveIfError(server.Connect());
    CleanupClosePushL(server);

    User::LeaveIfError(server.LoadPhoneModule(KTsyName));
    User::LeaveIfError(server.EnumeratePhones(enumphone));

    if (enumphone < 1)
    {
    User::Leave(KErrNotFound);
    }

    User::LeaveIfError(server.GetPhoneInfo(0, info));

    User::LeaveIfError(phone.Open(server, info.iName));
    CleanupClosePushL(phone);

    phone.GetSignalStrength(status, sigstrength);
    User::WaitForRequest(status);

    if (status == KErrNone)
    {
    aStr = (TInt)sigstrength;
    }

    CleanupStack::PopAndDestroy(2);//server,phone
    }

    p.s. to those who still need battery strength data, GetBatteryInfo() seems to be working.

  6. #6
    Super Contributor
    Join Date
    Jan 2008
    Location
    Bangalore, India
    Posts
    777

    Re: how to retrieve Batterry & Signal Strength in SDK Series60 ( 6.1 )

    Quote Originally Posted by ajas View Post
    Hi,
    I'm a beginner here and have started working on 7650 on getting signal strength for a month now. but no luck as well. I get zero values and I don't know what the problem of my code is.

    If some expert would post some advice or sample code, I would be grateful.

    Here's the code I have been using, it's copied from somewhere in the forum, with some alterations:

    void CMyAppAppUi::GetSignalStrengthL(TInt& aStr)
    {
    TInt enumphone = 1;
    RTelServer server;
    RBasicGsmPhone phone;
    RTelServer::TPhoneInfo info;
    TRequestStatus status;
    TInt32 sigstrength;

    _LIT(KTsyName, "phonetsy.tsy");

    User::LeaveIfError(server.Connect());
    CleanupClosePushL(server);

    User::LeaveIfError(server.LoadPhoneModule(KTsyName));
    User::LeaveIfError(server.EnumeratePhones(enumphone));

    if (enumphone < 1)
    {
    User::Leave(KErrNotFound);
    }

    User::LeaveIfError(server.GetPhoneInfo(0, info));

    User::LeaveIfError(phone.Open(server, info.iName));
    CleanupClosePushL(phone);

    phone.GetSignalStrength(status, sigstrength);
    User::WaitForRequest(status);

    if (status == KErrNone)
    {
    aStr = (TInt)sigstrength;
    }

    CleanupStack::PopAndDestroy(2);//server,phone
    }

    p.s. to those who still need battery strength data, GetBatteryInfo() seems to be working.
    have u done it with active scheduler or not,if not try it
    Regards
    $-Nitesh-$

  7. #7
    Registered User
    Join Date
    Mar 2008
    Posts
    2

    Re: how to retrieve Batterry & Signal Strength in SDK Series60 ( 6.1 )

    Hi Nitesh,
    Thanks for the suggestion. Although, I'll have to research on the Implementation of Active Objects first ;). Any reasons though why User::WaitForRequest() is not doing the trick?
    br
    AJ

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×