NimBLE-Arduino 2.1.2
Loading...
Searching...
No Matches
ble_hs_cfg Struct Reference

Bluetooth Host main configuration structure. More...

#include <ble_hs.h>

Public Attributes

ble_gatt_register_fn * gatts_register_cb
 
void * gatts_register_arg
 
uint8_t sm_io_cap
 
unsigned sm_oob_data_flag:1
 Security Manager OOB flag.
 
unsigned sm_bonding:1
 Security Manager Bond flag.
 
unsigned sm_mitm:1
 Security Manager MITM flag.
 
unsigned sm_sc:1
 Security Manager Secure Connections flag.
 
unsigned sm_keypress:1
 Security Manager Key Press Notification flag.
 
uint8_t sm_our_key_dist
 Security Manager Local Key Distribution Mask.
 
uint8_t sm_their_key_dist
 Security Manager Remote Key Distribution Mask.
 
ble_hs_reset_fnreset_cb
 Stack reset callback.
 
ble_hs_sync_fnsync_cb
 Stack sync callback.
 
ble_store_read_fn * store_read_cb
 
ble_store_write_fn * store_write_cb
 
ble_store_delete_fn * store_delete_cb
 
ble_store_status_fn * store_status_cb
 Storage Status callback.
 
void * store_status_arg
 

Detailed Description

Bluetooth Host main configuration structure.

Those can be used by application to configure stack.

The only reason Security Manager (sm_ members) is configurable at runtime is to simplify security testing. Defaults for those are configured by selecting proper options in application's syscfg.

Member Data Documentation

◆ gatts_register_arg

void* ble_hs_cfg::gatts_register_arg

An optional argument that gets passed to the GATT registration callback.

◆ gatts_register_cb

ble_gatt_register_fn* ble_hs_cfg::gatts_register_cb

An optional callback that gets executed upon registration of each GATT resource (service, characteristic, or descriptor).

◆ reset_cb

ble_hs_reset_fn* ble_hs_cfg::reset_cb

Stack reset callback.

This callback is executed when the host resets itself and the controller due to fatal error.

◆ sm_bonding

unsigned ble_hs_cfg::sm_bonding

Security Manager Bond flag.

If set proper flag in Pairing Request/Response will be set. This results in storing keys distributed during bonding.

◆ sm_io_cap

uint8_t ble_hs_cfg::sm_io_cap

Security Manager Local Input Output Capabilities

◆ sm_keypress

unsigned ble_hs_cfg::sm_keypress

Security Manager Key Press Notification flag.

Currently unsupported and should not be set.

◆ sm_mitm

unsigned ble_hs_cfg::sm_mitm

Security Manager MITM flag.

If set proper flag in Pairing Request/Response will be set. This results in requiring Man-In-The-Middle protection when pairing.

◆ sm_oob_data_flag

unsigned ble_hs_cfg::sm_oob_data_flag

Security Manager OOB flag.

If set proper flag in Pairing Request/Response will be set.

◆ sm_sc

unsigned ble_hs_cfg::sm_sc

Security Manager Secure Connections flag.

If set proper flag in Pairing Request/Response will be set. This results in using LE Secure Connections for pairing if also supported by remote device. Fallback to legacy pairing if not supported by remote.

◆ store_delete_cb

ble_store_delete_fn* ble_hs_cfg::store_delete_cb

Storage Delete callback handles deletion of security material

◆ store_read_cb

ble_store_read_fn* ble_hs_cfg::store_read_cb

Storage Read callback handles read of security material

◆ store_status_arg

void* ble_hs_cfg::store_status_arg

An optional argument that gets passed to the storage status callback.

◆ store_status_cb

ble_store_status_fn* ble_hs_cfg::store_status_cb

Storage Status callback.

This callback gets executed when a persistence operation cannot be performed or a persistence failure is imminent. For example, if is insufficient storage capacity for a record to be persisted, this function gets called to give the application the opportunity to make room.

◆ store_write_cb

ble_store_write_fn* ble_hs_cfg::store_write_cb

Storage Write callback handles write of security material

◆ sync_cb

ble_hs_sync_fn* ble_hs_cfg::sync_cb

Stack sync callback.

This callback is executed when the host and controller become synced. This happens at startup and after a reset.