lteiot6 2.0.0.0
LTE IoT 6 Click Driver

API for configuring and manipulating LTE IoT 6 Click driver. More...

Topics

 LTE IoT 6 Commands List
 List of commands of LTE IoT 6 Click driver.
 
 LTE IoT 6 Device Settings
 Settings for registers of LTE IoT 6 Click driver.
 
 LTE IoT 6 MikroBUS Map
 MikroBUS pin mapping of LTE IoT 6 Click driver.
 
 Lteiot6_cmd
 

Functions

void lteiot6_cfg_setup (lteiot6_cfg_t *cfg)
 LTE IoT 6 configuration object setup function.
 
err_t lteiot6_init (lteiot6_t *ctx, lteiot6_cfg_t *cfg)
 LTE IoT 6 initialization function.
 
err_t lteiot6_generic_write (lteiot6_t *ctx, char *data_buf, uint16_t len)
 LTE IoT 6 data writing function.
 
err_t lteiot6_generic_read (lteiot6_t *ctx, char *data_buf, uint16_t max_len)
 LTE IoT 6 data reading function.
 
void lteiot6_power_on (lteiot6_t *ctx)
 LTE IoT 6 power on.
 
void lteiot6_reset (lteiot6_t *ctx)
 LTE IoT 6 power on.
 
void lteiot6_set_pwr (lteiot6_t *ctx, uint8_t state)
 Sets state of the PWR pin.
 
void lteiot6_set_rst (lteiot6_t *ctx, uint8_t state)
 Sets state of the RST pin.
 
void lteiot6_set_rts (lteiot6_t *ctx, uint8_t state)
 Sets state of the RTS pin.
 
uint8_t lteiot6_get_ri (lteiot6_t *ctx)
 RI Pin Get function.
 
uint8_t lteiot6_get_cts (lteiot6_t *ctx)
 CTS Pin Get function.
 
void lteiot6_send_cmd (lteiot6_t *ctx, char *cmd)
 Send command function.
 
void lteiot6_send_cmd_with_parameter (lteiot6_t *ctx, char *at_cmd_buf, char *param_buf)
 Send command function with parameter.
 
void lteiot6_send_cmd_check (lteiot6_t *ctx, char *at_cmd_buf)
 Check the sent command.
 
void lteiot6_send_cmd_parameter_check (lteiot6_t *ctx, char *at_cmd_buf)
 Check the command parameters.
 
void lteiot6_set_sim_apn (lteiot6_t *ctx, char *sim_apn)
 Set sim card APN.
 
void lteiot6_send_text_message (lteiot6_t *ctx, char *phone_number, char *message_content)
 Send SMS message to number in text mode.
 
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.
 

Detailed Description

API for configuring and manipulating LTE IoT 6 Click driver.

Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.

Function Documentation

◆ lteiot6_cfg_setup()

void lteiot6_cfg_setup ( lteiot6_cfg_t * cfg)

LTE IoT 6 configuration object setup function.

This function initializes click configuration structure to initial values.

Parameters
[out]cfg: Click configuration structure. See lteiot6_cfg_t object definition for detailed explanation.
Returns
Nothing.
Note
The all used pins will be set to unconnected state.

◆ lteiot6_generic_read()

err_t lteiot6_generic_read ( lteiot6_t * ctx,
char * data_buf,
uint16_t max_len )

LTE IoT 6 data reading function.

This function reads a desired number of data bytes by using UART serial interface.

Parameters
[in]ctx: Click context object. See lteiot6_t object definition for detailed explanation.
[out]data_buf: Output read data.
[in]max_len: Number of bytes to be read.
Returns
  • >0 - Number of data bytes read,
  • <=0 - Error/Empty Ring buffer.
See #err_t definition for detailed explanation.
Note
None.

◆ lteiot6_generic_write()

err_t lteiot6_generic_write ( lteiot6_t * ctx,
char * data_buf,
uint16_t len )

LTE IoT 6 data writing function.

This function writes a desired number of data bytes by using UART serial interface.

Parameters
[in]ctx: Click context object. See lteiot6_t object definition for detailed explanation.
[in]data_buf: Data buffer for sending.
[in]len: Number of bytes for sending.
Returns
  • >=0 - Success,
  • <0 - Error.
