Go to the documentation of this file.
31 #include "mikrosdk_version.h"
34 #if mikroSDK_GET_VERSION < 20800ul
35 #include "rcu_delays.h"
41 #include "drv_digital_out.h"
42 #include "drv_digital_in.h"
66 #define LTEIOT6_CMD_AT "AT"
67 #define LTEIOT6_CMD_ATI "ATI"
68 #define LTEIOT6_CMD_CGMR "AT+CGMR"
69 #define LTEIOT6_CMD_CFUN "AT+CFUN"
70 #define LTEIOT6_CMD_CREG "AT+CREG"
71 #define LTEIOT6_CMD_CEREG "AT+CEREG"
72 #define LTEIOT6_CMD_CGDCONT "AT+CGDCONT"
73 #define LTEIOT6_CMD_CIMI "AT+CIMI"
74 #define LTEIOT6_CMD_CGATT "AT+CGATT"
75 #define LTEIOT6_CMD_CSQ "AT+CSQ"
76 #define LTEIOT6_CMD_CESQ "AT+CESQ"
77 #define LTEIOT6_CMD_COPS "AT+COPS"
78 #define LTEIOT6_CMD_CMGF "AT+CMGF"
79 #define LTEIOT6_CMD_CMGS "AT+CMGS"
80 #define LTEIOT6_CMD_CSCA "AT+CSCA"
81 #define LTEIOT6_CMD_SQNLED "AT+SQNLED"
99 #define LTEIOT6_RSP_OK "OK"
100 #define LTEIOT6_RSP_ERROR "ERROR"
101 #define LTEIOT6_RSP_SYSTART "+SYSSTART"
107 #define DRV_BUFFER_SIZE 400
125 #define LTEIOT6_MAP_MIKROBUS( cfg, mikrobus ) \
126 cfg.tx_pin = MIKROBUS( mikrobus, MIKROBUS_TX ); \
127 cfg.rx_pin = MIKROBUS( mikrobus, MIKROBUS_RX ); \
128 cfg.pwr = MIKROBUS( mikrobus, MIKROBUS_AN ); \
129 cfg.rst = MIKROBUS( mikrobus, MIKROBUS_RST ); \
130 cfg.rts = MIKROBUS( mikrobus, MIKROBUS_CS ); \
131 cfg.ri = MIKROBUS( mikrobus, MIKROBUS_PWM ); \
132 cfg.cts = MIKROBUS( mikrobus, MIKROBUS_INT );
bool uart_blocking
Definition: lteiot6.h:181
digital_in_t ri
Definition: lteiot6.h:149
@ LTEIOT6_ERROR
Definition: lteiot6.h:195
err_t lteiot6_generic_read(lteiot6_t *ctx, char *data_buf, uint16_t max_len)
LTE IoT 6 data reading function.
pin_name_t rts
Definition: lteiot6.h:175
void lteiot6_set_sim_apn(lteiot6_t *ctx, char *sim_apn)
Set sim card APN.
err_t lteiot6_init(lteiot6_t *ctx, lteiot6_cfg_t *cfg)
LTE IoT 6 initialization function.
@ LTEIOT6_ERROR_UNKNOWN
Definition: lteiot6.h:198
pin_name_t cts
Definition: lteiot6.h:177
@ LTEIOT6_OK
Definition: lteiot6.h:194
pin_name_t rx_pin
Definition: lteiot6.h:169
uart_t uart
Definition: lteiot6.h:155
void lteiot6_send_cmd(lteiot6_t *ctx, char *cmd)
Send command function.
digital_in_t rx_pin
Definition: lteiot6.h:151
err_t lteiot6_generic_write(lteiot6_t *ctx, char *data_buf, uint16_t len)
LTE IoT 6 data writing function.
void lteiot6_cfg_setup(lteiot6_cfg_t *cfg)
LTE IoT 6 configuration object setup function.
LTE IoT 6 Click context object.
Definition: lteiot6.h:142
pin_name_t pwr
Definition: lteiot6.h:173
void lteiot6_set_pwr(lteiot6_t *ctx, uint8_t state)
Sets state of the PWR pin.
digital_out_t pwr
Definition: lteiot6.h:144
LTE IoT 6 Click configuration object.
Definition: lteiot6.h:167
#define DRV_BUFFER_SIZE
LTE IoT 6 driver buffer size.
Definition: lteiot6.h:107
digital_out_t rts
Definition: lteiot6.h:146
void lteiot6_send_cmd_parameter_check(lteiot6_t *ctx, char *at_cmd_buf)
Check the command parameters.
uint8_t lteiot6_get_ri(lteiot6_t *ctx)
RI Pin Get function.
pin_name_t ri
Definition: lteiot6.h:176
void lteiot6_set_rts(lteiot6_t *ctx, uint8_t state)
Sets state of the RTS pin.
void lteiot6_send_cmd_check(lteiot6_t *ctx, char *at_cmd_buf)
Check the sent command.
lteiot8_return_value_t
LTE IoT 6 Click return value data.
Definition: lteiot6.h:193
void lteiot6_power_on(lteiot6_t *ctx)
LTE IoT 6 power on.
void lteiot6_send_text_message(lteiot6_t *ctx, char *phone_number, char *message_content)
Send SMS message to number in text mode.
@ LTEIOT6_ERROR_TIMEOUT
Definition: lteiot6.h:196
pin_name_t rst
Definition: lteiot6.h:174
uart_data_bits_t data_bit
Definition: lteiot6.h:182
@ LTEIOT6_ERROR_CMD
Definition: lteiot6.h:197
void lteiot6_send_cmd_with_parameter(lteiot6_t *ctx, char *at_cmd_buf, char *param_buf)
Send command function with parameter.
uint8_t lteiot6_get_cts(lteiot6_t *ctx)
CTS Pin Get function.
digital_out_t rst
Definition: lteiot6.h:145
digital_in_t cts
Definition: lteiot6.h:150
void lteiot6_reset(lteiot6_t *ctx)
LTE IoT 6 power on.
uart_stop_bits_t stop_bit
Definition: lteiot6.h:184
uint32_t baud_rate
Definition: lteiot6.h:180
uart_parity_t parity_bit
Definition: lteiot6.h:183
err_t lteiot6_send_sms_pdu(lteiot6_t *ctx, char *service_center_number, char *phone_number, char *sms_text)
Send SMS message to number in pdu mode.
void lteiot6_set_rst(lteiot6_t *ctx, uint8_t state)
Sets state of the RST pin.
pin_name_t tx_pin
Definition: lteiot6.h:170