Skip to content

Bluetooth/MiraMesh multi stack support

Support for Bluetooth low energy in parallel with MiraMesh network on the nRF52 platform.

The Bluetooth/Mira multi stack support makes it possible to have a connection to devices from a mobile phone while the devices still are connected to the MiraMesh network. Making it possible to reconfigure devices on the fly.

Usage

To use the multi-stack support, look at the ble example available in the distribution.

Bluetooth functionality is available using the nRF5 SoftDevice API. For API documentation, refer to Nordic documentation:

An API to MiraMesh is available for registering an event handler.

Resource sharing

Bluetooth and MiraMesh shares the same radio, which means that increased bluetooth activity will reduce performance of the MiraMesh network. Therefore, only bluetooth modes with low radio usage is supported.

Also note that Bluetooth may increase power consumption.

Types

mira_nrf_ble_event_handler_t

typedef void(* mira_nrf_ble_event_handler_t) (void);

Event handler callback for nrf52 softdevice BLE events.

The event handler should poll for ble events using sd_ble_evt_get()

Enums

mira_nrf_lfclk_source_t

Source select for nRF low frequency oscillator

Name Description
MIRA_NRF_LFCLK_CRYSTAL
MIRA_NRF_LFCLK_EXTERNAL_SOURCE_BYPASS_ENABLED
MIRA_NRF_LFCLK_EXTERNAL_SOURCE_BYPASS_DISABLED

Structs

mira_nrf_clk_config_t

Clock configuration struct for nRF

Name Type Description
lfclk_source mira_nrf_lfclk_source_t

Functions

mira_nrf_clk_init

void mira_nrf_clk_init(mira_nrf_clk_config_t *source);

Clock initialization for the nRF platform.

Can only be called once on startup, in the reset handler.

mira_nrf_ble_event_handler_register

mira_status_t mira_nrf_ble_event_handler_register(mira_nrf_ble_event_handler_t evt_handler);

Register event handler for nRF52 softdevice BLE events.

Parameters

Name Description
evt_handler event handler