How about cell broadcast in magneto?

I can't find any infomation about cell broadcast in WM50. Does anyone know where can i find it


Answer this question

How about cell broadcast in magneto?

  • Carlos Gonzalez

    Hi,

    I tried your example code on WM5 device (i-Mate JasJar) but method SmsSetBroadcastMsgRanges return 0x82000207 and I'can't find any on this code.

    Do you have any suggestions


  • Phylum

    Hello shian,

    Cell Broadcast messages are accessed with the same functions that are used for SMS text messages.  Here is a link to a list of the SMS functions in Windows Mobile 5.0:
    http://msdn.microsoft.com/library/default.asp url=/library/en-us/mobilesdk5/html/mob5conShortMessageServiceSMSAPI.asp

    Kind Regards,
    Jason Frazier
    Software Design Engineer/Test, Windows Mobile Developer Experience

  • storras

    You'll find in sms.h that the lowest two bytes (0x0207) stand for SMS_E_MOBILEUNSUPPORTED.

    I have the same on my Palm Treo 750, but I know to receive SMS or CellBroadcast is true. As suggested on http://teksoftco.com/forum/viewtopic.php p=784, we might need to call sth like RIL_SmsSetBroadcastMsgRanges afterwards.

    Let's see..


  • Divac

     Jason Frazier -MSFT- wrote:
    Hello shian,

    Cell Broadcast messages are accessed with the same functions that are used for SMS text messages.  Here is a link to a list of the SMS functions in Windows Mobile 5.0:
    http://msdn.microsoft.com/library/default.asp url=/library/en-us/mobilesdk5/html/mob5conShortMessageServiceSMSAPI.asp

    Kind Regards,
    Jason Frazier
    Software Design Engineer/Test, Windows Mobile Developer Experience


    Thanks Jason. This really help me a lot.
    But now I has a problem in SmsSetBroadcastMsgRanges(). I has no idea how to set up smsrBroadcastRanges in SMS_BROADCAST_RANGES. Could you give me a sample code

    Thanks again.

  • Jackuline

    I had solve this problem. SMS_BROADCAST_RANGES.cbSize should be added with the size of SMS_RANGE array. This is my sample code:



    int accitems = 10;

    LPVOID p = VirtualAlloc(NULL, sizeof(SMS_BROADCAST_RANGES)+sizeof(SMS_RANGE)*accitems, MEM_COMMIT, PAGE_READWRITE);
    ASSERT(p);

    SMS_BROADCAST_RANGES *data = (SMS_BROADCAST_RANGES *)p;
    memset(data, 0, sizeof(SMS_BROADCAST_RANGES)+sizeof(SMS_RANGE)*accitems );

    /*** fill data to data->smsrBroadcastRanges[] ***/
    data->smsrBroadcastRanges[0]..dwMinimum = 1;
    data->smsrBroadcastRanges[0]..dwMaximum= 1;
    /*** fill data to data->smsrBroadcastRanges[] ***/

    data->cbSize = sizeof(SMS_BROADCAST_RANGES)+sizeof(SMS_RANGE)*accitems;
    data->dwParams = SMS_PARAM_SBR_ACCEPTIDS|SMS_PARAM_SBR_BROADCASTMSGLANGS|SMS_PARAM_SBR_BROADCASTMSGIDS;
    data->bAccept = TRUE;
    data->dwBroadcastMsgLangs = SMS_DCSLANG_ENGLISH;
    data->dwNumRanges = accitems;
        
    hr = SmsSetBroadcastMsgRanges(data);
    VirtualFree(p, 0, MEM_RELEASE);

     


    I use VirtualAlloc() to allocate enough space and keep SMS_RANGE  array always behind the SMS_BROADCAST_RANGES . I don't know if this is a good way or not.

    Now I am moving on Cell broadcast index. Does anyone have idea about CBS index



  • How about cell broadcast in magneto?