BLE Peer Manager Peripheral#
Peer Manager for Bluetooth Low Energy. Responsible for advertising and creating connections. The user can set the advertising parameters.
Functions#
Macros#
Function Documentation#
ble_peer_manager_peripheral_init#
void ble_peer_manager_peripheral_init (void )
N/A |
Initialize the Peer Manager.
Set default values for advertiser, set state to IDLE and create an emtpy connection array.
47
of file common/ble_peer_manager/peripheral/inc/ble_peer_manager_peripheral.h
ble_peer_manager_peripheral_set_advertiser#
sl_status_t ble_peer_manager_peripheral_set_advertiser (sl_bt_advertiser_discovery_mode_t adv_discovery_mode)
[in] | adv_discovery_mode | Advertising discovery mode. Should be one of the following:
|
Set advertiser parameters.
Set the advertiser parameters if the Peer Manager is in IDLE state. Call this function before starting the advertiser.
67
of file common/ble_peer_manager/peripheral/inc/ble_peer_manager_peripheral.h
ble_peer_manager_peripheral_create_connection#
sl_status_t ble_peer_manager_peripheral_create_connection (void )
N/A |
Create a central connection.
The Peer Manager will start the advertiser. If a connection opened event is received, and the advertising handle is the same as in the sl_bt_legacy_advertiser_start() function, the Peer Manager will stop the advertiser and save the connection.
79
of file common/ble_peer_manager/peripheral/inc/ble_peer_manager_peripheral.h
ble_peer_manager_peripheral_start_advertising#
sl_status_t ble_peer_manager_peripheral_start_advertising (uint8_t advertising_handle)
[in] | advertising_handle | Advertising handle to use for advertising. |
Start advertising.
If handle is SL_BT_INVALID_ADVERTISING_SET_HANDLE the peer manager will create an advertising handle and generate data using the default value for discovery mode, or the value that was set using the ble_peer_manager_peripheral_set_advertiser() function and the default value for advertiser timing. If the handle is not invalid, it will use the given handle to start advertising.
95
of file common/ble_peer_manager/peripheral/inc/ble_peer_manager_peripheral.h
ble_peer_manager_peripheral_stop_advertising#
sl_status_t ble_peer_manager_peripheral_stop_advertising (uint8_t advertising_handle)
[in] | advertising_handle | Advertising handle to stop. |
Stop advertising.
104
of file common/ble_peer_manager/peripheral/inc/ble_peer_manager_peripheral.h
ble_peer_manager_peripheral_close_connection#
sl_status_t ble_peer_manager_peripheral_close_connection (uint8_t conn_handle)
[in] | conn_handle | Connection handle of the connection which needs to be closed. |
Close connection.
115
of file common/ble_peer_manager/peripheral/inc/ble_peer_manager_peripheral.h
Macro Definition Documentation#
BLE_PEER_MANAGER_PERIPHERAL_CONFIG_DEFAULT_ADV_DISCOVERY_MODE#
#define BLE_PEER_MANAGER_PERIPHERAL_CONFIG_DEFAULT_ADV_DISCOVERY_MODEValue:
sl_bt_advertiser_general_discoverable
47
of file common/ble_peer_manager/peripheral/config/ble_peer_manager_peripheral_config.h
BLE_PEER_MANAGER_PERIPHERAL_CONFIG_DEFAULT_ADV_CONNECTION_MODE#
#define BLE_PEER_MANAGER_PERIPHERAL_CONFIG_DEFAULT_ADV_CONNECTION_MODEValue:
sl_bt_legacy_advertiser_connectable
57
of file common/ble_peer_manager/peripheral/config/ble_peer_manager_peripheral_config.h
BLE_PEER_MANAGER_PERIPHERAL_CONFIG_ADV_TIMING_INTERVAL_MIN#
#define BLE_PEER_MANAGER_PERIPHERAL_CONFIG_ADV_TIMING_INTERVAL_MINValue:
160
66
of file common/ble_peer_manager/peripheral/config/ble_peer_manager_peripheral_config.h
BLE_PEER_MANAGER_PERIPHERAL_CONFIG_ADV_TIMING_INTERVAL_MAX#
#define BLE_PEER_MANAGER_PERIPHERAL_CONFIG_ADV_TIMING_INTERVAL_MAXValue:
160
75
of file common/ble_peer_manager/peripheral/config/ble_peer_manager_peripheral_config.h
BLE_PEER_MANAGER_PERIPHERAL_CONFIG_ADV_TIMING_DURATION#
#define BLE_PEER_MANAGER_PERIPHERAL_CONFIG_ADV_TIMING_DURATIONValue:
0
87
of file common/ble_peer_manager/peripheral/config/ble_peer_manager_peripheral_config.h
BLE_PEER_MANAGER_PERIPHERAL_CONFIG_ADV_TIMING_MAX_EVENTS#
#define BLE_PEER_MANAGER_PERIPHERAL_CONFIG_ADV_TIMING_MAX_EVENTSValue:
0
95
of file common/ble_peer_manager/peripheral/config/ble_peer_manager_peripheral_config.h