BLE Peer Manager Peripheral#

Peer Manager for Bluetooth Low Energy. Responsible for advertising and creating connections. The user can set the advertising parameters.

Functions#

sl_status_t
ble_peer_manager_peripheral_set_advertiser(sl_bt_advertiser_discovery_mode_t adv_discovery_mode)
sl_status_t
sl_status_t
sl_status_t

Function Documentation#

ble_peer_manager_peripheral_init#

void ble_peer_manager_peripheral_init (void )
Parameters
N/A

Initialize the Peer Manager.

Set default values for advertiser, set state to IDLE and create an emtpy connection array.


Definition at line 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)
Parameters
[in]adv_discovery_mode

Advertising discovery mode. Should be one of the following:

  • sl_bt_advertiser_non_discoverable

  • sl_bt_advertiser_limited_discoverable

  • sl_bt_advertiser_general_discoverable

  • sl_bt_advertiser_broadcast

  • sl_bt_advertiser_user_data

Set advertiser parameters.

Set the advertiser parameters if the Peer Manager is in IDLE state. Call this function before starting the advertiser.


Definition at line 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 )
Parameters
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.


Definition at line 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)
Parameters
[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.


Definition at line 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)
Parameters
[in]advertising_handle

Advertising handle to stop.

Stop advertising.


Definition at line 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)
Parameters
[in]conn_handle

Connection handle of the connection which needs to be closed.

Close connection.


Definition at line 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_MODE
Value:
sl_bt_advertiser_general_discoverable

Definition at line 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_MODE
Value:
sl_bt_legacy_advertiser_connectable

Definition at line 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_MIN
Value:
160

Definition at line 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_MAX
Value:
160

Definition at line 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_DURATION
Value:
0

Definition at line 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_EVENTS
Value:
0

Definition at line 95 of file common/ble_peer_manager/peripheral/config/ble_peer_manager_peripheral_config.h