iotexpresslink3 2.1.0.0
Main Page

IoT ExpressLink 3 click

‍IoT ExpressLink 3 Click is a compact add-on board that allows users to connect easily to IoT ExpressLink services and securely interact with cloud applications and other devices. This board features the NORA-W256WS, a standalone multi-radio module from u-blox. The module supports Wi-Fi radio at 802.11b/g/n standard and 2.4GHz of ISM band. It also supports the Bluetooth Low Energy 5. The embedded AWS IoT ExpressLink-compliant software includes secured pre-flashed certificates in the module.

click Product page


Click library

  • Author : Stefan Filipovic
  • Date : Sep 2023.
  • Type : UART type

Software Support

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

Standard key functions :

Example key functions :

Example Description

‍This example demonstrates the use of IoT ExpressLink 3 click board by bridging the USB UART

to mikroBUS UART which allows the click board to establish a connection with the IoT ExpressLink over the Quick Connect demo application without an AWS account.

The demo application is composed of two sections :

Application Init

‍Initializes the driver, resets the click board to factory default settings, reads

and displays the vendor model and thing name on the USB UART, sets the WiFi credentials, and attempts to connect to the AWS Cloud. If the initial attempt fails and the error message "Failed to access network" or "Failed to login AWS (MQTT) broker" appears, check the WiFi credentials and try running the example again.

void application_init ( void )
{
log_cfg_t log_cfg;
iotexpresslink3_cfg_t iotexpresslink3_cfg;
LOG_MAP_USB_UART( log_cfg );
log_init( &logger, &log_cfg );
log_info( &logger, " Application Init " );
// Click initialization.
iotexpresslink3_cfg_setup( &iotexpresslink3_cfg );
IOTEXPRESSLINK3_MAP_MIKROBUS( iotexpresslink3_cfg, MIKROBUS_1 );
if ( UART_ERROR == iotexpresslink3_init( &iotexpresslink3, &iotexpresslink3_cfg ) )
{
log_error( &logger, " Communication init." );
for ( ; ; );
}
log_printf( &logger, "Reset device\r\n\n" );
iotexpresslink3_reset_device ( &iotexpresslink3 );
Delay_ms ( 1000 );
Delay_ms ( 1000 );
log_printf( &logger, "Factory reset\r\n" );
strcpy ( app_buf, IOTEXPRESSLINK3_CMD_FACTORY_RESET );
iotexpresslink3_send_cmd ( &iotexpresslink3, app_buf );
iotexpresslink3_read_response ( &iotexpresslink3 );
Delay_ms ( 1000 );
Delay_ms ( 1000 );
log_printf( &logger, "Vendor model\r\n" );
strcpy ( app_buf, IOTEXPRESSLINK3_CMD_CONF_CHECK );
strcat ( app_buf, IOTEXPRESSLINK3_CMD_SEPARATOR );
strcat ( app_buf, IOTEXPRESSLINK3_CONF_KEY_ABOUT );
iotexpresslink3_send_cmd ( &iotexpresslink3, app_buf );
iotexpresslink3_read_response ( &iotexpresslink3 );
log_printf( &logger, "Thing name\r\n" );
strcpy ( app_buf, IOTEXPRESSLINK3_CMD_CONF_CHECK );
strcat ( app_buf, IOTEXPRESSLINK3_CMD_SEPARATOR );
iotexpresslink3_send_cmd ( &iotexpresslink3, app_buf );
iotexpresslink3_read_response ( &iotexpresslink3 );
log_printf( &logger, "WiFi SSID\r\n" );
strcpy ( app_buf, IOTEXPRESSLINK3_CMD_CONF );
strcat ( app_buf, IOTEXPRESSLINK3_CMD_SEPARATOR );
strcat ( app_buf, IOTEXPRESSLINK3_CONF_KEY_SSID );
strcat ( app_buf, IOTEXPRESSLINK3_CMD_SIGN_EQUAL );
strcat ( app_buf, WIFI_SSID );
iotexpresslink3_send_cmd ( &iotexpresslink3, app_buf );
iotexpresslink3_read_response ( &iotexpresslink3 );
log_printf( &logger, "WiFi Password\r\n" );
strcpy ( app_buf, IOTEXPRESSLINK3_CMD_CONF );
strcat ( app_buf, IOTEXPRESSLINK3_CMD_SEPARATOR );
strcat ( app_buf, IOTEXPRESSLINK3_CMD_SIGN_EQUAL );
strcat ( app_buf, WIFI_PASS );
iotexpresslink3_send_cmd ( &iotexpresslink3, app_buf );
iotexpresslink3_read_response ( &iotexpresslink3 );
log_printf( &logger, "Try to connect\r\n" );
strcpy ( app_buf, IOTEXPRESSLINK3_CMD_CONNECT );
iotexpresslink3_send_cmd ( &iotexpresslink3, app_buf );
iotexpresslink3_read_response ( &iotexpresslink3 );
log_info( &logger, " Application Task " );
log_printf( &logger, "Now close the UART terminal and switch to the QuickConnect app\r\n" );
Delay_ms ( 1000 );
uart_set_blocking( &logger.uart, false );
}
#define IOTEXPRESSLINK3_CMD_CONF
Definition iotexpresslink3.h:85
#define IOTEXPRESSLINK3_CMD_CONF_CHECK
Definition iotexpresslink3.h:86
#define IOTEXPRESSLINK3_CMD_CONNECT
Definition iotexpresslink3.h:74
#define IOTEXPRESSLINK3_CONF_KEY_SSID
Definition iotexpresslink3.h:108
#define IOTEXPRESSLINK3_CONF_KEY_ABOUT
IoT ExpressLink 3 config key parameters list.
Definition iotexpresslink3.h:97
#define IOTEXPRESSLINK3_CONF_KEY_PASSPHRASE
Definition iotexpresslink3.h:109
#define IOTEXPRESSLINK3_CMD_FACTORY_RESET
Definition iotexpresslink3.h:80
#define IOTEXPRESSLINK3_CMD_SIGN_EQUAL
Definition iotexpresslink3.h:91
#define IOTEXPRESSLINK3_CMD_SEPARATOR
Definition iotexpresslink3.h:90
#define IOTEXPRESSLINK3_CONF_KEY_THING_NAME
Definition iotexpresslink3.h:100
#define IOTEXPRESSLINK3_MAP_MIKROBUS(cfg, mikrobus)
MikroBUS pin mapping.
Definition iotexpresslink3.h:145
void application_init(void)
Definition main.c:99
#define WIFI_PASS
Definition main.c:54
#define WIFI_SSID
Definition main.c:53

