×

Discussion Board

Results 1 to 6 of 6
  1. #1
    Regular Contributor
    Join Date
    Aug 2004
    Location
    Hyderabad-India
    Posts
    160

    cell id and location area code

    hi,
    I wrote a program to get Cell Id and Location Area Code in series 60(Nokia 6670 phone) and that worked successfully.

    The values I got are Cell id:1214 area code:10002 but for the same place(cell) and different application called CellSpotting got Cell Id:04be and Area Code: 2712.

    But I want cell id and location area code like the cellspotting got them....

    So,How can I convert 1214 to 04be ??
    What is the difference between the two??


    My question is What might be the function used to get the cell id in cellspotting case??

    Waiting for the replies......


    Thanks in advance.



    --
    V.V.S.Naresh
    IIIT-Hyderabad
    India
    http://students.iiit.net/~satyanaresh

  2. #2
    Registered User
    Join Date
    Apr 2005
    Posts
    1
    hi
    just couldn't imagine but it seems you just forgot to translate decimal 1214 to hexadecimal 04be...

    but how did you manage to get CI and LAC on 6670? I first tried in java but since jsr-179 isn't supported by that phone i need to try it in c++ now - but didn't figure it out yet

    could you help?

  3. #3
    Regular Contributor
    Join Date
    Aug 2004
    Location
    Hyderabad-India
    Posts
    160
    hi,
    the following is the code to get cell id and location area code.....and similarly we can get MCC(country code) and MNC(network code)...
    In the headers you need to include etel.h and in .mmp file you need to link with LIBRARY gsmbas.lib,
    LIBRARY etel.lib.

    Actually many guys can't get this because of the wrong gsmbas.lib , I also earlier got the wrong gsmbas.lib and couldn't get cell id.

    By the way,can please tell me how to translate my cell id to hexadecimal in the following code.....




    RTelServer server;
    CleanupClosePushL(server);
    User::LeaveIfError(server.Connect());
    User::LeaveIfError(server.LoadPhoneModule(_L("phonetsy.tsy")));
    RTelServer::TPhoneInfo info;
    User::LeaveIfError(server.GetPhoneInfo(0, info));
    RBasicGsmPhone phone;
    CleanupClosePushL(phone);
    User::LeaveIfError(phone.Open(server, info.iName));
    MBasicGsmPhoneNetwork::TCurrentNetworkInfo ni ;
    phone.GetCurrentNetworkInfo( ni ) ;

    /

    //Cell Id
    TInt cellId = ni.iCellId;
    //print the cell id
    _LIT(kcellidvalue,"Cell ID");
    TBuf<20> cellidrepr;
    cellidrepr.Num(cellId);
    disp.Format(KStringFormat, iIndex,&kcellidvalue,&cellidrepr);
    iItems->AppendL( disp );
    iIndex++;

    //Location Area Code
    TInt locationareacode = ni.iLocationAreaCode;
    //print the location areacode
    _LIT(klocationareacodevalue,"Area Code");
    TBuf<20> locationareacoderepr;
    locationareacoderepr.Num(locationareacode);
    disp.Format(KStringFormat, iIndex,&klocationareacodevalue,&locationareacoderepr);
    iItems->AppendL( disp );
    iIndex++;

    phone.Close();
    CleanupStack::PopAndDestroy(&phone);
    User::LeaveIfError(server.LoadPhoneModule(_L("phonetsy.tsy")));
    server.Close();
    CleanupStack::PopAndDestroy(&server);



    Thank You

    --
    V.V.S.Naresh
    IIIT-Hyderabad
    India
    http://students.iiit.net/~satyanaresh

  4. #4
    Regular Contributor
    Join Date
    Oct 2006
    Posts
    61

    Re: cell id and location area code

    hi
    i think you can make it in hexadecimal easily or if you want it directly in hex you can use stk .
    but i tried more to get cell id using c but there is errors like undefined server please if you know which the right library to include
    thanks

  5. #5
    Registered User
    Join Date
    Jan 2009
    Posts
    3

    Re: cell id and location area code

    yeah...d code doesnt work..how do i run it...i want 2 convert it in java using j2me...is it possible

  6. #6
    Super Contributor
    Join Date
    Mar 2004
    Location
    Singapore
    Posts
    9,968

    Re: cell id and location area code

    Quote Originally Posted by sagar_jhobalia View Post
    yeah...d code doesnt work..how do i run it...i want 2 convert it in java using j2me...is it possible
    might not be possible with java. try posting on java section

Posting Permissions

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