lteiot17  2.1.0.0
Data Structures | Macros | Enumerations | Functions
lteiot17.h File Reference

This file contains API for LTE IoT 17 Click Driver. More...

#include "drv_digital_out.h"
#include "drv_digital_in.h"
#include "drv_uart.h"

Go to the source code of this file.

Data Structures

struct  lteiot17_t
 LTE IoT 17 Click context object. More...
 
struct  lteiot17_cfg_t
 LTE IoT 17 Click configuration object. More...
 

Macros

#define LTEIOT17_CMD_AT   "AT"
 LTE IoT 17 control commands. More...
 
#define LTEIOT17_CMD_GET_MODEL_ID   "AT+CGMM"
 
#define LTEIOT17_CMD_GET_SW_VERSION   "AT+CGMR"
 
#define LTEIOT17_CMD_GET_SERIAL_NUM   "AT+CGSN"
 
#define LTEIOT17_CMD_SET_PHONE_FUNCTIONALITY   "AT+CFUN"
 
#define LTEIOT17_CMD_NETWORK_REGISTRATION   "AT+CREG"
 
#define LTEIOT17_CMD_SIGNAL_QUALITY_REPORT   "AT+CSQ"
 
#define LTEIOT17_CMD_OPERATOR_SELECTION   "AT+COPS"
 
#define LTEIOT17_CMD_SEND_SMS   "AT+CMGS"
 
#define LTEIOT17_CMD_SELECT_SMS_FORMAT   "AT+CMGF"
 
#define LTEIOT17_CMD_DEFINE_PDP_CONTEXT   "AT+CGDCONT"
 
#define LTEIOT17_CMD_APP_NETWORK_CONFIG   "AT+CNCFG"
 
#define LTEIOT17_CMD_APP_NETWORK_ACTIVE   "AT+CNACT"
 
#define LTEIOT17_CMD_SET_TCP_UDP_ID   "AT+CACID"
 
#define LTEIOT17_CMD_OPEN_TCP_UDP_CONNECTION   "AT+CAOPEN"
 
#define LTEIOT17_CMD_SEND_DATA_VIA_CONNECTION   "AT+CASEND"
 
#define LTEIOT17_CMD_RECEIVE_DATA_VIA_CONNECTION   "AT+CARECV"
 
#define LTEIOT17_CMD_CLOSE_TCP_UDP_CONNECTION   "AT+CACLOSE"
 
#define LTEIOT17_RSP_OK   "OK"
 LTE IoT 17 device response for AT commands. More...
 
#define LTEIOT17_RSP_ERROR   "ERROR"
 
#define LTEIOT17_URC_RECEIVED_DATA   "+CADATAIND:"
 LTE IoT 17 device unsolicited response code (URC) settings. More...
 
#define LTEIOT17_URC_CONNECTION_OPEN   "+CAOPEN:"
 
#define LTEIOT17_POWER_STATE_OFF   0
 LTE IoT 17 power state settings. More...
 
#define LTEIOT17_POWER_STATE_ON   1
 
#define LTEIOT17_POWER_STATE_RESET   2
 
#define LTEIOT17_TX_DRV_BUFFER_SIZE   256
 LTE IoT 17 driver buffer size. More...
 
#define LTEIOT17_RX_DRV_BUFFER_SIZE   256
 
#define LTEIOT17_MAP_MIKROBUS(cfg, mikrobus)
 MikroBUS pin mapping. More...
 

Enumerations

enum  lteiot17_return_value_t {
  LTEIOT17_OK = 0, LTEIOT17_ERROR = -1, LTEIOT17_ERROR_TIMEOUT = -2, LTEIOT17_ERROR_CMD = -3,
  LTEIOT17_ERROR_UNKNOWN = -4
}
 LTE IoT 17 Click return value data. More...
 

Functions

void lteiot17_cfg_setup (lteiot17_cfg_t *cfg)
 LTE IoT 17 configuration object setup function. More...
 
err_t lteiot17_init (lteiot17_t *ctx, lteiot17_cfg_t *cfg)
 LTE IoT 17 initialization function. More...
 
err_t lteiot17_generic_write (lteiot17_t *ctx, uint8_t *data_in, uint16_t len)
 LTE IoT 17 data writing function. More...
 
err_t lteiot17_generic_read (lteiot17_t *ctx, uint8_t *data_out, uint16_t len)
 LTE IoT 17 data reading function. More...
 
void lteiot17_set_pwr_pin (lteiot17_t *ctx, uint8_t state)
 LTE IoT 17 set PWR pin function. More...
 
void lteiot17_set_rts_pin (lteiot17_t *ctx, uint8_t state)
 LTE IoT 17 set RTS pin function. More...
 
uint8_t lteiot17_get_ring_pin (lteiot17_t *ctx)
 LTE IoT 17 get RING pin function. More...
 
uint8_t lteiot17_get_cts_pin (lteiot17_t *ctx)
 LTE IoT 17 get CTS pin function. More...
 
void lteiot17_set_power_state (lteiot17_t *ctx, uint8_t state)
 LTE IoT 17 set power state function. More...
 
void lteiot17_send_cmd (lteiot17_t *ctx, uint8_t *cmd)
 Send command function. More...
 
void lteiot17_send_cmd_par (lteiot17_t *ctx, uint8_t *at_cmd_buf, uint8_t *param_buf)
 Send command function with parameter. More...
 
void lteiot17_send_cmd_check (lteiot17_t *ctx, uint8_t *at_cmd_buf)
 Check the sent command. More...
 
void lteiot17_set_sim_apn (lteiot17_t *ctx, uint8_t *sim_apn)
 Set sim card APN. More...
 
void lteiot17_send_sms_text (lteiot17_t *ctx, uint8_t *phone_number, uint8_t *sms_text)
 LTE IoT 17 send SMS in text mode. More...
 
err_t lteiot17_send_sms_pdu (lteiot17_t *ctx, uint8_t *service_center_number, uint8_t *phone_number, uint8_t *sms_text)
 LTE IoT 17 send SMS in PDU mode. More...
 

Detailed Description

This file contains API for LTE IoT 17 Click Driver.

Enumeration Type Documentation

◆ lteiot17_return_value_t

LTE IoT 17 Click return value data.

Predefined enum values for driver return values.

Enumerator
LTEIOT17_OK 
LTEIOT17_ERROR 
LTEIOT17_ERROR_TIMEOUT 
LTEIOT17_ERROR_CMD 
LTEIOT17_ERROR_UNKNOWN