TOP Contributors

  1. MIKROE (2664 codes)
  2. Alcides Ramos (358 codes)
  3. Shawon Shahryiar (307 codes)
  4. jm_palomino (112 codes)
  5. Chisanga Mumba (90 codes)
  6. S P (73 codes)
  7. dany (71 codes)
  8. MikroBUS.NET Team (35 codes)
  9. NART SCHINACKOW (34 codes)
  10. Armstrong Subero (27 codes)

Most Downloaded

  1. Timer Calculator (137150 times)
  2. FAT32 Library (70250 times)
  3. Network Ethernet Library (56134 times)
  4. USB Device Library (46452 times)
  5. Network WiFi Library (42110 times)
  6. FT800 Library (41414 times)
  7. GSM click (29126 times)
  8. mikroSDK (26574 times)
  9. PID Library (26512 times)
  10. microSD click (25509 times)
Libstock prefers package manager

Package Manager

We strongly encourage users to use Package manager for sharing their code on Libstock website, because it boosts your efficiency and leaves the end user with no room for error. [more info]

< Back
mikroSDK Library

IoT ExpressLink click

Rating:

0

Author: MIKROE

Last Updated: 2024-04-03

Package Version: 2.1.0.4

mikroSDK Library: 2.0.0.0

Category: WIFI

Downloaded: 39 times

Not followed.

License: MIT license  

IoT ExpressLink Click is a compact add-on board that allows users to easily connected to IoT ExpressLink services and securely interact with cloud applications and other devices. This board features the ESP32-C3-MINI-1-N4-A, a small 2.4GHz WiFi (802.11 b/g/n) and Bluetooth® 5 module from Espressif Systems that use ESP32C3 series of SoC RISCV single-core microprocessor (ESP32-C3FN4) with 4MB flash in a single chip package. The module uses UART communication alongside several other features like the JTAG interface, module wake-up, various operational event detection, additional UART for debugging, and others.

No Abuse Reported

Do you want to subscribe in order to receive notifications regarding "IoT ExpressLink click" changes.

Do you want to unsubscribe in order to stop receiving notifications regarding "IoT ExpressLink click" changes.

Do you want to report abuse regarding "IoT ExpressLink click".

  • Information
  • Comments (0)

mikroSDK Library Blog


IoT ExpressLink click

IoT ExpressLink Click is a compact add-on board that allows users to easily connected to IoT ExpressLink services and securely interact with cloud applications and other devices. This board features the ESP32-C3-MINI-1-N4-A, a small 2.4GHz WiFi (802.11 b/g/n) and Bluetooth® 5 module from Espressif Systems that use ESP32C3 series of SoC RISCV single-core microprocessor (ESP32-C3FN4) with 4MB flash in a single chip package. The module uses UART communication alongside several other features like the JTAG interface, module wake-up, various operational event detection, additional UART for debugging, and others.

iotexpresslink_click.png

click Product page


Click library

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

Software Support

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

Standard key functions :

  • iotexpresslink_cfg_setup Config Object Initialization function.

    void iotexpresslink_cfg_setup ( iotexpresslink_cfg_t *cfg );
  • iotexpresslink_init Initialization function.

    err_t iotexpresslink_init ( iotexpresslink_t *ctx, iotexpresslink_cfg_t *cfg );

Example key functions :

  • iotexpresslink_reset_device This function resets device by toggling the RST pin state.

    void iotexpresslink_reset_device ( iotexpresslink_t *ctx );
  • iotexpresslink_send_cmd This function send command string by using UART serial interface.

    void iotexpresslink_send_cmd ( iotexpresslink_t *ctx, uint8_t *cmd );

Example Description

