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

This file contains API for LTE IoT 5 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  lteiot5_t
 LTE IoT 5 Click context object. More...
 
struct  lteiot5_cfg_t
 LTE IoT 5 Click configuration object. More...
 

Macros

#define LTEIOT5_CMD_AT   "AT"
 LTE IoT 5 control commands. More...
 
#define LTEIOT5_CMD_GET_MODEL_ID   "AT+CGMM"
 
#define LTEIOT5_CMD_GET_SW_VERSION   "AT+CGMR"
 
#define LTEIOT5_CMD_GET_SERIAL_NUM   "AT+CGSN"
 
#define LTEIOT5_CMD_FACTORY_RESET   "AT&F"
 
#define LTEIOT5_CMD_SET_MODULE_FUNCTIONALITY   "AT+CFUN"
 
#define LTEIOT5_CMD_EPS_NETWORK_REGISTRATION   "AT+CEREG"
 
#define LTEIOT5_CMD_SIGNAL_QUALITY_REPORT   "AT+CSQ"
 
#define LTEIOT5_CMD_OPERATOR_SELECTION   "AT+COPS"
 
#define LTEIOT5_CMD_SEND_SMS   "AT+CMGS"
 
#define LTEIOT5_CMD_SELECT_SMS_FORMAT   "AT+CMGF"
 
#define LTEIOT5_CMD_DEFINE_PDP_CONTEXT   "AT+CGDCONT"
 
#define LTEIOT5_CMD_SHOW_PDP_ADDRESS   "AT+CGPADDR"
 
#define LTEIOT5_CMD_ACTIVATE_PDP_CONTEXT   "AT+CGACT"
 
#define LTEIOT5_CMD_PSD_CONFIG   "AT+UPSD"
 
#define LTEIOT5_CMD_PSD_ACTION   "AT+UPSDA"
 
#define LTEIOT5_CMD_CREATE_SOCKET   "AT+USOCR"
 
#define LTEIOT5_CMD_CLOSE_SOCKET   "AT+USOCL"
 
#define LTEIOT5_CMD_CONNECT_SOCKET   "AT+USOCO"
 
#define LTEIOT5_CMD_WRITE_SOCKET_DATA   "AT+USOWR"
 
#define LTEIOT5_CMD_READ_SOCKET_DATA   "AT+USORD"
 
#define LTEIOT5_CMD_GNSS_POWER_MANAGEMENT   "AT+UGPS"
 
#define LTEIOT5_CMD_GET_GNSS_FIX_DATA   "AT+UGGGA"
 
#define LTEIOT5_RSP_OK   "OK"
 LTE IoT 5 device response for AT commands. More...
 
#define LTEIOT5_RSP_ERROR   "ERROR"
 
#define LTEIOT5_URC_CREATE_SOCKET   "+USOCR: "
 LTE IoT 5 device unsolicited response code (URC) settings. More...
 
#define LTEIOT5_URC_RECEIVED_DATA   "+UUSORD: "
 
#define LTEIOT5_POWER_STATE_OFF   0
 LTE IoT 5 power state settings. More...
 
#define LTEIOT5_POWER_STATE_ON   1
 
#define LTEIOT5_POWER_STATE_RESET   2
 
#define LTEIOT5_RSP_START   "$"
 LTE IoT 5 response buffer commands. More...
 
#define LTEIOT5_RSP_DELIMITER   ","
 
#define LTEIOT5_RSP_END   "\r\n"
 
#define LTEIOT5_RSP_GGA   "GGA"
 
#define LTEIOT5_GGA_ELEMENT_SIZE   15
 LTE IoT 5 GGA command elements. More...
 
#define LTEIOT5_GGA_TIME   1
 
#define LTEIOT5_GGA_LATITUDE   2
 
#define LTEIOT5_GGA_LATITUDE_SIDE   3
 
#define LTEIOT5_GGA_LONGITUDE   4
 
#define LTEIOT5_GGA_LONGITUDE_SIDE   5
 
#define LTEIOT5_GGA_QUALITY_INDICATOR   6
 
#define LTEIOT5_GGA_NUMBER_OF_SATELLITES   7
 
#define LTEIOT5_GGA_H_DILUTION_OF_POS   8
 
#define LTEIOT5_GGA_ALTITUDE   9
 
