lteiot2 2.0.0.0
Public function

Functions

void lteiot2_cfg_setup (lteiot2_cfg_t *cfg)
 Config Object Initialization function.
 
LTEIOT2_RETVAL lteiot2_init (lteiot2_t *ctx, lteiot2_cfg_t *cfg)
 Initialization function.
 
void lteiot2_module_power (lteiot2_t *ctx, uint8_t state)
 Power ON/OFF the module.
 
void lteiot2_generic_write (lteiot2_t *ctx, char *data_buf, uint16_t len)
 Generic write function.
 
int32_t lteiot2_generic_read (lteiot2_t *ctx, char *data_buf, uint16_t max_len)
 Generic read function.
 
void lteiot2_set_rts (lteiot2_t *ctx, uint8_t state)
 Sets state of the RTS pin.
 
uint8_t lteiot2_get_cts (lteiot2_t *ctx)
 CTS Pin Get function.
 
void lteiot2_send_cmd (lteiot2_t *ctx, char *cmd)
 Send command function.
 
void lteiot2_send_cmd_with_parameter (lteiot2_t *ctx, char *at_cmd_buf, char *param_buf)
 Send command function with parameter.
 
void lteiot2_send_cmd_check (lteiot2_t *ctx, char *at_cmd_buf)
 Check the sent command.
 
void lteiot2_send_cmd_parameter_check (lteiot2_t *ctx, char *at_cmd_buf)
 Check the command parameters.
 
void lteiot2_set_sim_apn (lteiot2_t *ctx, char *sim_apn)
 Set sim card APN.
 
void lteiot2_send_sms_text (lteiot2_t *ctx, char *phone_number, char *sms_text)
 LTE IoT 2 send SMS in text mode.
 
err_t lteiot2_send_sms_pdu (lteiot2_t *ctx, char *service_center_number, char *phone_number, char *sms_text)
 LTE IoT 2 send SMS in PDU mode.
 
lteiot2_error_t lteiot2_generic_parser (char *rsp, uint8_t command, uint8_t element, char *parser_buf)
 Generic parser function.
 

Detailed Description

Function Documentation

◆ lteiot2_cfg_setup()

void lteiot2_cfg_setup ( lteiot2_cfg_t * cfg)

Config Object Initialization function.

Parameters
cfgClick configuration structure.

@description This function initializes click configuration structure to init state.

Note
All used pins will be set to unconnected state.

◆ lteiot2_generic_parser()

lteiot2_error_t lteiot2_generic_parser ( char * rsp,
uint8_t command,
uint8_t element,
char * parser_buf )

Generic parser function.

Parameters
lteiot2Click object.
commandNMEA ( GPS/GNSS ) command.
elementElement position in command.
parser_bufParser buffer for data storage.
Returns
error data

◆ lteiot2_generic_read()

int32_t lteiot2_generic_read ( lteiot2_t * ctx,
char * data_buf,
uint16_t max_len )

Generic read function.

Parameters
ctxClick object.
data_bufData buffer for read data.
max_lenThe maximum length of data that can be read.
Returns
Number of reads data.

◆ lteiot2_generic_write()

void lteiot2_generic_write ( lteiot2_t * ctx,
char * data_buf,
uint16_t len )

Generic write function.

Parameters
ctxClick object.
data_bufData buffer for sends.
lenNumber of bytes for sends.

◆ lteiot2_get_cts()

uint8_t lteiot2_get_cts ( lteiot2_t * ctx)

CTS Pin Get function.

This function allows user to check state of the CTS pin.

Parameters
[in]ctx: Click context object. See lteiot2_t object definition for detailed explanation.
Returns
  • 0 logical low.
  • 1 logical high.

◆ lteiot2_init()

LTEIOT2_RETVAL lteiot2_init ( lteiot2_t * ctx,
lteiot2_cfg_t * cfg )

Initialization function.

Parameters
ctxClick object.
cfgClick configuration structure.

@description This function initializes all necessary pins and peripherals used for this click.

◆ lteiot2_module_power()

void lteiot2_module_power ( lteiot2_t * ctx,
uint8_t state )

Power ON/OFF the module.

Parameters
ctxClick object.
state0 - power OFF, 1 - power ON.

◆ lteiot2_send_cmd()

void lteiot2_send_cmd ( lteiot2_t * ctx,
char * cmd )

Send command function.

This function sends the specified command to the click module.

Parameters
[in]ctx: Click context object. See lteiot2_t object definition for detailed explanation.
[in]cmdCommand variable.
Returns
Nothing.

◆ lteiot2_send_cmd_check()

void lteiot2_send_cmd_check ( lteiot2_t * ctx,
char * at_cmd_buf )

Check the sent command.

This function checks the command that is sent.

Parameters
[in]ctx: Click context object. See lteiot2_t object definition for detailed explanation.
[in]at_cmd_bufCommand buffer.
Returns
Nothing.

◆ lteiot2_send_cmd_parameter_check()

void lteiot2_send_cmd_parameter_check ( lteiot2_t * ctx,
char * at_cmd_buf )

Check the command parameters.

This function checks the command that is sent.

Parameters
[in]ctx: Click context object. See lteiot2_t object definition for detailed explanation.
[in]at_cmd_bufCommand buffer.
Returns
Nothing.

◆ lteiot2_send_cmd_with_parameter()

void lteiot2_send_cmd_with_parameter ( lteiot2_t * ctx,
char * at_cmd_buf,
char * param_buf )

Send command function with parameter.

This function sends commands to the click module.

Parameters
[in]ctx: Click context object. See lteiot2_t object definition for detailed explanation.
[in]at_cmd_bufCommand buffer.
[in]param_bufParameter buffer.
Returns
Nothing.

◆ lteiot2_send_sms_pdu()

err_t lteiot2_send_sms_pdu ( lteiot2_t * ctx,
char * service_center_number,
char * phone_number,
char * sms_text )

LTE IoT 2 send SMS in PDU mode.

This function sends text message to a phone number in PDU mode.

Parameters
[in]ctx: Click context object. See lteiot2_t object definition for detailed explanation.
[in]service_center_numberSMSC of the SIM card.
[in]phone_numberPhone number to message.
[in]sms_textMessage to be sent.
Returns
  • >=0 - Success,
  • <0 - Error.
See #err_t definition for detailed explanation.

◆ lteiot2_send_sms_text()

void lteiot2_send_sms_text ( lteiot2_t * ctx,
char * phone_number,
char * sms_text )

LTE IoT 2 send SMS in text mode.

This function sends text message to a phone number.

Parameters
[in]ctx: Click context object. See lteiot2_t object definition for detailed explanation.
[in]phone_numberPhone number to message.
[in]message_contextMessage to be sent.
Returns
Nothing.

◆ lteiot2_set_rts()

void lteiot2_set_rts ( lteiot2_t * ctx,
uint8_t state )

Sets state of the RTS pin.

This function sets RTS pin state.

Parameters
[in]ctx: Click context object. See lteiot2_t object definition for detailed explanation.
[in]statePin state ( 1 or 0 ).
Returns
Nothing.

◆ lteiot2_set_sim_apn()

void lteiot2_set_sim_apn ( lteiot2_t * ctx,
char * sim_apn )

Set sim card APN.

This function sets APN for sim card.

Parameters
[in]ctx: Click context object. See lteiot2_t object definition for detailed explanation.
[in]sim_apnSIM card APN.
Returns
Nothing.