nrfxlib API 0.1.0
Loading...
Searching...
No Matches

◆ nrf_modem_at_printf()

int nrf_modem_at_printf ( const char *  fmt,
  ... 
)

#include <nrf_modem/include/nrf_modem_at.h>

Send a formatted AT command to the modem.

Supports all format specifiers of printf() as implemented by the selected C library. This function can return a negative value, zero or a positive value.

Parameters
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_EFAULTfmt is NULL.
-NRF_EINVALBad format fmt.
-NRF_EAGAINTimed out while waiting for another AT command to complete.
-NRF_ENOMEMNot enough shared memory for this request.
-NRF_ESHUTDOWNIf modem was shut down.