nrfxlib API 2.8.99
Loading...
Searching...
No Matches

◆ nrf_modem_at_cmd()

int nrf_modem_at_cmd ( void * buf,
size_t len,
const char * fmt,
... )

#include <nrf_modem/include/nrf_modem_at.h>

Send a formatted AT command to the modem and receive the response into the supplied buffer.

Parameters
bufBuffer to receive the response into.
lenBuffer length.
fmtCommand format.
...Format arguments.
Return values
0On "OK" responses.
Returns
A positive value On "ERROR", "+CME ERROR", and "+CMS ERROR" responses. The type of error can be distinguished using nrf_modem_at_err_type. The error value can be retrieved using nrf_modem_at_err.
Return values
-NRF_EPERMThe Modem library is not initialized.
-NRF_EFAULTbuf or fmt are NULL.
-NRF_EINVALBad format fmt, or len is zero.
-NRF_EAGAINTimed out while waiting for another AT command to complete.
-NRF_ENOMEMNot enough shared memory for this request.
-NRF_E2BIGThe response is larger than the supplied buffer buf.
-NRF_ESHUTDOWNIf the modem was shut down.