How to temporarily halt SMS reception?


#1

I receive SMSs, each of which may contain multiple commands to the system that may take some time to execute (involving timers, state machines, serial communication to external devices and creating/launching a reply SMS).

If, at any point in time, there are multiple SMSs waiting to be received/read, I assume that the SMS reception handler, subscribed to in adl_smsSubscribe, would repeatedly launch itself for each pending SMS, unless some form of SMS flow control is implemented?

If I want to hold off servicing a second SMS until the handling of the first is completed, would the correct method be to use adl_smsSubscribe(NULL, SMSTxHandler, ADL_SMS_MODE_TEXT) from within the SMSRxHandler? And then use adl_smsSubscribe(SMSRxHandler, SMSTxHandler, ADL_SMS_MODE_TEXT) when I am ready to receive and process the next SMS?


#2

I think the only way to do this would be to handle the SMS “manually” using AT Commands.

Alternatively, have your SMS handler put received messages into a queue of some sort…