#define LTEIOT5_GGA_ALTITUDE_UNIT   10
 
#define LTEIOT5_GGA_GEOIDAL_SEPARATION   11
 
#define LTEIOT5_GGA_GEOIDAL_SEPARATION_UNIT   12
 
#define LTEIOT5_GGA_TIME_SINCE_LAST_DGPS   13
 
#define LTEIOT5_GGA_DGPS_REFERENCE_STATION_ID   14
 
#define LTEIOT5_TX_DRV_BUFFER_SIZE   300
 LTE IoT 5 driver buffer size. More...
 
#define LTEIOT5_RX_DRV_BUFFER_SIZE   300
 
#define LTEIOT5_MAP_MIKROBUS(cfg, mikrobus)
 MikroBUS pin mapping. More...
 

Enumerations

enum  lteiot5_return_value_t { LTEIOT5_OK = 0, LTEIOT5_ERROR = -1, LTEIOT5_ERROR_TIMEOUT = -2, LTEIOT5_ERROR_CMD = -3 }
 LTE IoT 5 Click return value data. More...
 

Functions

void lteiot5_cfg_setup (lteiot5_cfg_t *cfg)
 LTE IoT 5 configuration object setup function. More...
 
err_t lteiot5_init (lteiot5_t *ctx, lteiot5_cfg_t *cfg)
 LTE IoT 5 initialization function. More...
 
err_t lteiot5_generic_write (lteiot5_t *ctx, uint8_t *data_in, uint16_t len)
 LTE IoT 5 data writing function. More...
 
err_t lteiot5_generic_read (lteiot5_t *ctx, uint8_t *data_out, uint16_t len)
 LTE IoT 5 data reading function. More...
 
void lteiot5_set_pwr_pin (lteiot5_t *ctx, uint8_t state)
 LTE IoT 5 set PWR pin function. More...
 
void lteiot5_set_rst_pin (lteiot5_t *ctx, uint8_t state)
 LTE IoT 5 set RST pin function. More...
 
void lteiot5_set_rts_pin (lteiot5_t *ctx, uint8_t state)
 LTE IoT 5 set RTS pin function. More...
 
uint8_t lteiot5_get_ring_pin (lteiot5_t *ctx)
 LTE IoT 5 get RING pin function. More...
 
uint8_t lteiot5_get_cts_pin (lteiot5_t *ctx)
 LTE IoT 5 get CTS pin function. More...
 
void lteiot5_set_power_state (lteiot5_t *ctx, uint8_t state)
 LTE IoT 5 set power state function. More...
 
void lteiot5_cmd_run (lteiot5_t *ctx, uint8_t *cmd)
 LTE IoT 5 cmd run function. More...
 
void lteiot5_cmd_set (lteiot5_t *ctx, uint8_t *cmd, uint8_t *value)
 LTE IoT 5 cmd set function. More...
 
void lteiot5_cmd_get (lteiot5_t *ctx, uint8_t *cmd)
 LTE IoT 5 cmd get function. More...
 
void lteiot5_cmd_help (lteiot5_t *ctx, uint8_t *cmd)
 LTE IoT 5 cmd help function. More...
 
void lteiot5_set_sim_apn (lteiot5_t *ctx, uint8_t *sim_apn)
 Set sim card APN. More...
 
void lteiot5_send_sms_text (lteiot5_t *ctx, uint8_t *phone_number, uint8_t *sms_text)
 LTE IoT 5 send SMS in text mode. More...
 
err_t lteiot5_send_sms_pdu (lteiot5_t *ctx, uint8_t *service_center_number, uint8_t *phone_number, uint8_t *sms_text)
 LTE IoT 5 send SMS in PDU mode. More...
 
err_t lteiot5_parse_gga (uint8_t *rsp_buf, uint8_t gga_element, uint8_t *element_data)
 LTE IoT 5 parse GGA function. More...
 

Detailed Description

This file contains API for LTE IoT 5 Click Driver.

Enumeration Type Documentation

◆ lteiot5_return_value_t

LTE IoT 5 Click return value data.

Predefined enum values for driver return values.

Enumerator
LTEIOT5_OK 
LTEIOT5_ERROR 
LTEIOT5_ERROR_TIMEOUT 
LTEIOT5_ERROR_CMD