Forums | developer.brewmp.com Forums | developer.brewmp.com

Developer

Forums

Forums:

I've run into an issue while trying to send a text message to an email account. The attempt is failing with an error code 15, AEESMS_ERROR_NO_ACK. Here's some code snippets:

if (ISHELL_CreateInstance(applet->m_pIShell, AEECLSID_SMS, (void**)&Sms) != SUCCESS)
{
return;

ISMSMsg *smsMsg = NULL;
AEEApplet *applet = this->Device->GetApplet();
if (ISHELL_CreateInstance(applet->m_pIShell, AEECLSID_SMSMSG, (void**)&smsMsg) != SUCCESS)
{
this->Device->DebugWrite("Unable to create SMS message.\r\n");
return 0;

int destination = (strchr(address, '@')? MSGOPT_TO_EMAIL_SZ : MSGOPT_TO_DEVICE_SZ);

SMSMsgOpt options[] =
{
{MSGOPT_COPYOPTS, (void*)TRUE},
{MSGOPT_MSGTYPE, (void *)AEESMS_TYPE_TEXT},
{destination, (void*)address},
{MSGOPT_PRIORITY, (void*)AEESMS_PRIORITY_NORMAL},
{MSGOPT_MOSMS_ENCODING, (void *)AEESMS_ENC_ASCII},
{MSGOPT_PAYLOAD_ENCODING, (void*)AEE_ENC_ISOLATIN1},
{MSGOPT_PAYLOAD_SZ, (void*)data->Data},
{MSGOPT_END, NULL}
;

if (ISMSMSG_AddOpt(smsMsg, options) != SUCCESS)
{
this->Device->DebugWrite("Unable to add SMS options.\r\n");
return 0;

SmsCallbackArgs *args = new SmsCallbackArgs(this, smsMsg, SmsCallbackArgs::Send, data);
ISMS_SendMsg(Sms, smsMsg, &args->CallbackLink, &args->SendResult);

void SmsInterface::SmsHandler(void *userData)
{
SmsCallbackArgs *args = (SmsCallbackArgs *)userData;
args->Sms->GetDevice()->DebugWrite("SmsInterface::SmsHandler\r\n");
int error = AEESMS_GETERROR(args->SendResult);
if (error != AEESMS_ERROR_NONE)
{
char buffer[100];
sprintf(buffer, "SMS Error %i\r\n", error);
args->Sms->GetDevice()->DebugWrite(buffer);
}
(*args->Sms->CallbackHandler)(args);
delete args;

This code executes without an error under the simulator, but on my test phone (Brew 3.14.X), an error code of 15 is always returned after a short time out. Has anyone encountered this issue or know how to resolve it? Any help is greatly appreciated.

Thanks much,
W James

It means that your sent message is not being acked by receiving entity.

It means that your sent message is not being acked by receiving entity.

Thanks for your reply, Atul.
I figured that was the case. However, if I send a text message via the ITAPI interface, it is received without a problem. Thus I suspect there's something wrong with my ISMS parameters?

Thanks for your reply, Atul.
I figured that was the case. However, if I send a text message via the ITAPI interface, it is received without a problem. Thus I suspect there's something wrong with my ISMS parameters?

Use ISMS_SetClientStatus() to trigger ack.

Use ISMS_SetClientStatus() to trigger ack.

Thanks again for your reply, Atul.
I'm looking into the documentation and searching for examples, but I can't find much useful information on ISMS_SetClientStatus. From what I'm reading, it appears that this function is used for responding to incoming messages. Please explain how it should be invoked when I'm sending an ISMS message.
Thanks much.
W James

Thanks again for your reply, Atul.
I'm looking into the documentation and searching for examples, but I can't find much useful information on ISMS_SetClientStatus. From what I'm reading, it appears that this function is used for responding to incoming messages. Please explain how it should be invoked when I'm sending an ISMS message.
Thanks much.
W James

Hi,
I actually want to know how the SetClientStatus works and how to obtain the privilege of AEECLSID_SMSMAINCLIENT. Is this something that goes into the MIF file? Thanks a lot!
Bryan

Hi,
I actually want to know how the SetClientStatus works and how to obtain the privilege of AEECLSID_SMSMAINCLIENT. Is this something that goes into the MIF file? Thanks a lot!
Bryan

ok, I found this article and set my dependencies and I can call the setclientstaus with rc = 0:
http://brewforums.qualcomm.com/showthread.php?t=12490&highlight=AEECLSID...
Can I expect that when I set the status to busy or resource not available the incoming SMS will be rejected by the handset? I've tried AEESMS_CS_BLOCK, AEESMS_CS_OUT_OF_RESOURCES, AEESMS_CS_BUSY and none of them works. Is it possible that this only works if the SMS app on the phone is BREW based? Thanks a lot!
Bryan

ok, I found this article and set my dependencies and I can call the setclientstaus with rc = 0:
http://brewforums.qualcomm.com/showthread.php?t=12490&highlight=AEECLSID...
Can I expect that when I set the status to busy or resource not available the incoming SMS will be rejected by the handset? I've tried AEESMS_CS_BLOCK, AEESMS_CS_OUT_OF_RESOURCES, AEESMS_CS_BUSY and none of them works. Is it possible that this only works if the SMS app on the phone is BREW based? Thanks a lot!
Bryan