×

Discussion Board

Page 1 of 4 1234 LastLast
Results 1 to 15 of 53
  1. #1
    Super Contributor
    Join Date
    Mar 2004
    Location
    Bangalore,India
    Posts
    2,146

    Cell Broadcast Message

    has anyone been able to retrieve the Cell Broadcast Message programmatically..?i know of how to get the Cell id and the signal strength but whats bugging me is the way to get the cell broadcast and the way to get the location string without getting the network provider in the picture...any ideas?
    ciao

  2. #2
    Regular Contributor
    Join Date
    May 2004
    Location
    NRW/ Germany
    Posts
    188
    Hi mayankkedia,

    I'm also trying to get the Cell Broadcast and the location code which can be shown in the display in the upper right. There are some methods in etelmm, but I don't know which message to get and how to use them anyway.

    Arne

  3. #3
    Super Contributor
    Join Date
    Mar 2004
    Location
    Bangalore,India
    Posts
    2,146
    please update me there are inputs for the same..coz i know of classes and methods that will return the CellId someone told me that the location string can be retrieved but the functions for that are non-trivial..i dont know what does that mean and how to implement them.
    ciao

  4. #4
    Regular Contributor
    Join Date
    Mar 2004
    Location
    Novi Sad - Serbia
    Posts
    63

    Signal strength

    Hi mayankkedia,

    Can you post the source code you use to get a singal strength?

    I tried to do that by sending an AT command from HyperTerminal to Nokia phone and I got correct response but I can't receive response when I send the AT command from code.

    Thanx in advance,

    Sasa

  5. #5
    Super Contributor
    Join Date
    Mar 2004
    Location
    Bangalore,India
    Posts
    2,146
    please check this thread...as it talks at length about the cell id and the signal..but the cell broadcast is something it doesnt handle:-
    http://discussion.forum.nokia.com/fo...threadid=19693
    ciao

  6. #6
    Regular Contributor
    Join Date
    Mar 2004
    Location
    Novi Sad - Serbia
    Posts
    63
    Thank you mayankkedia for such a fast answer.

    That's what I was looking for.

  7. #7
    Super Contributor
    Join Date
    Feb 2004
    Location
    Dallas
    Posts
    605
    I hope one day someone will give the Final , Clear and crisp solution to capture the Location String which appears on the mobile phone ..

    The issue has been discussed umteen no of times but every time it clears some haze from the picture .. the picture is still not 100% clear .

  8. #8
    Super Contributor
    Join Date
    Mar 2004
    Location
    Bangalore,India
    Posts
    2,146
    i agree with what u say amit...it would have been much better had some of the Nokia Experts shown some interest in issues which are being raised again and again..
    i hope someone competent enough will answer this long lingering query..and put to end all the speculation and haze around this issue..
    ciao

  9. #9
    Registered User
    Join Date
    Oct 2006
    Location
    India
    Posts
    6

    Smile Re: Cell Broadcast Message

    Hi!

    i here found this useful page which gives a code about retrieving Broadcast MEssages using etelmm.h library in Symbian C++
    http://www.newlc.com/Mission-Impossi...tting-the.html

    The libraries could be found at
    http://zerogravity.narod.ru/symbian/uiq/etelmm.html

    But somehow i cant manage to make it work.. so please if someone can do it do post me back

    Regards
    Mohit

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

    Smile Re: Cell Broadcast Message

    Hello Mohit,

    What are you not managing to work?
    Are you getting any sort of errors?

    What's yr platform, yr phone, SDk, etc..?

    So that it would be more manageable for others to help u.

    Please explain more abt yr problem.

    Regards.
    Kiran.

  11. #11
    Registered User
    Join Date
    Oct 2006
    Location
    India
    Posts
    6

    Re: Cell Broadcast Message

    Hi!
    my phone is Nokia 6670, and i am using Platform SDK 2nd Edition

    I cannot make the code use the etelm.h libraries that i downloaded from that site..
    PLUS i wish to copile the code as a Python Extension (*.pyd) for my Project that is basically in PyS60.. Thanx in advance for kind of help in this regard .

    Regards
    Mohit

  12. #12
    Super Contributor
    Join Date
    Jul 2006
    Location
    Oulu, Finland.
    Posts
    1,174

    Re: Cell Broadcast Message

    hi mohitn and everyone,

    i cannot say anything about python but i have already posted the code to retrieve the CBM (CELL BROADCAST MESSAGE) to

    http://discussion.forum.nokia.com/fo...ad.php?t=19693

    and the code required to fetch the Area name is as follows ..
    which also shows how to fecth the network parameters (MNC,MCC,LAC,CELLID)

    #include <etelbgsm.h>
    #include <etelmm.h>

    for those who are still not able to fetch the area name ...
    *****************************************
    TInt enumphone = 1;
    //Get Locattion
    RTelServer iServer;
    RMobilePhone iPhone;
    RTelServer::TPhoneInfo iPhoneInfo;
    TRequestStatus iReqStatus;


    //GSM CBM's length is 88 bytes
    TBuf8<256> iGsmMsgdata;
    _LIT(KGsmModuleName, "phonetsy.tsy");

    //to get other info then location
    RBasicGsmPhone phone;
    MBasicGsmPhoneNetwork::TCurrentNetworkInfo NetworkInfo;

    TBuf<MBasicGsmPhoneNetwork::KLongNetworkNameSize> iLongNwName;


    iServer.Connect();

    iServer.LoadPhoneModule( KGsmModuleName );

    User::LeaveIfError(iServer.EnumeratePhones(enumphone));

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

    //Initialise the phone object
    User::LeaveIfError(iServer.GetPhoneInfo(0, iPhoneInfo));

    //to get other info
    User::LeaveIfError(phone.Open(iServer, iPhoneInfo.iName));
    CleanupClosePushL(phone);
    User::LeaveIfError(phone.GetCurrentNetworkInfo(NetworkInfo));
    CleanupStack::PopAndDestroy();
    //ends here

    // network file

    TBuf16<128> bLocStr;
    TBuf8<128> FileData;

    RMobileBroadcastMessaging iBroadcastMsg;
    User::LeaveIfError(iPhone.Open(iServer, iPhoneInfo.iName));
    iBroadcastMsg.Open(iPhone);
    RMobileBroadcastMessaging::TMobileBroadcastAttributesV1 iAttrInfo;
    TPckg<RMobileBroadcastMessaging::TMobileBroadcastAttributesV1> iDes(iAttrInfo);
    //Wait for the CBM

    iBroadcastMsg.ReceiveMessage(iReqStatus,iGsmMsgdata,iDes);

    User::WaitForRequest(iReqStatus);

    TBuf16<100> bDisplay;

    bDisplay.Copy(iGsmMsgdata);


    int i;
    char locationString[94];
    char cbuf;
    int char_cnt=0;
    unsigned int bb = 0;

    unsigned char ur,curr,prev = 0;

    for (i=6;i<iGsmMsgdata.Length();i++)
    {
    cbuf = iGsmMsgdata[i];
    unsigned char aa = (1 << (7 - bb%7)) - 1;
    ur = cbuf & aa;
    ur = (ur << (bb)) | prev;
    curr = cbuf & (0xff ^ aa);
    curr = curr >> (7 - bb);
    prev = curr;
    if(ur == 0xd)
    {
    break;
    }

    locationString[char_cnt] = ur;

    bb = ++bb % 7;

    char_cnt++;
    if(bb==0)
    {
    locationString[char_cnt++] = prev;
    prev =0;
    }
    }
    locationString[char_cnt] = '\0';
    TPtrC8 symbPtr((TText8*)locationString);
    bDisplay.Copy(symbPtr);

    //We have the location in bDisplay
    //bLocStr.Format(_L("CELL: %d\nAREA: %S\nREGION: %d\nSTATE: %d\nCOUNTRY: %d\nNETWORK: %S"),aCellId,&bDisplay,aLocation,aMnc,aMcc,&iLongNwName);
    bLocStr.Format(_L("AREA :%S,\n"),&bDisplay);
    iPhone.Close();
    iServer.UnloadPhoneModule( KGsmModuleName );
    iServer.Close();



    *****************************************

  13. #13
    Registered User
    Join Date
    Jan 2007
    Posts
    11

    Re: Cell Broadcast Message

    Can I i implement above code using ActiveObjects ?

    My main aim is to avoid using "User::WaitForRequest(iReqStatus);" .

    I tried using AObj but could not succeed.

    Help me please ........... Its urgent


    regards

  14. #14
    Regular Contributor
    Join Date
    Mar 2004
    Location
    Novi Sad - Serbia
    Posts
    63

    Re: Cell Broadcast Message

    Hi rajunagidi,

    yes, you can do that.

    Here is what you should do:
    1. Change your class to inherit from CActive.
    2. Add your class to active scheduler.
    3. Change:
    Code:
    iBroadcastMsg.ReceiveMessage(iReqStatus,iGsmMsgdata,iDes);
    to
    Code:
    iBroadcastMsg.ReceiveMessage(iStatus,iGsmMsgdata,iDes);
    4. Replace "User::WaitForRequest(iReqStatus);" with "SetActive();" call
    5. In RunL() method check if iStatus is not an error and if it indicates an error then do nothing (notify user about error).
    6. Move all the code below "User::WaitForRequest(iStatus);" line to RunL() method (to part where you checked the value of iStatus member.

    You should read more about active objects but if you find some problems with my suggestion just post the error you get.

    Regards,
    Sasa

  15. #15
    Registered User
    Join Date
    Jan 2007
    Posts
    11

    Re: Cell Broadcast Message

    sasa

    Thanks for u r prompt reply .
    i will work on it .

Page 1 of 4 1234 LastLast

Posting Permissions

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