See #err_t definition for detailed explanation.
Note
None.

◆ lteiot6_get_cts()

uint8_t lteiot6_get_cts ( lteiot6_t * ctx)

CTS Pin Get function.

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

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

◆ lteiot6_get_ri()

uint8_t lteiot6_get_ri ( lteiot6_t * ctx)

RI Pin Get function.

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

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

◆ lteiot6_init()

err_t lteiot6_init ( lteiot6_t * ctx,
lteiot6_cfg_t * cfg )

LTE IoT 6 initialization function.

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

Parameters
[out]ctx: Click context object. See lteiot6_t object definition for detailed explanation.
[in]cfg: Click configuration structure. See lteiot6_cfg_t object definition for detailed explanation.
Returns
  • 0 - Success,
  • -1 - Error.
See #err_t definition for detailed explanation.
Note
None.

◆ lteiot6_power_on()

void lteiot6_power_on ( lteiot6_t * ctx)

LTE IoT 6 power on.

This function powers on the chip on LTE IoT 6 click.

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

◆ lteiot6_reset()

void lteiot6_reset ( lteiot6_t * ctx)

LTE IoT 6 power on.

This function resets the chip on LTE IoT 6 click.

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

◆ lteiot6_send_cmd()

void lteiot6_send_cmd ( lteiot6_t * ctx,
char * cmd )

Send command function.

This function sends the specified command to the click module.

Parameters
[in]ctx: Click context object. See lteiot6_t object definition for detailed explanation.
[in]cmdCommand variable.
Returns
Nothing.
Note
Example of cmd -> "AT+CFUN=1".

◆ lteiot6_send_cmd_check()

void lteiot6_send_cmd_check ( lteiot6_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 lteiot6_t object definition for detailed explanation.
[in]at_cmd_bufCommand buffer.
Returns
Nothing.
Note
Example of at_cmd_buf -> "AT+CFUN".

◆ lteiot6_send_cmd_parameter_check()

void lteiot6_send_cmd_parameter_check ( lteiot6_t * ctx,
char * at_cmd_buf )

Check the command parameters.

This function checks the parameters of command.

Parameters
[in]ctx: Click context object. See lteiot6_t object definition for detailed explanation.
[in]at_cmd_bufCommand buffer.
Returns
Nothing.
Note
Example of at_cmd_buf -> "AT+CFUN".

◆ lteiot6_send_cmd_with_parameter()

void lteiot6_send_cmd_with_parameter ( lteiot6_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 lteiot6_t object definition for detailed explanation.
[in]at_cmd_bufCommand buffer.
[in]param_bufParameter buffer.
Returns
Nothing.
Note
Example of at_cmd_buf -> "AT+CFUN".

◆ lteiot6_send_sms_pdu()

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.

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

Parameters
[in]ctx: Click context object. See lteiot6_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.

◆ lteiot6_send_text_message()

void lteiot6_send_text_message ( lteiot6_t * ctx,
char * phone_number,
char * message_content )

Send SMS message to number in text mode.

Send command for SIM message with function parameters for device to send SMS message.

Parameters
[in]ctx: Click context object. See lteiot6_t object definition for detailed explanation.
[in]phone_number: Phone number to send message to.
[in]message_context: Content of the message.
Returns
Nothing.
Note
Device should be configured for .

◆ lteiot6_set_pwr()

void lteiot6_set_pwr ( lteiot6_t * ctx,
uint8_t state )

Sets state of the PWR pin.

This function sets PWR pin state.

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

◆ lteiot6_set_rst()

void lteiot6_set_rst ( lteiot6_t * ctx,
uint8_t state )

Sets state of the RST pin.

This function sets RST pin state.

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

◆ lteiot6_set_rts()

void lteiot6_set_rts ( lteiot6_t * ctx,
uint8_t state )

Sets state of the RTS pin.

This function sets RTS pin state.

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

◆ lteiot6_set_sim_apn()

void lteiot6_set_sim_apn ( lteiot6_t * ctx,
char * sim_apn )

Set sim card APN.

This function sets APN for sim card.

Parameters
[in]ctx: Click context object. See lteiot6_t object definition for detailed explanation.
[in]sim_apnSIM card APN.
Returns
Nothing.
Note
Example of sim_apn -> "vip.mobile".