14#ifndef NRF_MODEM_AT_H__
15#define NRF_MODEM_AT_H__
26#define NRF_MODEM_AT_ERROR 1
28#define NRF_MODEM_AT_CME_ERROR 2
30#define NRF_MODEM_AT_CMS_ERROR 3
90__nrf_modem_printf_like(1, 2)
113__nrf_modem_scanf_like(2, 3)
137__nrf_modem_printf_like(3, 4)
172__nrf_modem_printf_like(2, 3)
256 return (error & 0x00ff0000) >> 16;
269 return (error & 0xff00ffff);
int nrf_modem_at_sem_timeout_set(int timeout_ms)
Configure how long to wait for ongoing AT commands to complete when sending AT commands.
int nrf_modem_at_scanf(const char *cmd, const char *fmt,...)
Send an AT command to the modem and read the formatted response into the supplied argument list.
void(* nrf_modem_at_notif_handler_t)(const char *notif)
AT Notification handler prototype.
Definition nrf_modem_at.h:40
static int nrf_modem_at_err_type(int error)
Return the error type represented by the return value of nrf_modem_at_printf and nrf_modem_at_cmd.
Definition nrf_modem_at.h:254
int(* nrf_modem_at_cmd_custom_handler_t)(char *buf, size_t len, char *at_cmd)
AT command handler prototype.
Definition nrf_modem_at.h:192
int nrf_modem_at_notif_handler_set(nrf_modem_at_notif_handler_t callback)
Set a handler function for AT notifications.
void(* nrf_modem_at_cfun_handler_t)(int mode)
AT CFUN handler prototype.
Definition nrf_modem_at.h:47
void nrf_modem_at_cfun_handler_set(nrf_modem_at_cfun_handler_t handler)
Set a handler function for CFUN AT commands.
int nrf_modem_at_cmd(void *buf, size_t len, const char *fmt,...)
Send a formatted AT command to the modem and receive the response into the supplied buffer.
static int nrf_modem_at_err(int error)
Retrieve the specific CME or CMS error from the return value of a nrf_modem_at_printf or nrf_modem_at...
Definition nrf_modem_at.h:267
int nrf_modem_at_printf(const char *fmt,...)
Send a formatted AT command to the modem.
void(* nrf_modem_at_resp_handler_t)(const char *resp)
AT response handler prototype.
Definition nrf_modem_at.h:148
int nrf_modem_at_cmd_async(nrf_modem_at_resp_handler_t callback, const char *fmt,...)
Send a formatted AT command to the modem and receive the response asynchronously via a callback.
int nrf_modem_at_cmd_custom_set(struct nrf_modem_at_cmd_custom *custom_commands, size_t len)
Set a list of custom AT commands that are implemented in the application.
size_t cmd_strlen
Definition nrf_modem_at.h:205
const nrf_modem_at_cmd_custom_handler_t callback
Definition nrf_modem_at.h:203
const char *const cmd
Definition nrf_modem_at.h:201
Custom AT command.
Definition nrf_modem_at.h:199