Binary SMS message | developer.brewmp.com Binary SMS message | developer.brewmp.com

Developer

Binary SMS message

Forums:

Hi all,

 

I am trying send a SMS with binary data. This is the code I have:

    /** Destination **/

    /* Set the destination address type */

    pMe->SMSinfo.smo[0].nId = MSGOPT_TO_NUMBER_TYPE;

    pMe->SMSinfo.smo[0].pVal = (void *)AEESMS_NUMBER_INTERNATIONAL;

    /* Numbering plan identification */

    pMe->SMSinfo.smo[1].nId = MSGOPT_TO_NUMBER_PLAN;

    pMe->SMSinfo.smo[1].pVal = (void*)AEESMS_NUMBER_PLAN_TELEPHONY;

    /* Set the sender's Number */

    STRCPY(pMe->SMSinfo.pDestNumber,scSMSTlf);

    pMe->sSMSinfo.smo[2].nId = MSGOPT_TO_DEVICE_SZ;

    pMe->sSMSinfo.smo[2].pVal = pMe->SMSinfo.pDestNumber;

    /* Set message priority */

    pMe->SMSinfo.smo[6].nId = MSGOPT_PRIORITY;

    pMe->SMSinfo.smo[6].pVal = (void*)AEESMS_PRIORITY_NORMAL;

    /* Set MO SMS encoding */

    pMe->SMSinfo.smo[7].nId = MSGOPT_MOSMS_ENCODING;

    pMe->SMSinfo.smo[7].pVal = (void *)AEESMS_ENC_OCTET;

    pMe->SMSinfo.smo[8].nId = MSGOPT_COMPRESSED_MSG;

    pMe->SMSinfo.smo[8].pVal = (void*)FALSE;   

    /* Add payload Data */

    WEBOPT_SETVARBUFFER(smsBuffer, scSMSText, ucSMSTextLen);

    pMe->SMSinfo.smo[9].nId = MSGOPT_PAYLOAD_BINARY;

    pMe->SMSinfo.smo[9].pVal = (void*)smsBuffer;

    pMe->SMSinfo.smo[10].nId = MSGOPT_END;

    pMe->sSMSinfo.smo[10].pVal = NULL;

 

The SMS is sent correctly but when it arrives to the other mobile, the SMS arrives without data. What is the problem?

 

thanks,

u have not set the Option MSGOPT_PAYLOAD_ENCODING. Are u able to send text message with the above Opts.
 

u have not set the Option MSGOPT_PAYLOAD_ENCODING. Are u able to send text message with the above Opts.
 

I have tried with this option MSGOPT_PAYLOAD_ENCODING added (AEESMS_ENC_OCTET), but I continue with the same problem

I have tried with this option MSGOPT_PAYLOAD_ENCODING added (AEESMS_ENC_OCTET), but I continue with the same problem

Hi Bea,
 
Pls try including the following:
 
 pMe->SMSinfo.smo[4].nId = 
MSGOPT_PAYLOAD_ENCODING ;
 pMe->SMSinfo.smo[4].pVal = (void*)
AEESMS_ENC_ASCII ;
 
 
This could work.

Hi Bea,
 
Pls try including the following:
 
 pMe->SMSinfo.smo[4].nId = 
MSGOPT_PAYLOAD_ENCODING ;
 pMe->SMSinfo.smo[4].pVal = (void*)
AEESMS_ENC_ASCII ;
 
 
This could work.