×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    Aug 2006
    Posts
    41

    Problem in Getting Location.....

    hi

    i am using the code below to getting current location but i received error code "-33" in Integerated GPS and "-2" in Network based.


    //Second
    const TInt KSecond = 1000000;
    //Update interval
    const TInt KUpdateInterval = KSecond;
    //Update time out
    const TInt KUpdateTimeOut = 100*KSecond;
    //MaxAge
    const TInt KMaxAge = 500000;
    //The name of the requestor
    _LIT(KRequestor,"First GPS Application");


    void CActiveLocation::ConstructL()
    {
    CActiveScheduler::Add(this);

    // Connect to the position server
    TInt error = iPositionServer.Connect( );


    TPositionModuleId zModuleId;
    error = iPositionServer.GetDefaultModuleId(zModuleId);
    TPositionModuleInfo zModuleInfo;
    error = iPositionServer.GetModuleInfoById(zModuleId,zModuleInfo);
    TBuf<256> zModuleName;
    zModuleInfo.GetModuleName(zModuleName);
    CLogger::LogDebug(_L("LocationDebugLog.txt"),_L("Module Name"));
    CLogger::LogDebug(_L("LocationDebugLog.txt"),zModuleName);

    // Open subsession to the position server
    error = iPositioner.Open(iPositionServer);

    TBuf<256> zRequester;
    // Set position requestor
    error = iPositioner.SetRequestor( CRequestor::ERequestorService ,
    CRequestor::EFormatApplication , KRequestor );

    // Set update interval to one second to receive one position data per second
    TPositionUpdateOptions upOpt;
    upOpt.SetUpdateInterval(TTimeIntervalMicroSeconds(KUpdateInterval));
    upOpt.SetUpdateTimeOut(TTimeIntervalMicroSeconds(KUpdateTimeOut));
    upOpt.SetMaxUpdateAge(TTimeIntervalMicroSeconds(KMaxAge));

    // Enables location framework to send partial position data
    upOpt.SetAcceptPartialUpdates(/*ETrue*/EFalse);

    // Set update options
    error = iPositioner.SetUpdateOptions( upOpt );

    iPositioner.NotifyPositionUpdate(iPositionInfo,iStatus);

    SetActive();
    }

    device i am using is N95.

    Thanks in advance

  2. #2
    Regular Contributor
    Join Date
    May 2007
    Posts
    52

    Re: Problem in Getting Location.....

    Hi,

    I also faced with problem getting error code -2 (KErrGeneral) when trying to receive Position Info from Network based module. I have used code based on LBSPositionRequestor from LocationRefAppForS60 example of S60 3rd MR SDK.
    Device under testing - E51.

    Note:
    1) I checked what modules are present on device: Bluetooth GPS and Network based.
    2) I think mobile operator supports Network based positioning, because other application which is installed on my phone successfully detects my position.
    3) This code successfully works on emulator.

    Please help to detect why Network based positioning doesn't work.

    Thanks
    *strutv

  3. #3
    Regular Contributor
    Join Date
    May 2007
    Posts
    52

    Re: Problem in Getting Location.....

    Guys,

    Can anybody help me with this issue. Still I can't resolve it.
    If you need additional info please request me.

    Thanks a lot
    *strutv

Similar Threads

  1. Problem with eglSwapBuffers and heap corruption
    By greatape in forum Symbian Media (Closed)
    Replies: 2
    Last Post: 2007-05-24, 03:35
  2. netcards - Problem with opening adapter
    By kernj in forum Symbian Tools & SDKs
    Replies: 5
    Last Post: 2007-01-10, 08:56
  3. did Nokia series was supports the Location API
    By lakshmanraob in forum Mobile Java General
    Replies: 5
    Last Post: 2005-11-16, 04:37
  4. Problem: S60 SDK for CW in PC with .NET
    By anttij in forum Carbide.c++ IDE and plug-ins (Closed)
    Replies: 1
    Last Post: 2005-02-28, 11:36
  5. 7210 Silent Problem
    By MarkMckim in forum Mobile Java General
    Replies: 1
    Last Post: 2003-03-18, 12:36

Posting Permissions

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