TOP Contributors

  1. MIKROE (2658 codes)
  2. Alcides Ramos (356 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 (136938 times)
  2. FAT32 Library (70059 times)
  3. Network Ethernet Library (56015 times)
  4. USB Device Library (46330 times)
  5. Network WiFi Library (41942 times)
  6. FT800 Library (41264 times)
  7. GSM click (29050 times)
  8. mikroSDK (26463 times)
  9. PID Library (26440 times)
  10. microSD click (25398 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

ANNA-B412 click

Rating:

0

Author: MIKROE

Last Updated: 2024-04-03

Package Version: 2.1.0.4

mikroSDK Library: 2.0.0.0

Category: BT/BLE

Downloaded: 40 times

Not followed.

License: MIT license  

ANNA-B412 Click is a compact add-on board that provides BT/BLE connectivity for any embedded application. This board features the ANNA-B412, a standalone Bluetooth 5.1 low-energy module from u-blox. It is a System-in-Package (SiP) design with pre-flashed u-connectXpress software, which supports Bluetooth LE Serial port service, GATT client and server, Bluetooth beacons, Bluetooth long-range, NFC, and simultaneous peripheral and central roles. The Bluetooth module in LE mode can achieve up to 2Mbps data rates.

No Abuse Reported

Do you want to subscribe in order to receive notifications regarding "ANNA-B412 click" changes.

Do you want to unsubscribe in order to stop receiving notifications regarding "ANNA-B412 click" changes.

Do you want to report abuse regarding "ANNA-B412 click".

  • Information
  • Comments (0)

mikroSDK Library Blog


ANNA-B412 click

ANNA-B412 Click is a compact add-on board that provides BT/BLE connectivity for any embedded application. This board features the ANNA-B412, a standalone Bluetooth 5.1 low-energy module from u-blox. It is a System-in-Package (SiP) design with pre-flashed u-connectXpress software, which supports Bluetooth LE Serial port service, GATT client and server, Bluetooth beacons, Bluetooth long-range, NFC, and simultaneous peripheral and central roles. The Bluetooth module in LE mode can achieve up to 2Mbps data rates.

annab412_click.png

click Product page


Click library

  • Author : Nenad Filipovic
  • Date : Jul 2023.
  • Type : UART type

Software Support

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

Standard key functions :

  • annab412_cfg_setup Config Object Initialization function.

    void annab412_cfg_setup ( annab412_cfg_t *cfg );
  • annab412_init Initialization function.

    err_t annab412_init ( annab412_t *ctx, annab412_cfg_t *cfg );
  • annab412_default_cfg Click Default Configuration function.

    err_t annab412_default_cfg ( annab412_t *ctx );

Example key functions :

  • annab412_set_cmd_conn_mode ANNA-B412 set connectability mode function.

    err_t annab412_set_cmd_conn_mode ( annab412_t *ctx, uint8_t mode );
  • annab412_set_cmd_discover_mode ANNA-B412 set discoverability mode function.

    err_t annab412_set_cmd_discover_mode ( annab412_t *ctx, uint8_t mode );
  • annab412_set_cmd_device_name ANNA-B412 set device name function.

    err_t annab412_set_cmd_device_name ( annab412_t *ctx, char *device_name );

Example Description

This example demonstrates the use of ANNA-B412 click board by processing the incoming data and displaying them on the USB UART.

The demo application is composed of two sections :

Application Init

Initializes the driver and performs the click default configuration.

void application_init ( void ) 
{
    log_cfg_t log_cfg;  /**< Logger config object. */
    annab412_cfg_t annab412_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.
    annab412_cfg_setup( &annab412_cfg );
    ANNAB412_MAP_MIKROBUS( annab412_cfg, MIKROBUS_1 );
    if ( UART_ERROR == annab412_init( &annab412, &annab412_cfg ) ) 
    {
        log_error( &logger, " Communication init." );
        for ( ; ; );
    }

    if ( ANNAB412_ERROR == annab412_default_cfg ( &annab412 ) )
    {
        log_error( &logger, " Default configuration." );
        for ( ; ; );
    }
    Delay_ms ( 1000 );

    annab412_set_cmd_echo_on( &annab412 );
    annab412_display_rsp( RSP_OK );
    Delay_ms ( 100 );

    annab412_set_cmd_device_name( &annab412, DEVICE_NAME );
    annab412_display_rsp( RSP_OK );
    Delay_ms ( 100 );

    annab412_set_cmd_discover_mode( &annab412, ANNAB412_DISCOVERABLE_MODE_ON );
    annab412_display_rsp( RSP_OK );
    Delay_ms ( 100 );

    annab412_set_cmd_enter_mode( &annab412, ANNAB412_ENTER_MODE_DATA );
    annab412_display_rsp( RSP_OK );
    Delay_ms ( 100 );

    annab412_set_dsr_pin( &annab412, ANNAB412_PIN_STATE_LOW );
    Delay_ms ( 100 );
}

Application Task

Reads and processes all incoming data and displays them on the USB UART.

void application_task ( void ) 
{
    annab412_process( &annab412 );
    if ( app_buf_len > 0 ) 
    {
        log_printf( &logger, "%s", app_buf );
        annab412_clear_app_buf( );
    }
}

Note

We have used the BLE Scanner smartphone application for the test.

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

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

LTE IoT 3 Click

5

LTE IoT 3 Click is a compact add-on board that contains a Low Power Wide Area (LPWA) Wireless IoT module that allows connections to the LTE, NB-IoT, and 2G networks. This board features the EXS82-W, LTE-IoT Wireless Module from Thales that offers a rich set of Internet protocols and industry-standard interfaces such as UART, USB, etc.

[Learn More]

POT 4 click

0

POT 4 Click is a compact add-on board with accurate selectable reference voltage output. This board features the PRS11R-425F-S103B1, a high-quality 11mm rotary 10k potentiometer from Bourns. The PRS11R-425F-S103B1 features a small form factor, offers an push-on momentary switch, a flatted shaft style, and a wide operating temperature range. It comes with a high-resolution 12-bit ADC, detecting even the slightest move while digitizing its position, alongside a rail-to-rail buffering operational amplifier, which provides constant input and output impedance. Besides, the user can process the output signal in analog or digital form.

[Learn More]

3D Hall 9 click

0

3D Hall 9 Click is a compact add-on board used to detect the strength of a magnetic field in all three dimensions. This board features the ALS31300, a 3D linear Hall-effect sensor with digital output and advanced low power management from Allegro Microsystems. The ALS31300 features an I2C interface, enabling it to be easily configured by MCU with the measurement data provided in digital format of 12-bits corresponding to the magnetic field measured in each X, Y, and Z axes.

[Learn More]