Sms_send always return ADL_RET_ERR_BAD_STATE


#1

I found that many users met this problem,but i still haven’t got a solution.
Here is my code

#include “adl_global.h”
#include “wm_stdio.h”
u32 wm_apmCustomStack[512];
u16 wm_apmCustomStackSize=sizeof(wm_apmCustomStack);
s8 smsHandler;
bool smsHandle(ascii *Smstel,ascii *SmsTimeLength,ascii *SmsText)
{
return TRUE;
}
void smsCtrlHandle(u8 Event,u16 Nb)
{
switch(Event)
{
case ADL_SMS_EVENT_SENDING_OK:
case ADL_SMS_EVENT_SENDING_MR:
adl_atSendResponse(ADL_AT_UNS,“SMS_EVENT_SENDING_OK”);
break;
case ADL_SMS_EVENT_SENDING_ERROR:
adl_atSendResponse(ADL_AT_UNS,“SMS_EVEMT_SENDING_ERROR”);
break;
}
}
void adl_main(adl_InitType_e InitType)
{
smsHandler=adl_smsSubscribe(smsHandle,smsCtrlHandle,ADL_SMS_MODE_TEXT);
TRACE((1,“mainst”));
adl_smsSend(smsHandler,“13588460198”,“aaa”,ADL_SMS_MODE_TEXT);
}


#2

Hiya,

Please note if you’re cross-posting essentially the same question to multiple topics:

See: viewtopic.php?f=40&t=4227

ciao, Dave