TOP Contributors

  1. MIKROE (2663 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 (137085 times)
  2. FAT32 Library (70228 times)
  3. Network Ethernet Library (56097 times)
  4. USB Device Library (46429 times)
  5. Network WiFi Library (42047 times)
  6. FT800 Library (41382 times)
  7. GSM click (29110 times)
  8. mikroSDK (26558 times)
  9. PID Library (26487 times)
  10. microSD click (25486 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

LTE IoT 9 click

Rating:

0

Author: MIKROE

Last Updated: 2024-04-03

Package Version: 2.1.0.17

mikroSDK Library: 2.0.0.0

Category: LTE IoT

Downloaded: 167 times

Not followed.

License: MIT license  

LTE IoT 9 Click is a compact add-on board containing a cellular IoT Module that supports 3GPP Release 14 and all LTE bands.

No Abuse Reported

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

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

Do you want to report abuse regarding "LTE IoT 9 click".

  • Information
  • Comments (0)

mikroSDK Library Blog


LTE IoT 9 click

LTE IoT 9 Click is a compact add-on board containing a cellular IoT Module that supports 3GPP Release 14 and all LTE bands.

lte_iot_9_click.png

click Product page


Click library

  • Author : Luka FIlipovic
  • Date : Feb 2021.
  • Type : UART type

Software Support

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

Standard key functions :

  • lteiot9_cfg_setup Config Object Initialization function.

    void lteiot9_cfg_setup ( lteiot9_cfg_t *cfg );
  • lteiot9_init Initialization function.

    LTEIOT9_RETVAL lteiot9_init ( lteiot9_t *ctx, lteiot9_cfg_t *cfg );
  • lteiot9_default_cfg Click Default Configuration function.

    void lteiot9_default_cfg ( lteiot9_t *ctx );

Example key functions :

  • lteiot9_generic_read Function reads a desired number of data bytes by using UART serial interface.

    err_t lteiot9_generic_read ( lteiot9_t *ctx, char *data_buf, uint16_t max_len );
  • lteiot9_send_cmd Function sends the specified command to the click module.

    void lteiot9_send_cmd ( lteiot9_t *ctx, char *cmd );
  • lteiot9_set_sim_apn Function sets APN for sim card.

    void lteiot9_set_sim_apn ( lteiot9_t *ctx, char *sim_apn );

Example Description

This application shows capability of LTE IoT 9 click board. It connects to network with standard "AT" commands, then sends SMS whit SIM card, and then logs GNNS data.

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;  /**< Logger config object. */
    lteiot9_cfg_t lteiot9_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 " );
    Delay_ms ( 1000 );

    // Click initialization.

    lteiot9_cfg_setup( &lteiot9_cfg );
    LTEIOT9_MAP_MIKROBUS( lteiot9_cfg, MIKROBUS_1 );
    err_t init_flag  = lteiot9_init( &lteiot9, &lteiot9_cfg );
    if ( init_flag == UART_ERROR ) {
        log_error( &logger, " Application Init Error. " );
        log_info( &logger, " Please, run program again... " );

        for ( ; ; );
    }

    log_info( &logger, " Power on device... " );
    lteiot9_default_cfg ( &lteiot9 );
    lteiot9_process(  );
    lteiot9_clear_app_buf(  );

    lteiot9_send_cmd_with_parameter( &lteiot9, LTEIOT9_CMD_CFUN, "1,1" );
    lteiot9_power_up_wait();    
    app_buf_len = 0;
    app_buf_cnt = 0;

    //AT
    lteiot9_send_cmd( &lteiot9, LTEIOT9_CMD_AT );
    app_error_flag = lteiot9_rsp_check();
    lteiot9_error_check( app_error_flag );
    Delay_ms ( 500 );
    //ATI
    lteiot9_send_cmd( &lteiot9, LTEIOT9_CMD_ATI );
    app_error_flag = lteiot9_rsp_check();
    lteiot9_error_check( app_error_flag );
    Delay_ms ( 500 );

    app_connection_status = CONFIGURATION_FOR_NETWORK;
    log_info( &logger, " Application Task " );
    Delay_ms ( 1000 );
    Delay_ms ( 1000 );
    Delay_ms ( 1000 );
    Delay_ms ( 1000 );
    Delay_ms ( 1000 );
}

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 )
    {
        case CONFIGURATION_FOR_NETWORK:
        {
            lteiot9_config_device_for_network( );
            break;
        }
        case CHECK_NETWORK_CONNECTION:
        {
            lteiot9_check_connection_to_network( );
            break;
        }
        case SENDING_SMS:
        {
            lteiot9_send_sms( );
            break;
        }
        case CONFIGURATION_FOR_GNSS:
        {
            lteiot9_config_device_for_gnss( );
            break;
        }
        case GNSS_DATA:
        {
            lteiot9_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 "vip.mobile", PHONE_NUMBER_TO_MESSAGE "999999999"

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

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

STSPIN220 click

0

STSPIN220 click is a stepper motor driver with the PWM current control and selectable microstepping up to 256 microsteps. It is based on the STSPIN220, a low voltage stepper motor driver from STSPIN2 series. It is optimized for battery-powered, low voltage motor driving applications, featuring the lowest standby current available on the market (max 80 nA). The STSPIN220 is a high-efficiency motor driver, featuring low ON resistance MOSFETs as the output stage, in a small 3x3mm QFN package. Its output stage implements the PWM current control with fixed OFF time, along with a full set of protection features. The device can be used with the step motor voltage ranging from 1.8V to 10V, and current up to 1.3A per bridge.

[Learn More]

USB SPI click - Example

0

This is a sample program which demonstrates the use of USB SPI click This device accepts commands from SPI Terminal and sends appropriate bytes via SPI interface. It is very desirable tool for designing SPI slave devices such as sensors...

[Learn More]

Ambient 3 click

0

Ambient 3 Click is calibrated XYZ chromatic smart lighting director, providing the measurement data in digital format over the I2C interface. It utilizes the AS7225, a miniature light sensor with UART and I2C interfaces. Packed in a small casing, this sensor can provide calibrated for life nano-optic sensor providing direct CIE1931 XYZ and CIE 1976 u’v’ coordinate mapping.

[Learn More]