Hello,
I am starting to develop programs within the Open AT framework. I need to delete all the SMS messages that may be stored on the device once a day. I have created a loop that will subscribe to the timer and run a function every 24 hours. What code do I require to run the
AT+CMGD=1,4 (delete all messages)
Command? I have read about the adl_atCmdCreate function but what port do I run it on so that it acts on the device running the software?
This task is probably really simple but I am having trouble getting my head around the inner workings of this process.
You don’t run it on a port - you just make the API call, and the Wavecom core executes the command.
The stuff about ports if for the case where you want responses from the command forwarded to a port; if you don’t want responses forwarded to a port (ie, your application “consumes” them), just set the Rspflag parameter to FALSE; EG,
// Delete all Text Messages
adl_atCmdCreate
(
"AT+CMGD=1,4", // Delete ALL messages
FALSE, // Do not forward responses to the external app
my_sms_response_handler, // Response Handler
"*", // Subscribe to all responses
NULL // Marks the end of the subscribed response list
);
Note that the v3.03 ADL User Guide, Rev 001, Dec 05, incorrectly states that Rspflag is a bool - but this is clearly not the case!
The prototype in adl_CmdStackHandler.h declares it as a u16