# Why receiving error-code SMS

**URL:** <https://forum.sierrawireless.com/t/why-receiving-error-code-sms/3894>\
**Category:** Legacy AirPrime modules\
**Created:** [November 23, 2009, 6:59am UTC](https://forum.sierrawireless.com/t/why-receiving-error-code-sms/3894 "2009-11-23T06:59:48Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![glovej](https://avatars.discourse-cdn.com/v4/letter/g/8dc957/32.png) [@glovej](https://forum.sierrawireless.com/u/glovej)\
**Post date:** [November 23, 2009, 6:59am UTC](https://forum.sierrawireless.com/t/why-receiving-error-code-sms/3894/1 "2009-11-23T06:59:48Z")

</div>

I used adl to send a SMS to my friend and it successed.  
But my friend tell me the content about the SMS was a unkonwn sympol(not the correct content-“abc123” )  
It’s just like that the mesage hasn’t been send completely  
Another problem is I recevied the “ok” response twice (almost at the same time)for one SMS sending.  
How to improve my code?  
It is really not the initializing problem,because i have test it already

```auto
#include "adl_global.h"
#include "wm_stdio.h"
u32 wm_apmCustomStack[512];
u16 wm_apmCustomStackSize=sizeof(wm_apmCustomStack);

s8 s;

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 tmrHandle(u8 ID)
{
          
        adl_smsSend(s,"+8613588460198","abc123",ADL_SMS_MODE_TEXT);
    
}

void adl_main(adl_InitType_e InitType)
{
   
    s=adl_smsSubscribe(smsHandle,smsCtrlHandle,ADL_SMS_MODE_TEXT);
    adl_tmrSubscribe(TRUE,200,ADL_TMR_TYPE_100MS,tmrHandle);
    
}
```
