Hello cchoi22915,
It looks like you may be asking two questions in your post today, with “how to send SMS” the bigger question. I may be able to help with the smaller one. If you have a need to send AT commands from your application to the LTE modem, and you’re using an nRF9160 based board, the API routine at_cmd_write() is the one I have been using for about the past three months. Jared cued me into this API routine.
In a Zephyr based application you can call this routine so long as your source file has the following include stanza:
#include <modem/at_cmd.h>
Here is an example of how I call this routine, and capture any character string wise response the modem may give in reply:
char buffer_at_response[SIZE_OF_MESSAGE_MEDIUM] = { 0 };
char lbuf[DEFAULT_MESSAGE_SIZE] = { 0 };
uint32_t rstatus = ROUTINE_OK;
//
rstatus = at_cmd_write("AT%XMONITOR", buffer_at_response, sizeof(buffer_at_response), NULL);
snprintf(lbuf, DEFAULT_MESSAGE_SIZE, "(5) %s returns: %s%s", "AT%XMONITOR", buffer_at_response, ONE_NEWLINE);
printk_cli(lbuf);
The printk_cli()
is a local routine I wrote to direct diagnostics and non-AT commands to a UART other than LTE modem’s preferred and selected UART.
So this API routine is the way Jared shared with me to have firmware interact on demand with the LTE modem. No human intervention required.
This does not answer your larger question about sending SMS messages. I haven’t worked with that sample app yet. But hope this can help you.