×

Discussion Board

Page 4 of 5 FirstFirst 12345 LastLast
Results 46 to 60 of 73
  1. #46
    Registered User
    Join Date
    Oct 2007
    Posts
    4

    Re: how to retrieve cellid from a mobile phone

    Hi Aloke I am also getting the same error when I am trying to compile the code. I am using Visual Studio 2005 with Carbide beta plug-in and Symbian SDK 8.1 and 9.1 both. This code is from newlc forum. B ut did you get any reply or working code. If so, can u please tell me how to create the project from scratch, because I am also stuck in my Final Year Project for over a week here. (Got atleast 10 diff non-working codes with me)
    I mean whether it is a Server-Client app or Console based app or Hello World App, then which header files and .cpp files do I need and where exactly do I need to copy-paste or put them...

    Could you please supply me with these details.
    Thanx in advance

    Quote Originally Posted by aloke View Post
    hi,
    i am final year student doing my project on Location Based System .
    basically we retrieve the cell id and put it onto a map.
    we have got some sample codes with us but when we compile it we encounter with lots of compilation errors.

    There are 2 files
    1. cellid.cpp
    2. System Manager.

    CELLID.CPP

    // System includes
    #include <badesca.h>
    #include <e32std.h>
    #include <eikenv.h>
    #include <eikappui.h>
    #include <eikapp.h>
    #include <etelbgsm.h>

    //User includes
    #include "SystemManager.h"

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

    return self;
    }

    CSystemManager::CSystemManager() : CActive(EPriorityHigh), // HIGH priority
    iPhoneInfoType(EHandsetIMEI),
    iState(EStart),
    iTelephony(NULL),
    iIMEI(0),
    iIMSI(0),
    iCellId(0),
    iLocationAreaCode(0)
    {

    }

    void CSystemManager::ConstructL()
    {
    iTelephony = CTelephony::NewL();
    CActiveScheduler::Add(this); // Add to scheduler
    }

    CSystemManager::~CSystemManager()
    {
    Cancel(); // Cancel any request, if outstanding
    // Delete instance variables if any
    delete iTelephony;
    }

    void CSystemManagerCancel()
    {
    switch(iPhoneInfoType)
    {
    case EHandsetIMEI:
    iTelephony->CancelAsync(CTelephony::EGetPhoneIdCancel);
    break;
    case EHandsetIMSI:
    iTelephony->CancelAsync(CTelephony::EGetSubscriberIdCancel);
    break;
    default:
    iTelephony->CancelAsync(CTelephony::EGetCurrentNetworkInfoCancel);
    break;
    }
    }

    void CSystemManager::StartL()
    {
    Cancel(); // Cancel any request, just to be sure
    iState = EGetPhoneInfo;
    switch(iPhoneInfoType)
    {
    case EHandsetIMEI:
    {
    CTelephony::TPhoneIdV1Pckg phoneIdPckg( iPhoneId );
    iTelephony->GetPhoneId(iStatus, phoneIdPckg);
    }
    break;
    case EHandsetIMSI:
    {
    CTelephony::TSubscriberIdV1Pckg subscriberIdPckg( iSubscriberId );
    iTelephony->GetSubscriberId(iStatus, subscriberIdPckg);
    }
    break;
    case EHandsetNetworkInfo:
    {
    CTelephony::TNetworkInfoV1Pckg networkInfoPckg( iNetworkInfo );
    iTelephony->GetCurrentNetworkInfo(iStatus, networkInfoPckg);
    }
    break;
    }

    SetActive(); // Tell scheduler a request is active
    iActiveSchedulerWait.Start();
    }

    void CSystemManager::RunL()
    {
    iState = EDone;
    if ( iActiveSchedulerWait.IsStarted() )
    {
    iActiveSchedulerWait.AsyncStop();
    if(iStatus == KErrNone)
    {
    switch(iPhoneInfoType)
    {
    case EHandsetIMEI:
    iIMEI.Append(iPhoneId.iSerialNumber );
    break;
    case EHandsetIMSI:
    iIMSI.Append(iSubscriberId.iSubscriberId );
    break;
    case EHandsetNetworkInfo:
    iCellId = iNetworkInfo.iCellId;
    iLocationAreaCode = iNetworkInfo.iLocationAreaCode;
    break;
    }
    }
    else
    {
    // ***********Handle Error here ************
    }
    }
    }

    const TPtrC CSystemManager::GetIMEI()
    {
    iPhoneInfoType = EHandsetIMEI;
    iIMEI.Zero();

    StartL();
    TPtrC ptr(iIMEI.Ptr());
    return ptr;
    }

    const TPtrC CSystemManager::GetIMSI()
    {
    iPhoneInfoType = EHandsetIMSI;
    iIMSI.Zero();

    StartL();
    TPtrC ptr(iIMSI.Ptr());
    return ptr;
    }

    void CSystemManager::GetNetworkInfoL(TUint& aLocationCode, TUint& aCellId)
    {
    iPhoneInfoType = EHandsetNetworkInfo;
    StartL();
    aCellId = iCellId;
    aLocationCode = iLocationAreaCode;

    return;

    }



    SYSTEM MANAGER

    #ifndef __SYSTEM_MANAGER_H__
    #define __SYSTEM_MANAGER_H__

    #include <Etel3rdParty.h>

    class CystemManager : public CActive
    {
    public:
    typedef enum {EHandsetIMEI, EHandsetIMSI, EHandsetNetworkInfo } InfoType;

    public:
    static CystemManager* NewL();

    // Destructor
    ~CSystemManager();

    public:
    // New functions
    void StartL(); // Request

    const TPtrC GetIMEI();
    const TPtrC GetIMSI();
    void GetNetworkInfoL(TUint& aLocation, TUint& aCellId);

    private:
    // C++ constructor
    CSystemManager();
    // Second-phase constructor
    void ConstructL();



    // From CActive
    void RunL();

    // Cancel
    void DoCancel();

    private:
    enum TGetInfoState
    {
    EStart = 1,
    EGetPhoneInfo,
    EDone
    };

    private:
    InfoType iPhoneInfoType;
    TInt iState; // State of the active object
    CTelephony* iTelephony;

    CTelephony::TPhoneIdV1 iPhoneId;
    CTelephony::TSubscriberIdV1 iSubscriberId;
    CTelephony::TNetworkInfoV1 iNetworkInfo;

    CActiveSchedulerWait iActiveSchedulerWait;
    TBuf<CTelephony::KPhoneSerialNumberSize>iIMEI;
    TBuf<CTelephony::KIMSISize> iIMSI;
    TUint iCellId;
    TUint iLocationAreaCode;
    };
    #endif // __SYSTEM_MANAGER_H__


    The required header files in this are etelbsm.h which we alredy have ...

    thank you
    Reply With Quote

  2. #47
    Registered User
    Join Date
    Oct 2007
    Posts
    4

    Re: how to retrieve cellid from a mobile phone

    Hi I am Tapas , and I want to retrieve the exact location of the phone using Mobinfo API. Tried some example codes -not working for me. I am using Symbian SDK 8.1 & 9.1 on Visual Studio 2005 with Carbide plug-in. The thing is when I run the sample Mobinfo v1.01 .sis file available on the Nokia Developer site, I am able to run it on my phone(N70), and I want exactly the same working.
    But I dont have any working code which can help me here.
    So could you please help me i this regard ? I mean I am unable to compile any code without errors. Should I make the project as a Server-Client app or Console based app or Hello World App, then which header files and .cpp files do I need and where exactly do I need to copy-paste or put them...What (if any) changes do i need to implement in the .mmp or .pkg file,et al.

    U were referring to some Helloworldbasic.zip example here. Could you please send it to me. My mail id is:
    beattheheat@gmail.com
    TAHNX ahead in eager anticipation of ur reply...

  3. #48
    Registered User
    Join Date
    Oct 2007
    Posts
    4

    Re: how to retrieve cellid from a mobile phone

    HI this is Tapas.I am also working on Location-Based Services field,a and wanna retrieve Cell-ID, Could you please send me the full code of Mobinfo API which can do this. I am using Visual Studio 2005 with Carbide plug-in and Symbian SDK v 8.1 & 9.1.
    I have also read the Mission-impossible thread u have mentioned in ur quote, but its code doesn't help either.
    Could u please help me in this regard, as I get a lot of errors-both compilation & linking errors when I try to compile any of the sample codes given anywhere.Do tell me which type of projetc should I make(Console, Server-Client or exe or dll), which files and in which format do I need to copy -paste or write them, where to copy them, any changes in the .pkg and/or .mmp file, etc...I would be very thankful to in this regard.
    Thanx in advance.
    My email id is:
    beattheheat@gmail.com

  4. #49
    Registered User
    Join Date
    Oct 2007
    Posts
    4

    Re: how to retrieve cellid from a mobile phone

    HI this is Tapas.I am also working on Location-Based Services field,a and wanna retrieve Cell-ID, Could you please send me the full code of Mobinfo API which can do this. I am using Visual Studio 2005 with Carbide plug-in and Symbian SDK v 8.1 & 9.1.
    I have also read the Mission-impossible thread u have mentioned in ur quote, but its code doesn't help either.
    Could u please help me in this regard, as I get a lot of errors-both compilation & linking errors when I try to compile any of the sample codes given anywhere.Do tell me which type of projetc should I make(Console, Server-Client or exe or dll), which files and in which format do I need to copy -paste or write them, where to copy them, any changes in the .pkg and/or .mmp file, etc...I would be very thankful to in this regard.
    Thanx in advance.
    My email id is:
    beattheheat@gmail.com

  5. #50
    Registered User
    Join Date
    Feb 2008
    Posts
    5

    Re: how to retrieve cellid from a mobile phone

    hi i realise this is a bit late relative to the last posting but i hope someone can help me. I tried both mobinfoapp_s60 and the helloworldbasic app on a nokia 6680 and the screen flashes and then nothing happens. I used carbide c++ 2.1 and s60 2nd ed fp2 to compile. Pls help...

  6. #51
    Nokia Developer Moderator
    Join Date
    Sep 2004
    Location
    Tampere, Finland
    Posts
    11,359

    Re: how to retrieve cellid from a mobile phone

    Have you been able to compile and run on device any of SDK's example applications?
    -- Lucian

    If you are not yet a DVLUP member it is time to correct that mistake :) Click here to join: http://www.dvlup.com/lucian/Invite

  7. #52
    Registered User
    Join Date
    Feb 2008
    Posts
    5

    Re: how to retrieve cellid from a mobile phone

    Yes, I managed to compile and run on the 6680 the shoppinglist application in s60_2nd_FP2_CW/series60ex/

    The helloworldbasic can compile without error, but the screen just flashes when I run it on device. The mobinfoapp_s60 app does the same thing.

  8. #53
    Registered User
    Join Date
    Feb 2008
    Posts
    5

    Re: how to retrieve cellid from a mobile phone

    Ok, I managed to get both to work by installing the mobinfo_Nokia app on the phone.

  9. #54
    Registered User
    Join Date
    Feb 2008
    Posts
    5

    Re: how to retrieve cellid from a mobile phone

    I can view the mobinfo.txt file from helloworldbasic. How hard would it be to view the info on screen while also printing it out to the txt file? Is there any sample code for this? I have no experience with either symbian or c++. Any help would be appreciated.

  10. #55
    Nokia Developer Champion
    Join Date
    Mar 2006
    Location
    Helsinki, Finland
    Posts
    8,345

    Smile Re: how to retrieve cellid from a mobile phone

    Quote Originally Posted by strangehowthingsturnout View Post
    I can view the mobinfo.txt file from helloworldbasic. How hard would it be to view the info on screen while also printing it out to the txt file? Is there any sample code for this? I have no experience with either symbian or c++. Any help would be appreciated.
    Not really hard. For example you can use Label control to show the info on screen and simultaneously you can write it in the file.

    For file operations, search for RFile API in the SDK help. You would also find enough good examples on Wiki.

    All the best.
    Kiran.
    Nokia Developer Wiki Moderation team

  11. #56
    Registered User
    Join Date
    Feb 2008
    Posts
    5

    Re: how to retrieve cellid from a mobile phone

    One thing I forgot to mention, using mobinfo, I get "own number error: -5" when I try to get own number. How do I fix this to return my mobile number?

    regards,
    sg

  12. #57
    Regular Contributor
    Join Date
    Jul 2008
    Posts
    97

    Re: how to retrieve cellid from a mobile phone

    Quote Originally Posted by kiran10182 View Post
    Not really hard. For example you can use Label control to show the info on screen and simultaneously you can write it in the file.

    For file operations, search for RFile API in the SDK help. You would also find enough good examples on Wiki.

    All the best.
    Kiran.
    Hi Kiran,
    its me again. sorry to disturb u. now plz find my current problems m facing..

    I used the helloworldbasic.zip file posted by some one which uses the Mobinfo library to get Cell id n other network related info. I hav the s60 2 fp2 sdk for nokia 6630 with carbide.c++v1.2 IDE. i imported the source in helloworldbasic app to my workspace and build with THUMB for device which created the sis file. but when I click on the app icon of helloworldbasic on phone, no info is shown n the screen just flshes n recovers in seconds. i dont know what is the problm exactly...why the app is not showing anything on the phone...

    plz tell me how to attach some zip file so that i ll share the zip with you which i m using to build app.

    regards,
    sanjay

  13. #58
    Regular Contributor
    Join Date
    Jul 2008
    Posts
    97

    Question Re: how to retrieve cellid from a mobile phone

    Quote Originally Posted by strangehowthingsturnout View Post
    hi i realise this is a bit late relative to the last posting but i hope someone can help me. I tried both mobinfoapp_s60 and the helloworldbasic app on a nokia 6680 and the screen flashes and then nothing happens. I used carbide c++ 2.1 and s60 2nd ed fp2 to compile. Pls help...
    Hi,
    plz send me reply whn r u logged in. I am trying the same thing like u. I m using the mobinfo library/dll to get cell id n other network information forr 2nd edition fp2 phone (nokia 6630). I got some code as a zip helloworldbasic.zip which uses the mobinfo.h/mobinfotypes.h to get cell id for 2nd edition phones. i just imported the bld.inf file and built the sis file with THUMB build. then i transfered the sis file to phone and installed it. but whn i click on the helloworldbasic app icon on the phone, the screen just flashes n dosnot show any infomation. i also add the lib n dll of mobinfo in the sdk's folders. still the app does not run successfully on the phone..i cant find out what is the prblm exactly..

    remeber i m using mbinfo for 2nd edition phones n using carbide.c++ v1.2 as my IDE. what is the probable reason for this failure on phone..if u hav already found out the solution plz guide me..

    also the emulator build gives errors for the same helloworldbasic app but it builds success for THUMB build and ARMI build. m using S60 2nd edition fp2 sdk..

    plz tell em why should we use Active class while using the mobinfo apis? if i directly create an object of CMobileNetworkInfo class and call the GetCellId() method, can i fetch the cell id correctly? whats the prblm in doing that...in forum i found that to use mobinfo u should be familiar with Active objects.

    plz reply me inline n tell me how to attach the helloworldbasic.zip so that u can view the source which i m using...

    plz be patient and reply me. i hav wasted some days on this app development...

    thanks and regards,
    sanjay

  14. #59
    Registered User
    Join Date
    Aug 2008
    Posts
    4

    how to retrieve latlongs from a mobile phone

    How to find latlongs with using GSM and Without using GPS?

  15. #60
    Registered User
    Join Date
    Aug 2008
    Posts
    4

    Question Re: how to retrieve latlongs from a mobile phone

    Quote Originally Posted by asmi_surya View Post
    How to find latlongs with using GSM and Without using GPS?
    also tell how to find cellid?
    How to find latlongs with using GSM and Without using GPS?
    also tell how to find cellid?

Similar Threads

  1. Connecting PC to Mobile Phone Via Bluetooth
    By Sapinou in forum Bluetooth Technology
    Replies: 3
    Last Post: 2011-04-13, 08:19
  2. Nokia Image Converter
    By davidpurdie in forum General Development Questions
    Replies: 0
    Last Post: 2004-02-18, 15:31

Posting Permissions

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