BLE 9 click
BLE 9 Click is a fully embedded stand-alone Bluetooth 5.2 Energy connectivity module, equipped with the EFR32BG22 Series 2 Modules, an ultra-small, high-performing, standalone Bluetooth low energy module for easy integration of Bluetooth low energy connectivity (BLE) into various electronic devices. This module combines a high-performance Arm® Cortex®-M33 CPU microprocessor with FPU, and state-of-the-art power performance. Reliable and easy to use, BLE 9 click is a perfect solution for development of various IoT applications, smart home applications, BLE enabled toys, advanced robotics, and other similar applications.
click Product page
Click library
- Author : MikroE Team
- Date : Dec 2020.
- Type : UART type
Software Support
We provide a library for the BLE9 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 Ble9 Click driver.
Standard key functions :
ble9_cfg_setup
function initializes click configuration structure to initial values.
void ble9_cfg_setup(ble9_cfg_t *cfg)
Config Object Initialization function.
Click configuration structure definition.
Definition ble9.h:295
ble9_init
function initializes all necessary peripherals.
err_t ble9_init(ble9_t *ctx, ble9_cfg_t *cfg)
Initialization function.
Click ctx object definition.
Definition ble9.h:280
Example key functions :
ble9_adv_create_id
function creates adequate ID.
err_t ble9_adv_create_id(ble9_t *ctx)
Create an advertising ID. The handle of the created advertising ID is returned in response.
ble9_adv_start
function starts advertising.
ble9_adv_mode_discoverable_t
Definition ble9.h:195
ble9_adv_mode_connectable_t
Definition ble9.h:216
err_t ble9_adv_start(ble9_t *ctx, ble9_adv_mode_discoverable_t discover, ble9_adv_mode_connectable_t connect)
Start advertising of a given advertising set with specified discoverable and connectable modes....
Examples Description
This example demonstrates the use of BLE 9 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.
{
log_cfg_t log_cfg;
LOG_MAP_USB_UART( log_cfg );
log_init( &logger, &log_cfg );
log_info( &logger, "---- Application Init ----" );
Delay_ms ( 100 );
Delay_ms ( 1000 );
ble9_process ( &ble9 );
ble9_clear_app_buf( );
Delay_ms ( 100 );
{
log_printf( &logger, "--- System Version ---\r\n" );
log_printf( &logger, " Major: 0x%.4X\r\n", ble9.ble9_version.version_major );
log_printf( &logger, " Minor: 0x%.4X\r\n", ble9.ble9_version.version_minor );
log_printf( &logger, " Patch: 0x%.4X\r\n", ble9.ble9_version.version_patch );
log_printf( &logger, " Build: 0x%.4X\r\n", ble9.ble9_version.version_build );
log_printf( &logger, " Bootloader: 0x%.8LX\r\n", ble9.ble9_version.version_bootloader );
log_printf( &logger, " Hash: 0x%.8LX\r\n", ble9.ble9_version.version_hash );
log_printf( &logger, "------------------------\r\n" );
}
log_printf( &logger, "Creating advertising point...\r\n" );
Delay_ms ( 100 );
log_printf( &logger, "Starting module advertising...\r\n" );
Delay_ms ( 100 );
log_printf( &logger, "The module has been configured.\r\n" );
Delay_ms ( 100 );
}
#define BLE9_OK
Definition ble9.h:74
@ BLE9_ADVERTISER_MODE_DISCOVERABLE_GENERAL
Device is not discoverable in either limited or generic discovery procedure but may be discovered usi...
Definition ble9.h:203
@ BLE9_ADVERTISER_MODE_CONNECTABLE_SCANNABLE
Undirected scannable (Non-connectable but responds to scan requests)
Definition ble9.h:224
#define BLE9_MAP_MIKROBUS(cfg, mikrobus)
Definition ble9.h:65
err_t ble9_sys_get_version(ble9_t *ctx)
Get the firmware version information.
void application_init(void)
Definition main.c:68
Application Task
Reads and processes all incoming data and displays them on the USB UART.
{
ble9_process ( &ble9 );
if ( app_buf_len > 0 )
{
for ( uint16_t cnt = 0; cnt < app_buf_len; cnt++ )
{
log_printf( &logger, "%.2X ", ( uint16_t ) app_buf[ cnt ] );
}
ble9_clear_app_buf( );
}
}
void application_task(void)
Definition main.c:123
Note
For more information on the chip itself and the firmware on it,
please visit the following page:
[1] https://docs.silabs.com/bluetooth/3.1
- Take into condideration that the library itself
is designed to work with GSDK version 3.1.0
If you wish to use a different version of firmware,
take into consideration that some functions might not work.
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.Ble9
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.