nRF Connect SDK API 2.8.99
|
AT host for serial LTE modem. More...
#include <zephyr/types.h>
#include <ctype.h>
#include <nrf_modem_at.h>
#include <modem/at_monitor.h>
#include <modem/at_cmd_custom.h>
#include <modem/at_parser.h>
#include "slm_defines.h"
Go to the source code of this file.
Data Structures | |
struct | slm_at_backend |
#define | SLM_UART_RESPONSE_DELAY K_MSEC(50) |
#define | SLM_DATAMODE_FLAGS_NONE 0 |
#define | SLM_DATAMODE_FLAGS_MORE_DATA (1 << 0) |
#define | SLM_DATAMODE_FLAGS_EXIT_HANDLER (1 << 1) |
#define | SLM_AT_CMD_CUSTOM(entry, _filter, _callback) |
Define a wrapper for a SLM custom AT command callback. | |
enum | slm_datamode_operation { DATAMODE_SEND , DATAMODE_EXIT } |
Operations in data mode. More... | |
typedef int(* | slm_datamode_handler_t) (uint8_t op, const uint8_t *data, int len, uint8_t flags) |
Data mode sending handler type. | |
typedef int | slm_at_callback(enum at_parser_cmd_type cmd_type, struct at_parser *parser, uint32_t param_count) |
SLM AT command callback type. | |
uint8_t | slm_data_buf [NRF_SOCKET_TLS_MAX_MESSAGE_SIZE] |
uint8_t | slm_at_buf [4096+1] |
uint16_t | slm_datamode_time_limit |
int | slm_at_set_backend (struct slm_at_backend backend) |
int | slm_at_send (const uint8_t *data, size_t len) |
Sends the given data via the current AT backend. | |
int | slm_at_send_str (const char *str) |
Identical to slm_at_send(str, strlen(str)). | |
void | slm_at_receive (const uint8_t *data, size_t len) |
Processes received AT bytes. | |
int | slm_at_host_init (void) |
Initialize AT host for serial LTE modem. | |
int | slm_at_host_power_off (void) |
Turns the current AT backend and UART power off. | |
int | slm_at_host_power_on (void) |
Counterpart to slm_at_host_power_off() . | |
void | slm_at_host_uninit (void) |
Uninitialize AT host for serial LTE modem. | |
void | rsp_send (const char *fmt,...) |
Send AT command response. | |
void | rsp_send_ok (void) |
Send AT command response of OK. | |
void | rsp_send_error (void) |
Send AT command response of ERROR. | |
void | data_send (const uint8_t *data, size_t len) |
Send raw data received in data mode. | |
int | enter_datamode (slm_datamode_handler_t handler) |
Request SLM AT host to enter data mode. | |
bool | in_datamode (void) |
Check whether SLM AT host is in data mode. | |
bool | exit_datamode_handler (int result) |
Exit the data mode handler. | |
int | slm_at_cb_wrapper (char *buf, size_t len, char *at_cmd, slm_at_callback cb) |
Generic wrapper for a custom SLM AT command callback. | |
AT host for serial LTE modem.