This example demonstrates the use of IoT ExpressLink 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;  /**< Logger config object. */
    iotexpresslink_cfg_t iotexpresslink_cfg;  /**< Click config object. */

    /** 
     * Logger initialization.
     * Default baud rate: 115200
     * Default log level: LOG_LEVEL_DEBUG
     * @note If USB_UART_RX and USB_UART_TX 
     * are defined as HAL_PIN_NC, you will 
     * need to define them manually for log to work. 
     * See @b LOG_MAP_USB_UART macro definition for detailed explanation.
     */
    LOG_MAP_USB_UART( log_cfg );
    log_init( &logger, &log_cfg );
    log_info( &logger, " Application Init " );

    // Click initialization.
    iotexpresslink_cfg_setup( &iotexpresslink_cfg );
    IOTEXPRESSLINK_MAP_MIKROBUS( iotexpresslink_cfg, MIKROBUS_1 );
    if ( UART_ERROR == iotexpresslink_init( &iotexpresslink, &iotexpresslink_cfg ) ) 
    {
        log_error( &logger, " Communication init." );
        for ( ; ; );
    }

    log_printf( &logger, "Reset device\r\n\n" );
    iotexpresslink_reset_device ( &iotexpresslink );
    Delay_ms ( 1000 );
    Delay_ms ( 1000 );
    log_printf( &logger, "Factory reset\r\n" );
    strcpy ( app_buf, IOTEXPRESSLINK_CMD_FACTORY_RESET );
    iotexpresslink_send_cmd ( &iotexpresslink, app_buf );
    iotexpresslink_read_response ( &iotexpresslink );
    Delay_ms ( 1000 );
    Delay_ms ( 1000 );

    log_printf( &logger, "Vendor model\r\n" );
    strcpy ( app_buf, IOTEXPRESSLINK_CMD_CONF_CHECK );
    strcat ( app_buf, IOTEXPRESSLINK_CMD_SEPARATOR );
    strcat ( app_buf, IOTEXPRESSLINK_CONF_KEY_ABOUT );
    iotexpresslink_send_cmd ( &iotexpresslink, app_buf );
    iotexpresslink_read_response ( &iotexpresslink );

    log_printf( &logger, "Thing name\r\n" );
    strcpy ( app_buf, IOTEXPRESSLINK_CMD_CONF_CHECK );
    strcat ( app_buf, IOTEXPRESSLINK_CMD_SEPARATOR );
    strcat ( app_buf, IOTEXPRESSLINK_CONF_KEY_THING_NAME );
    iotexpresslink_send_cmd ( &iotexpresslink, app_buf );
    iotexpresslink_read_response ( &iotexpresslink );

    log_printf( &logger, "WiFi SSID\r\n" );
    strcpy ( app_buf, IOTEXPRESSLINK_CMD_CONF );
    strcat ( app_buf, IOTEXPRESSLINK_CMD_SEPARATOR );
    strcat ( app_buf, IOTEXPRESSLINK_CONF_KEY_SSID );
    strcat ( app_buf, IOTEXPRESSLINK_CMD_SIGN_EQUAL );
    strcat ( app_buf, WIFI_SSID );
    iotexpresslink_send_cmd ( &iotexpresslink, app_buf );
    iotexpresslink_read_response ( &iotexpresslink );

    log_printf( &logger, "WiFi Password\r\n" );
    strcpy ( app_buf, IOTEXPRESSLINK_CMD_CONF );
    strcat ( app_buf, IOTEXPRESSLINK_CMD_SEPARATOR );
    strcat ( app_buf, IOTEXPRESSLINK_CONF_KEY_PASSPHRASE );
    strcat ( app_buf, IOTEXPRESSLINK_CMD_SIGN_EQUAL );
    strcat ( app_buf, WIFI_PASS );
    iotexpresslink_send_cmd ( &iotexpresslink, app_buf );
    iotexpresslink_read_response ( &iotexpresslink );

    log_printf( &logger, "Try to connect\r\n" );
    strcpy ( app_buf, IOTEXPRESSLINK_CMD_CONNECT );
    iotexpresslink_send_cmd ( &iotexpresslink, app_buf );
    iotexpresslink_read_response ( &iotexpresslink );

    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 );
}

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 ( &iotexpresslink.uart, app_buf, app_buf_len );
        iotexpresslink_clear_app_buf( );
    }
    app_buf_len = uart_read( &iotexpresslink.uart, app_buf, PROCESS_BUFFER_SIZE );
    if ( app_buf_len > 0 ) 
    {
        uart_write ( &logger.uart, app_buf, app_buf_len );
        iotexpresslink_clear_app_buf( );
    }
}

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

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.


ALSO FROM THIS AUTHOR

RN4678 click

7

RN4678 click carries the RN4678 Bluetooth® 4.2 dual mode module from Microchip. The click is designed to run on a 3.3V power supply. It communicates with the target microcontroller over I2C and UART interface.

[Learn More]

Environment 3 click

0

Environment 3 Click is a compact add-on board that contains a four-in-one environmental measurement solution. This board features BME688, a first gas sensor with Artificial Intelligence (AI), and integrated high-linearity/high-accuracy pressure, humidity, and temperature sensors from Bosch Sensortech. The BME688 can detect Volatile Organic Compounds (VOCs), Volatile Sulfur Compounds (VSCs), and other gases such as carbon monoxide and hydrogen in part per billion (ppb) range. It provides absolute temperature accuracy, typical of ±1°C, and best performance when operated within the pressure, temperature, and humidity range of 300-110hPa, 0-65°C, and 10-90%RH.

[Learn More]

Spectral 3 click

5

Spectral 3 click is a multispectral sensing device, which uses the state-of-the-art sensor IC for a very accurate near-IR (NIR) sensing. The sensor on the Spectral 3 click provides multi-spectral sensing in the NIR wavelengths from approximately 610nm to 860nm with the full width at half maximum (FWHM) of 20nm.

[Learn More]