pub unsafe extern "C" fn nrf_modem_at_cmd_async(
    callback: nrf_modem_at_resp_handler_t,
    fmt: *const c_char
    ...
) -> c_int
Expand description

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.

  • callback - Callback to receive the response.
  • fmt - Command format. @param … Format arguments.

Returns 0 On “OK” responses. Returns -NRF_EPERM The Modem library is not initialized. Returns -NRF_EFAULT * callback - or * fmt - are * NULL - . Returns -NRF_EINVAL Bad format * fmt - . Returns -NRF_EINPROGRESS An asynchrounous request is already in progress. Returns -NRF_ENOMEM Not enough shared memory for this request. Returns -NRF_ESHUTDOWN If the modem was shut down.