# Receiving SMS

**URL:** <https://forum.sierrawireless.com/t/receiving-sms/2487>\
**Category:** Open AT\
**Created:** [September 8, 2008, 6:28am UTC](https://forum.sierrawireless.com/t/receiving-sms/2487 "2008-09-08T06:28:31Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![von](https://avatars.discourse-cdn.com/v4/letter/v/6bbea6/32.png) [@von](https://forum.sierrawireless.com/u/von)\
**Post date:** [September 8, 2008, 6:28am UTC](https://forum.sierrawireless.com/t/receiving-sms/2487/1 "2008-09-08T06:28:31Z")

</div>

Good Day,

I use the following ADL subscribe funtion for my application to receive the incoming SMS (derived from SMS automation example):

```
sms_automaton_Handle_txt = adl_smsSubscribe(SMS_AUTO_Handler, SMS_AUTO_ctrl_Handler, ADL_SMS_MODE_TEXT);

```

In SMS\_AUTO\_handler i use the following code to intercept the incoming SMS:

```
bool SMS_AUTO_Handler(ascii *SmsTel, ascii *SmsTimeOrLength, ascii *SmsText)
{
    TRACE (( 1, "MESSAGE RECEIVED\n"));
    adl_atSendResponse(ADL_AT_RSP, "MESSAGE RECEIVED\n");
    return TRUE;
}

```

Modem was able to receive the incoming message in fact the whole message i composed was displayed on the terminal emulator. But no trace was displayed on the target monitoring tool and the adl\_atSendResponse was not executed. What could be the problem?

Thank you,  
Von

---

<div class="post-metadata">

**Author:** ![awneil](https://avatars.discourse-cdn.com/v4/letter/a/49beb7/32.png) [@awneil](https://forum.sierrawireless.com/u/awneil)\
**Post date:** [September 8, 2008, 7:16am UTC](https://forum.sierrawireless.com/t/receiving-sms/2487/2 "2008-09-08T07:16:20Z")

</div>

> [@von](#):
>
> ```
> sms_automaton_Handle_txt = adl_smsSubscribe(SMS_AUTO_Handler, SMS_AUTO_ctrl_Handler, ADL_SMS_MODE_TEXT);
> 
> ```

Did you check the return value for error codes?

---

<div class="post-metadata">

**Author:** ![von](https://avatars.discourse-cdn.com/v4/letter/v/6bbea6/32.png) [@von](https://forum.sierrawireless.com/u/von)\
**Post date:** [September 8, 2008, 8:05am UTC](https://forum.sierrawireless.com/t/receiving-sms/2487/3 "2008-09-08T08:05:26Z")

</div>

sms\_automaton\_Handle\_txt is equal to 0 after subscription.
