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

◆ nrf_modem_at_cmd_async()

int nrf_modem_at_cmd_async ( nrf_modem_at_resp_handler_t callback,
const char * fmt,
... )

#include <nrf_modem/include/nrf_modem_at.h>

Send a formatted AT command to the modem and receive the response asynchronously via a callback.

This function waits for the Modem to acknowledge the AT command but will return without waiting for the command execution.

Note
The callback is executed in an interrupt context. Take care to offload any processing as appropriate.
Parameters
callbackCallback to receive the response.
fmtCommand format.
...Format arguments.
Return values
0On "OK" responses.
-NRF_EPERMThe Modem library is not initialized.
-NRF_EFAULTcallback or fmt are NULL.
-NRF_EINVALBad format fmt.
-NRF_EINPROGRESSAnother AT command is executing.
-NRF_ENOMEMNot enough shared memory for this request.
-NRF_ESHUTDOWNIf the modem was shut down.