lteiot3  2.0.0.0
Main Page

LTE IoT 3 click

LTE IoT 3 Click is a compact add-on board that contains a Low Power Wide Area (LPWA) Wireless IoT module that allows connections to the LTE CAT-M1, CAT NB1/2, and 2G networks. This board features the EXS82-W, LTE-IoT Wireless Module from Thales that offers a rich set of Internet protocols and industry-standard interfaces such as UART, USB, etc. Global IoT connectivity, integrated GNSS support, SMS support, extended coverage range, and reduced power consumption makes this single IoT module an excellent choice for device makers while ensuring worldwide reliability.

click Product page


Click library

  • Author : Stefan Ilic
  • Date : Aug 2021.
  • Type : UART type

Software Support

We provide a library for the LTEIoT3 Click as well as a demo application (example), developed using MikroElektronika compilers. The demo can run on all the main MikroElektronika development boards.

Package can be downloaded/installed directly from NECTO Studio Package Manager(recommended way), downloaded from our LibStock™ or found on Mikroe github account.

Library Description

This library contains API for LTEIoT3 Click driver.

Standard key functions :

Example key functions :

Example Description

This example reads and processes data from LTE IoT 3 clicks.

The demo application is composed of two sections :

Application Init

Initializes driver and wake-up module and checks communication and device version.

void application_init ( void )
{
log_cfg_t log_cfg;
lteiot3_cfg_t lteiot3_cfg;
LOG_MAP_USB_UART( log_cfg );
log_init( &logger, &log_cfg );
log_info( &logger, " Application Init " );
Delay_ms( 1000 );
// Click initialization.
lteiot3_cfg_setup( &lteiot3_cfg );
LTEIOT3_MAP_MIKROBUS( lteiot3_cfg, MIKROBUS_1 );
err_t init_flag = lteiot3_init( &lteiot3, &lteiot3_cfg );
if ( UART_ERROR == init_flag ) {
log_error( &logger, " Application Init Error. " );
log_info( &logger, " Please, run program again... " );
for ( ; ; );
}
log_info( &logger, " Power on device... " );
lteiot3_default_cfg ( &lteiot3 );
lteiot3_process( );
lteiot3_clear_app_buf( );
lteiot3_power_up_wait();
app_buf_len = 0;
app_buf_cnt = 0;
//AT
app_error_flag = lteiot3_rsp_check();
lteiot3_error_check( app_error_flag );
Delay_ms( 500 );
//ATI
app_error_flag = lteiot3_rsp_check();
lteiot3_error_check( app_error_flag );
Delay_ms( 500 );
app_connection_status = CONFIGURATION_FOR_NETWORK;
log_info( &logger, " Application Task " );
Delay_ms( 2000 );
}

Application Task

Application taks is split in few stages:

  • CONFIGURATION_FOR_NETWORK : Sets configuration to device to be able to connect to newtork.
  • CHECK_NETWORK_CONNECTION : Checks device connection status till device is connected to network.
  • SENDING_SMS : Sends SMS message to desired number in text mode.
  • CONFIGURATION_FOR_GNSS : Sets configuration to device to enable GNSS data.
  • GNSS_DATA : Reads and parses data from device to get latitude, longitude and altitude from device
void application_task ( void )
{
switch( app_connection_status )
{
{
lteiot3_config_device_for_network( );
break;
}
{
lteiot3_check_connection_to_network( );
break;
}
{
lteiot3_send_sms( );
break;
}
{
lteiot3_config_device_for_gnss( );
break;
}
case GNSS_DATA:
{
lteiot3_gnss_data();
break;
}
default:
{
log_error( &logger, "Application status error!" );
app_connection_status = CHECK_NETWORK_CONNECTION;
Delay_ms( 1000 );
break;
}
}
}

Note

In order for the example to work, user needs to set the phone number and sim apn to which he wants to send an SMS Enter valid data for the following macros: SIM_APN and PHONE_NUMBER_TO_MESSAGE. E.g. SIM_APN "vipmobile" PHONE_NUMBER_TO_MESSAGE "+381659999999"

The full application code, and ready to use projects can be installed directly from NECTO Studio Package Manager(recommended way), downloaded from our LibStock™ or found on Mikroe github account.

Other Mikroe Libraries used in the example:

  • MikroSDK.Board
  • MikroSDK.Log
  • Click.LTEIoT3

Additional notes and informations

Depending on the development board you are using, you may need USB UART click, USB UART 2 Click or RS232 Click to connect to your PC, for development systems with no UART to USB interface available on the board. UART terminal is available in all MikroElektronika compilers.


LTEIOT3_CMD_AT
#define LTEIOT3_CMD_AT
LTE IoT 3 description commands.
Definition: lteiot3.h:59
CONFIGURATION_FOR_NETWORK
#define CONFIGURATION_FOR_NETWORK
Definition: main.c:88
LTEIOT3_MAP_MIKROBUS
#define LTEIOT3_MAP_MIKROBUS(cfg, mikrobus)
MikroBUS pin mapping.
Definition: lteiot3.h:134
CONFIGURATION_FOR_GNSS
#define CONFIGURATION_FOR_GNSS
Definition: main.c:91
lteiot3_send_text_message
void lteiot3_send_text_message(lteiot3_t *ctx, char *phone_number, char *message_context)
LTE IoT 3 send text message.
lteiot3_send_cmd_check
void lteiot3_send_cmd_check(lteiot3_t *ctx, char *at_cmd_buf)
Check the sent command.
application_task
void application_task(void)
Definition: main.c:278
lteiot3_t
LTE IoT 3 Click context object.
Definition: lteiot3.h:151
SENDING_SMS
#define SENDING_SMS
Definition: main.c:90
lteiot3_default_cfg
err_t lteiot3_default_cfg(lteiot3_t *ctx)
LTE IoT 3 default configuration function.
lteiot3_send_cmd
void lteiot3_send_cmd(lteiot3_t *ctx, char *cmd)
Send command function.
lteiot3_cfg_t
LTE IoT 3 Click configuration object.
Definition: lteiot3.h:175
LTEIOT3_CMD_CFUN
#define LTEIOT3_CMD_CFUN
Definition: lteiot3.h:62
GNSS_DATA
#define GNSS_DATA
Definition: main.c:92
application_init
void application_init(void)
Definition: main.c:221
CHECK_NETWORK_CONNECTION
#define CHECK_NETWORK_CONNECTION
Definition: main.c:89
LTEIOT3_CMD_ATI
#define LTEIOT3_CMD_ATI
Definition: lteiot3.h:60
lteiot3_cfg_setup
void lteiot3_cfg_setup(lteiot3_cfg_t *cfg)
LTE IoT 3 configuration object setup function.
lteiot3_send_cmd_with_parameter
void lteiot3_send_cmd_with_parameter(lteiot3_t *ctx, char *at_cmd_buf, char *param_buf)
Send command function with parameter.
lteiot3_init
err_t lteiot3_init(lteiot3_t *ctx, lteiot3_cfg_t *cfg)
LTE IoT 3 initialization function.