BLE Peer Manager Filter#
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_filter_init#
void ble_peer_manager_filter_init (void )
N/A |
Initialize filtering.
45
of file common/ble_peer_manager/filter/inc/ble_peer_manager_filter.h
ble_peer_manager_set_filter_bt_address#
void ble_peer_manager_set_filter_bt_address (bool enabled)
[in] | enabled | Enable or disable BT address filtering. |
Enable/disable BT address filtering.
52
of file common/ble_peer_manager/filter/inc/ble_peer_manager_filter.h
ble_peer_manager_add_allowed_bt_address#
sl_status_t ble_peer_manager_add_allowed_bt_address (bd_addr * filter_addr)
[in] | filter_addr | BT address to allow |
Add a new allowed BT address.
63
of file common/ble_peer_manager/filter/inc/ble_peer_manager_filter.h
ble_peer_manager_remove_allowed_bt_address#
sl_status_t ble_peer_manager_remove_allowed_bt_address (bd_addr * filter_addr)
N/A | filter_addr |
Remove a BT address from the allowed list.
70
of file common/ble_peer_manager/filter/inc/ble_peer_manager_filter.h
ble_peer_manager_set_filter_address_type#
sl_status_t ble_peer_manager_set_filter_address_type (sl_bt_gap_address_type_t filter_addr_type)
[in] | filter_addr_type | Address type to set the filter to. |
Set filter address type.
80
of file common/ble_peer_manager/filter/inc/ble_peer_manager_filter.h
ble_peer_manager_set_filter_device_name#
sl_status_t ble_peer_manager_set_filter_device_name (const char * device_name, uint8_t device_name_len, bool full_match)
[in] | device_name | Device name to set the filter to. |
[in] | device_name_len | Length of the device name. |
[in] | full_match | If true, only full matches are accepted in the scan response. |
Set filter device name.
Set the filter device name to the specified device name. The device name in the scan response will only be checked if the advertisement type is Shortened Local Name (0x08) or Complete Local Name (0x09).
100
of file common/ble_peer_manager/filter/inc/ble_peer_manager_filter.h
ble_peer_manager_set_filter_service_uuid16#
sl_status_t ble_peer_manager_set_filter_service_uuid16 (sl_bt_uuid_16_t * service_uuid16)
[in] | service_uuid16 | Service UUID16 to set the filter to. |
Set filter service UUID16.
Set the filter service UUID16 to the specified service UUID16. The service UUID in the scan response will only be checked if the advertisement type is Incomplete List of 16-bit Service Class UUIDs or Complete List of 16-bit Service Class UUIDs.
118
of file common/ble_peer_manager/filter/inc/ble_peer_manager_filter.h
ble_peer_manager_set_filter_service_uuid128#
sl_status_t ble_peer_manager_set_filter_service_uuid128 (uuid_128 * service_uuid128)
[in] | service_uuid128 | Service UUID128 to set the filter to. |
Set filter service UUID128.
Set the filter service UUID128 to the specified service UUID128. The service UUID in the scan response will only be checked if the advertisement type is Incomplete List of 32-bit Service Class UUIDs or Complete List of 16-bit Service Class UUIDs.
134
of file common/ble_peer_manager/filter/inc/ble_peer_manager_filter.h
ble_peer_manager_set_filter_service_data#
sl_status_t ble_peer_manager_set_filter_service_data (uint8_t * service_data, uint8_t service_data_offset, uint8_t service_data_len)
[in] | service_data | Service data to set the filter to. |
[in] | service_data_offset | Offset of the service data. |
[in] | service_data_len | Length of the service data. |
Set filter service data.
Set the filter service data to the specified service data. When processing the scan response, the search will start from the given offset until the given length using memcmp(). The service data in the scan response will only be checked if the advertisement type is Service Data - 128-bit UUID.
154
of file common/ble_peer_manager/filter/inc/ble_peer_manager_filter.h
ble_peer_manager_set_filter_manufacturer_data#
sl_status_t ble_peer_manager_set_filter_manufacturer_data (uint8_t * manufacturer_data, uint8_t manufacturer_data_offset, uint8_t manufacturer_data_len)
[in] | manufacturer_data | Manufacturer data to set the filter to. |
[in] | manufacturer_data_offset | Offset of the manufacturer data. |
[in] | manufacturer_data_len | Length of the manufacturer data. |
Set filter manufacturer data.
Set the filter manufacturer data to the specified manufacturer data. When processing the scan response, the search will start from the given offset until the given length using memcmp(). The manufacturer data in the scan response will only be checked if the advertisement type is Manufacturer Specific Data.
176
of file common/ble_peer_manager/filter/inc/ble_peer_manager_filter.h
ble_peer_manager_set_filter_rssi#
sl_status_t ble_peer_manager_set_filter_rssi (int8_t rssi)
[in] | rssi | RSSI to set the filter to. |
Set filter RSSI.
Set the filter RSSI (Signal strength indicator in the last received packet) to the specified RSSI. The RSSI in the scan response has to be greater than the set value. Units: dBm Range: -127 to +20
195
of file common/ble_peer_manager/filter/inc/ble_peer_manager_filter.h
ble_peer_manager_is_filter_set#
bool ble_peer_manager_is_filter_set ()
Check if there are any filters set.
203
of file common/ble_peer_manager/filter/inc/ble_peer_manager_filter.h
ble_peer_manager_reset_filter#
void ble_peer_manager_reset_filter ()
Reset filters.
Reset all filters to default values.
210
of file common/ble_peer_manager/filter/inc/ble_peer_manager_filter.h
ble_peer_manager_find_match#
bool ble_peer_manager_find_match (bd_addr * address, sl_bt_gap_address_type_t address_type, int8_t rssi, const uint8array * adv_data)
[in] | address | Address of the device. |
[in] | address_type | Address type of the device. |
[in] | rssi | RSSI of the device. |
[in] | adv_data | Advertising data of the device. |
Find a match for the filters.
Check if the scan response matches the filters. There is an AND relationship between the filters, meaning that all filters must match for the function to return true.
227
of file common/ble_peer_manager/filter/inc/ble_peer_manager_filter.h
ble_peer_manager_is_filter_set_allowed#
bool ble_peer_manager_is_filter_set_allowed (void )
N/A |
232
of file common/ble_peer_manager/filter/inc/ble_peer_manager_filter.h
ble_peer_manager_str_to_address#
sl_status_t ble_peer_manager_str_to_address (const char * str, bd_addr * address)
[in] | str | Hexadecimal representation of the BLE address with optional separator characters ':' or ' ', e.g. "AA:BB:CC:DD:EE:FF". |
[out] | address | Output. |
Parse BT address from string.
Returns
Status of the operation.
242
of file common/ble_peer_manager/filter/inc/ble_peer_manager_filter.h