14#ifndef NRF_MODEM_AT_H__
15#define NRF_MODEM_AT_H__
25#define NRF_MODEM_AT_ERROR 1
27#define NRF_MODEM_AT_CME_ERROR 2
29#define NRF_MODEM_AT_CMS_ERROR 3
251 return (error & 0x00ff0000) >> 16;
264 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:39
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:249
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:187
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:46
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:262
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:144
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:200
const nrf_modem_at_cmd_custom_handler_t callback
Definition: nrf_modem_at.h:198
const char *const cmd
Definition: nrf_modem_at.h:196
Custom AT command.
Definition: nrf_modem_at.h:194