nRF Connect SDK API 0.1.0
Loading...
Searching...
No Matches

◆ at_cmd_custom_respond()

int at_cmd_custom_respond ( char *  buf,
size_t  buf_size,
const char *  response,
  ... 
)

#include <include/modem/at_cmd_custom.h>

Fill response buffer without overflowing the buffer.

Note
For the modem library to accept the response in buf as a success, the response must contain "OK\\r\\n". If the response is an error, use "ERROR\\r\\n" or appropriate CMS/CME responses, e.g. "+CMS ERROR: <errorcode>".
Parameters
bufBuffer to put response into.
buf_sizeSize of the response buffer.
responseResponse format.
...Format arguments.
Return values
0on success.
-NRF_EFAULTif no buffer provided.
-NRF_E2BIGif the provided buffer is too small for the response.