#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
-
| buf | Buffer to receive the response into. |
| len | Buffer length. |
| fmt | Command format. |
| ... | Format arguments. |
- Return values
-
- 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_EPERM | The Modem library is not initialized. |
| -NRF_EFAULT | buf or fmt are NULL. |
| -NRF_EINVAL | Bad format fmt, or len is zero. |
| -NRF_EAGAIN | Timed out while waiting for another AT command to complete. |
| -NRF_ENOMEM | Not enough shared memory for this request. |
| -NRF_E2BIG | The response is larger than the supplied buffer buf. |
| -NRF_ESHUTDOWN | If the modem was shut down. |