Application Task

‍All data received from the USB UART will be forwarded to mikroBUS UART, and vice versa.

At this point you should disconnect from the UART terminal and run the Quick Connect demo application.

void application_task ( void )
{
app_buf_len = uart_read( &logger.uart, app_buf, PROCESS_BUFFER_SIZE );
if ( app_buf_len > 0 )
{
uart_write ( &iotexpresslink3.uart, app_buf, app_buf_len );
iotexpresslink3_clear_app_buf( );
}
app_buf_len = uart_read( &iotexpresslink3.uart, app_buf, PROCESS_BUFFER_SIZE );
if ( app_buf_len > 0 )
{
uart_write ( &logger.uart, app_buf, app_buf_len );
iotexpresslink3_clear_app_buf( );
}
}
void application_task(void)
Definition main.c:183
#define PROCESS_BUFFER_SIZE
Definition main.c:58

Note

‍To run the demo, follow the below steps:

  1. If you opened a terminal application in the previous step, be sure to > disconnect that application from the serial port.
  2. Download the Quick Connect executable:
  1. Unzip the package, and follow the steps from the README file.

The demo will connect to IoT ExpressLink and give you an URL that you can use to visualize data

flowing from the device to the cloud using AT+SEND commands. The demo will run for up to two minutes, and afterwards, you will be able to type AT+SEND commands yourself and see the data coming in on the visualizer.

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.IoTExpressLink3

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.