TOP Contributors

  1. MIKROE (2762 codes)
  2. Alcides Ramos (374 codes)
  3. Shawon Shahryiar (307 codes)
  4. jm_palomino (118 codes)
  5. Bugz Bensce (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 (139248 times)
  2. FAT32 Library (71743 times)
  3. Network Ethernet Library (57115 times)
  4. USB Device Library (47428 times)
  5. Network WiFi Library (43082 times)
  6. FT800 Library (42403 times)
  7. GSM click (29835 times)
  8. mikroSDK (28073 times)
  9. PID Library (26885 times)
  10. microSD click (26198 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

NanoBeacon Click

Rating:

0

Author: MIKROE

Last Updated: 2024-10-31

Package Version: 2.1.0.6

mikroSDK Library: 2.0.0.0

Category: BT/BLE

Downloaded: 112 times

Not followed.

License: MIT license  

NanoBeacon Click is a compact add-on board that provides a powerful and efficient Bluetooth beacon solution. This board features the IN100, an ultra-low power Bluetooth 5.3 Beacon SoC from InPlay, that sets a new standard in beacon technology. Its ultra-low power consumption, enhanced privacy mode, and three beacon modes offer seamless compatibility with no Bluetooth programming required - plug and play. Its compact design houses two types of built-in memory (4Kb OTP and 4KB SRAM), UART and I2C interfaces, and a hardware security engine.

No Abuse Reported

Do you want to subscribe in order to receive notifications regarding "NanoBeacon Click" changes.

Do you want to unsubscribe in order to stop receiving notifications regarding "NanoBeacon Click" changes.

Do you want to report abuse regarding "NanoBeacon Click".

  • Information
  • Comments (0)

mikroSDK Library Blog


NanoBeacon Click

NanoBeacon Click is a compact add-on board that provides a powerful and efficient Bluetooth beacon solution. This board features the IN100, an ultra-low power Bluetooth 5.3 Beacon SoC from InPlay, that sets a new standard in beacon technology. Its ultra-low power consumption, enhanced privacy mode, and three beacon modes offer seamless compatibility with no Bluetooth programming required - plug and play. Its compact design houses two types of built-in memory (4Kb OTP and 4KB SRAM), UART and I2C interfaces, and a hardware security engine.

nanobeacon_click.png

Click Product page


Click library

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

Software Support

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

Standard key functions :

  • nanobeacon_cfg_setup Config Object Initialization function.

    void nanobeacon_cfg_setup ( nanobeacon_cfg_t *cfg );
  • nanobeacon_init Initialization function.

    err_t nanobeacon_init ( nanobeacon_t *ctx, nanobeacon_cfg_t *cfg );

Example key functions :

  • nanobeacon_set_advertising This function sets the device MAC address, interval and advertising raw data.

    err_t nanobeacon_set_advertising ( uint8_t *mac_address, uint16_t interval, uint8_t *adv_raw_data, uint8_t len );
  • nanobeacon_load_adv_to_ram This function loads advertising data to RAM.

    err_t nanobeacon_load_adv_to_ram ( nanobeacon_t *ctx );
  • nanobeacon_start_advertising This function starts the advertising.

    err_t nanobeacon_start_advertising ( nanobeacon_t *ctx );

Example Description

This example demonstrates the use of NanoBeacon Click board by setting the Eddystone URI advertisement to Click boards webpage.

The demo application is composed of two sections :

Application Init

Initializes the driver and logger.


void application_init ( void )
{
    log_cfg_t log_cfg;  /**< Logger config object. */
    nanobeacon_cfg_t nanobeacon_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.
    nanobeacon_cfg_setup( &nanobeacon_cfg );
    NANOBEACON_MAP_MIKROBUS( nanobeacon_cfg, MIKROBUS_1 );
    if ( UART_ERROR == nanobeacon_init( &nanobeacon, &nanobeacon_cfg ) ) 
    {
        log_error( &logger, " Communication init." );
        for ( ; ; );
    }

    log_info( &logger, " Application Task " );
}

Application Task

Every 10 seconds, it restarts and configures the device for advertisement with the Eddystone URI beacon format set to Click boards webpage: https://www.mikroe.com/click

void application_task ( void )
{
    // The device MAC address for advertisement
    static uint8_t mac_address[ 6 ] = { 0x01, 0x02, 0x03, 0x04, 0x05, 0x06 };

    // Eddystone advertisement raw data
    static uint8_t eddystone_adv_raw[ ] = 
    { 
        0x03, // Length of Service List
        0x03, // Param: Service List
        0xAA, 0xFE, // Eddystone ID
        0x12, // Length of Service Data
        0x16, // Service Data
        0xAA, 0xFE, // Eddystone ID
        0x10, // Frame type: URL
        0x00, // Power
        0x01, // https://www.
        'm','i','k','r','o','e', 
        0x00, // .com/
        'c','l','i','c','k' 
    };
    log_printf( &logger, "\r\n Restart device\r\n" );
    nanobeacon_restart_device ( &nanobeacon );

    while ( NANOBEACON_OK != nanobeacon_check_communication ( &nanobeacon ) )
    {
        log_error( &logger, " Check communication." );
        Delay_ms ( 1000 );
    }
    log_printf( &logger, " Configure device for advertisement\r\n" );
    if ( NANOBEACON_OK != nanobeacon_set_advertising ( mac_address, 1000, eddystone_adv_raw, 
                                                       sizeof( eddystone_adv_raw ) ) )
    {
        log_error( &logger, " Set advertising." );
    }

    if ( NANOBEACON_OK != nanobeacon_load_adv_to_ram( &nanobeacon ) )
    {
        log_error( &logger, " Load data to RAM." );
    }

    log_printf( &logger, " Start advertising\r\n" );
    if ( NANOBEACON_OK != nanobeacon_start_advertising ( &nanobeacon ) )
    {
        log_error( &logger, " Start advertising." );
    }    
    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 );
}

Note

During advertising, the Click board should appear as an Eddystone URI beacon on the BLE Scanner application.

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

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

Barometer 10 Click

0

Barometer 10 Click is a compact add-on board that measures air pressure in a specific environment. This board features the LPS28DFW, an ultra-compact piezoresistive absolute pressure sensor that functions as a digital output barometer from STMicroelectronics. The LPS28DFW comprises a sensing element and an IC chip for signal processing in one package, converts pressure into a 24-bit digital value, and sends the information via I2C serial interface. It has a selectable dual full-scale absolute pressure range of up to 1260hPa and 4060hPa, with an absolute pressure accuracy of 0.5hPa over a wide operating temperature range.

[Learn More]

Temp-Hum 13 click

10

Temp&amp;Hum 13 Click is a Click board which is perfectly suited for measuring the relative humidity (RH) and temperature. The Click boardâ„¢ is equipped with the HTU21DF, an accurate and reliable sensor IC, packed in a miniature 3x3mm DFN package.

[Learn More]

Stepper 4 Click

0

Stepper 4 Click is a very versatile bipolar stepping motor driver. It features TB67S269FTG IC, fabricated with the BiCD process, allowing the Click board™ to handle significant voltage and current levels up to 35V and 1.2A. This IC has the integrated translator section, used to simplify the control: using simple step control inputs from the host MCU, the stepper motor can be driven in both directions, with the predetermined step sizes from the full step, up to 1/32 step.

[Learn More]