lteiot8 2.0.0.0
Main Page

LTE IoT 8 click

‍LTE IoT 8 Click is a compact add-on board that contains a low-power solution for LTE and NB-IoT connectivity. This board features the SKY66430-11, a multi-band multi-chip System-in-Package (SiP) supporting 5G Massive IoT (LTE-M/NB-IoT) platforms from Skyworks Solutions and Sequans Communications.

click Product page


Click library

  • Author : Luka Filipovic
  • Date : Apr 2021.
  • Type : UART type

Software Support

We provide a library for the LTEIoT8 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 LTEIoT8 Click driver.

Standard key functions :

Example key functions :

Example Description

‍Application example shows device capability to connect

network and send SMS messages using standard "AT" commands.

The demo application is composed of two sections :

Application Init

‍Initializes driver and wake-up module and test communication.

void application_init ( void )
{
log_cfg_t log_cfg;
lteiot8_cfg_t lteiot8_cfg;
LOG_MAP_USB_UART( log_cfg );
log_init( &logger, &log_cfg );
log_info( &logger, " Application Init " );
// Click initialization.
lteiot8_cfg_setup( &lteiot8_cfg );
LTEIOT8_MAP_MIKROBUS( lteiot8_cfg, MIKROBUS_1 );
err_t init_flag = lteiot8_init( &lteiot8, &lteiot8_cfg );
if ( init_flag == UART_ERROR )
{
log_error( &logger, " Application Init Error. " );
log_info( &logger, " Please, run program again... " );
for ( ; ; );
}
lteiot8_process();
lteiot8_clear_app_buf();
app_buf_len = 0;
app_buf_cnt = 0;
lteiot8_default_cfg ( &lteiot8 );
while ( 0 == strstr( app_buf, LTEIOT8_RSP_SYSTART ) )
{
lteiot8_process();
}
//Check communication
lteiot8_send_cmd( &lteiot8, "AT" );
error_flag = lteiot8_rsp_check();
lteiot8_error_check( error_flag );
log_info( &logger, " Application Task " );
}
#define LTEIOT8_MAP_MIKROBUS(cfg, mikrobus)
MikroBUS pin mapping.
Definition lteiot8.h:134
#define LTEIOT8_RSP_SYSTART
Definition lteiot8.h:108
void application_init(void)
Definition main.c:179
@ LTEIOT8_CONFIGURE_FOR_CONNECTION
Definition main.c:82

Application Task

‍Application taks is split in few stages:

  • LTEIOT8_CONFIGURE_FOR_CONNECTION: Sets configuration to device to be able to connect to newtork.
  • LTEIOT8_WAIT_FOR_CONNECTION: Checks device response untill device sends information

that it is connected to network.

  • LTEIOT8_CHECK_CONNECTION:

    ‍Checks device connection status parameters.

  • LTEIOT8_CONFIGURE_FOR_MESSAGES: Sets configuration to device to send SMS messages.
  • LTEIOT8_MESSAGES: Sends message in selected mode (PDU/TXT).
void application_task ( void )
{
switch ( example_state )
{
{
if ( LTEIOT8_OK == lteiot8_configure_for_connection( ) )
{
example_state = LTEIOT8_WAIT_FOR_CONNECTION;
}
Delay_ms ( 1000 );
Delay_ms ( 1000 );
Delay_ms ( 1000 );
Delay_ms ( 1000 );
Delay_ms ( 1000 );
break;
}
{
if ( LTEIOT8_OK == lteiot8_check_connection( ) )
{
example_state = LTEIOT8_CHECK_CONNECTION;
}
break;
}
{
if ( LTEIOT8_OK == lteiot8_check_connection_parameters( ) )
{
}
Delay_ms ( 1000 );
Delay_ms ( 1000 );
Delay_ms ( 1000 );
Delay_ms ( 1000 );
Delay_ms ( 1000 );
break;
}
{
if ( LTEIOT8_OK == lteiot8_configure_for_meesages( ) )
{
example_state = LTEIOT8_MESSAGES;
}
Delay_ms ( 1000 );
Delay_ms ( 1000 );
Delay_ms ( 1000 );
Delay_ms ( 1000 );
Delay_ms ( 1000 );
break;
}
{
lteiot8_send_meesage();
Delay_ms ( 1000 );
Delay_ms ( 1000 );
Delay_ms ( 1000 );
Delay_ms ( 1000 );
Delay_ms ( 1000 );
Delay_ms ( 1000 );
Delay_ms ( 1000 );
Delay_ms ( 1000 );
Delay_ms ( 1000 );
Delay_ms ( 1000 );
break;
}
default:
{
log_error( &logger, " Example state." );
break;
}
}
}
@ LTEIOT8_OK
Definition lteiot8.h:203
void application_task(void)
Definition main.c:228
@ LTEIOT8_CONFIGURE_FOR_MESSAGES
Definition main.c:85
@ LTEIOT8_WAIT_FOR_CONNECTION
Definition main.c:83
@ LTEIOT8_MESSAGES
Definition main.c:86
@ LTEIOT8_CHECK_CONNECTION
Definition main.c:84

Note

‍In order for the example to work, user needs to set the phone number to which he wants

to send an SMS, and also will need to set an APN and SMSC of entered SIM card. Enter valid data for the following macros: SIM_APN, SIM_SMSC and PHONE_NUMBER_TO_MESSAGE.

‍>E.g.

SIM_APN "vip.iot", SMSC_ADDRESS_CSCA "\"+381999999\",145", SMSC_ADDRESS_PDU "+381999999\" , PHONE_NUMBER_TO_MESSAGE "+381659999999" The full application code, and ready to use projects can be installed directly from <em>NECTO Studio Package Manager</em>(recommended way), downloaded from our <a href="https://libstock.mikroe.com" >LibStock&trade;</a> or found on <a href="https://github.com/MikroElektronika/mikrosdk_click_v2/tree/master/clicks" >mikroE github account</a>. <strong>Other mikroE Libraries used in the example:</strong> - MikroSDK.Board - MikroSDK.Log - Click.LTEIoT8 <strong>Additional notes and informations</strong> Depending on the development board you are using, you may need <a href="https://www.mikroe.com/usb-uart-click" >USB UART click</a>, <a href="https://www.mikroe.com/usb-uart-2-click" >USB UART 2 Click</a> or <a href="https://www.mikroe.com/rs232-click" >RS232 Click</a> 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 <a href="https://shop.mikroe.com/compilers" >compilers.