ble9  2.0.0.0
Main Page

BLE 9 click

BLE 9 Click is a compact add-on board that provides BT/BLE connectivity for any embedded application. This board features the BGM220P, an RF performance Bluetooth Low Energy solution for IoT developers from Silicon Labs. Based on the EFR32BG22 SoC, the BGM220P enables Bluetooth Low-Energy (BLE) connectivity while delivering RF range and performance, firmware updates, enhanced security features, and low power consumption. It is optimized for wireless performance supporting Bluetooth 5.2, direction-finding, and Bluetooth Mesh Low Power Node protocols to deliver industry-leading accuracy.

click Product page


Click library

  • Author : Strahinja Jacimovic
  • Date : Dec 2020.
  • Type : UART GSM/IOT 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 :

Example key functions :

Examples Description

This example reads and processes data from BLE 9 clicks.

The demo application is composed of two sections :

Application Init

Initializes driver and sets up adequate module ID, as well as starting module advertizing. Once in this state, the module can be connected to and communicated with.

void application_init ( void )
{
log_cfg_t log_cfg;
// Logger initialization.
LOG_MAP_USB_UART( log_cfg );
log_cfg.level = LOG_LEVEL_DEBUG;
log_cfg.baud = 115200;
log_init( &logger, &log_cfg );
log_info( &logger, "---- Application Init ----" );
Delay_ms( 100 );
// Click initialization.
ble9_cfg_setup( &cfg );
BLE9_MAP_MIKROBUS( cfg, MIKROBUS_1 );
ble9_init( &ble9, &cfg );
log_printf( &logger, "Creating advertising point...\n" );
Delay_ms( 100 );
log_printf( &logger, "Starting module advertizing...\n" );
Delay_ms( 100 );
log_printf( &logger, "The module has been configured.\n" );
Delay_ms( 100 );
}

Application Task

Reads received data.

void application_task ( void )
{
ble9_process( );
}

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.

BLE9_ADVERTISER_MODE_DISCOVERABLE_GENERAL
@ BLE9_ADVERTISER_MODE_DISCOVERABLE_GENERAL
Device is not discoverable in either limited or generic discovery procedure but may be discovered usi...
Definition: ble9.h:187
ble9_cfg_setup
void ble9_cfg_setup(ble9_cfg_t *cfg)
Config Object Initialization function.
ble9_init
BLE9_RETVAL ble9_init(ble9_t *ctx, ble9_cfg_t *cfg)
Initialization function.
ble9_advertiser_start
BLE9_RETVAL ble9_advertiser_start(ble9_t *ctx, ble9_advertiser_mode_discoverable_t discover, ble9_advertiser_mode_connectable_t connect)
Start advertising of a given advertising set with specified discoverable and connectable modes....
application_task
void application_task(void)
Definition: main.c:130
BLE9_RETVAL
#define BLE9_RETVAL
Definition: ble9.h:60
ble9_cfg_t
Click configuration structure definition.
Definition: ble9.h:274
BLE9_MAP_MIKROBUS
#define BLE9_MAP_MIKROBUS(cfg, mikrobus)
Definition: ble9.h:51
ble9_t
Click ctx object definition.
Definition: ble9.h:260
ble9_advertiser_create_id
BLE9_RETVAL ble9_advertiser_create_id(ble9_t *ctx)
Create an advertising ID. The handle of the created advertising ID is returned in response.
application_init
void application_init(void)
Definition: main.c:97
BLE9_ADVERTISER_MODE_CONNECTABLE_SCANNABLE
@ BLE9_ADVERTISER_MODE_CONNECTABLE_SCANNABLE
Undirected scannable (Non-connectable but responds to scan requests)
Definition: ble9.h:207