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 (137139 times)
  2. FAT32 Library (70243 times)
  3. Network Ethernet Library (56133 times)
  4. USB Device Library (46450 times)
  5. Network WiFi Library (42109 times)
  6. FT800 Library (41410 times)
  7. GSM click (29125 times)
  8. mikroSDK (26569 times)
  9. PID Library (26511 times)
  10. microSD click (25507 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 6 click

Rating:

0

Author: MIKROE

Last Updated: 2024-04-03

Package Version: 2.1.0.11

mikroSDK Library: 2.0.0.0

Category: LTE IoT

Downloaded: 157 times

Not followed.

License: MIT license  

LTE IoT 6 Click is a compact add-on board that contains an IoT module with worldwide coverage.

No Abuse Reported

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

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

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

  • Information
  • Comments (0)

mikroSDK Library Blog


LTE IoT 6 click

LTE IoT 6 Click is a compact add-on board that contains an IoT module with worldwide coverage. This board features the SARA-R412M, a cellular module that offers multi-band data transmissions for Low Power Wide Area solutions in a compact form factor from u-Blox.

lteiot6_click.png

click Product page


Click library

  • Author : Luka Filipovic
  • Date : Nov 2020.
  • Type : UART GPS/GNSS type

Software Support

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

Standard key functions :

  • lteiot6_cfg_setup Config Object Initialization function.

    void lteiot6_cfg_setup ( lteiot6_cfg_t *cfg );
  • lteiot6_init Initialization function.

    lteiot6_RETVAL lteiot6_init ( lteiot6_t *ctx, lteiot6_cfg_t *cfg );
  • lteiot6_default_cfg Click Default Configuration function.

    void lteiot6_default_cfg ( lteiot6_t *ctx );

Example key functions :

  • lteiot6_send_cmd Send command function.

    void lteiot6_send_cmd ( lteiot6_t *ctx, char *cmd );
  • lteiot6_set_sim_apn Set SIM APN.

    void lteiot6_set_sim_apn ( lteiot6_t *ctx, char *sim_apn );
  • lteiot6_send_sms_pdu Send SMS message to number in pdu mode.

    err_t lteiot6_send_sms_pdu ( lteiot6_t *ctx, char *service_center_number, char *phone_number, char *sms_text );

Examples 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;  /**< Logger config object. */
    lteiot6_cfg_t lteiot6_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 );
    Delay_ms ( 1000 );
    log_info( &logger, " Application Init " );
    Delay_ms ( 1000 );

    // Click initialization.
    lteiot6_cfg_setup( &lteiot6_cfg );
    LTEIOT6_MAP_MIKROBUS( lteiot6_cfg, MIKROBUS_1 );
    err_t init_flag  = lteiot6_init( &lteiot6, &lteiot6_cfg );
    if ( init_flag == UART_ERROR ) 
    {
        log_error( &logger, " Application Init Error. " );
        log_info( &logger, " Please, run program again... " );

        for ( ; ; );
    }
    lteiot6_process();
    lteiot6_clear_app_buf(); 
    app_buf_len = 0;
    app_buf_cnt = 0;

    lteiot6_reset( &lteiot6 );
    lteiot6_power_on( &lteiot6 );

    //Check communication
    lteiot6_send_cmd( &lteiot6, LTEIOT6_CMD_AT );
    error_flag = lteiot6_rsp_check();
    lteiot6_error_check( error_flag );

    //Check fw version
    lteiot6_send_cmd( &lteiot6, LTEIOT6_CMD_ATI );
    error_flag = lteiot6_rsp_check();
    lteiot6_error_check( error_flag );

    log_info( &logger, " Application Task " );
    example_state = LTEIOT6_CONFIGURE_FOR_CONNECTION;
}

Application Task

Application taks is split in few stages:

  • LTEIOT6_CONFIGURE_FOR_CONNECTION: Sets configuration to device to be able to connect to newtork.
  • LTEIOT6_WAIT_FOR_CONNECTION:

    Checks device response untill device sends information that it is connected to network.

  • LTEIOT6_CHECK_CONNECTION:

    Checks device connection status parameters.

  • LTEIOT6_CONFIGURE_FOR_MESSAGES:

    Sets configuration to device to send SMS messages.

  • LTEIOT6_MESSAGES:

    Sends message in selected mode (PDU/TXT).


void application_task ( void ) 
{
    switch ( example_state )
    {
        case LTEIOT6_CONFIGURE_FOR_CONNECTION:
        {
            if ( LTEIOT6_OK == lteiot6_configure_for_connection( ) )
            {
                example_state = LTEIOT6_WAIT_FOR_CONNECTION;
            }
            break;
        }
        case LTEIOT6_WAIT_FOR_CONNECTION:
        {
            if ( LTEIOT6_OK == lteiot6_check_connection( ) )
            {
                example_state = LTEIOT6_CHECK_CONNECTION;
            }
            break;
        }
        case LTEIOT6_CHECK_CONNECTION:
        {
            Delay_ms ( 1000 );
            if ( LTEIOT6_OK == lteiot6_check_connection_parameters( ) )
            {
                example_state = LTEIOT6_CONFIGURE_FOR_MESSAGES;
            }
            Delay_ms ( 1000 );
            break;
        }
        case LTEIOT6_CONFIGURE_FOR_MESSAGES:
        {
            if ( LTEIOT6_OK == lteiot6_configure_for_meesages( ) )
            {
                example_state = LTEIOT6_MESSAGES;
            }
            Delay_ms ( 1000 );
            break;
        }
        case LTEIOT6_MESSAGES:
        {
            lteiot6_send_meesage();
            Delay_ms ( 1000 );
            break;
        }
        default:
        {
            log_error( &logger, " Example state." );
            break;
        }
    }
}

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", PHONE_NUMBER_TO_MESSAGE "999999999"

The full application code, and ready to use projects can be installed directly form compilers IDE(recommneded) or found on LibStock page or mikroE GitHub accaunt.

Other mikroE Libraries used in the example:

  • MikroSDK.Board
  • MikroSDK.Log
  • Click.LTEIoT6

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. The terminal available in all Mikroelektronika compilers, or any other terminal application of your choice, can be used to read the message.


ALSO FROM THIS AUTHOR

H-Bridge 2 click

5

H-Bridge 2 click can be used to drive a motor by utilizing a specific configuration of the output stage MOSFETs, known as the H-bridge. This configuration enables H-Bridge 2 click to drive a motor with up to 1.2A and 15V, providing control of the speed and direction, as well as the dynamic (rheostatic) braking capability.

[Learn More]

Haptic 4 click

0

Haptic 4 Click is a compact add-on board that enables precise haptic feedback in various electronic projects. This board features the DA7280, a haptic driver designed to drive linear resonant actuator (LRA) and eccentric rotating mass (ERM) actuators from Renesas. The DA7280 boasts a differential output drive and continuous motion sensing for calibration-free operation, coupled with wide-band support to leverage the capabilities of modern LRAs. It supports six independent haptic sequences activated directly via mikroBUS™ pins or externally through I2C or PWM signals, offering extensive flexibility for haptic configuration. Ideal for enhancing user experience in wearables, electronic peripherals, automotive interfaces, industrial controls, and AR/VR controllers, this Click board™ opens new possibilities for interactive and tactile-responsive technology.

[Learn More]

Barometer 12 click

0

Barometer 12 Click is a compact add-on board that measures air pressure in a specific environment. This board features the ICP-10125, a high-accuracy, low-power, 10-atm waterproof barometric pressure and temperature sensor from TDK InvenSense.

[Learn More]