nRF5 SDK for Mesh v5.0.0
Enumerations | Functions
Advertisement packet type filtering

Filtering of advertisement packets based on their advertisement type. More...

Enumerations

enum  adv_packet_filter_mode_t { ADV_FILTER_WHITELIST_MODE, ADV_FILTER_BLACKLIST_MODE }
 Possible working modes for BLE advertisement packet type filter. More...
 

Functions

void bearer_adv_packet_filtering_set (bool onoff)
 Enable or disable the advertisement type filtering. More...
 
void bearer_adv_packet_remove (ble_packet_type_t type)
 Remove the advertisement type from the list of accepted advertisement types. More...
 
void bearer_adv_packet_add (ble_packet_type_t type)
 Add the advertisement type to the list of accepted advertisement types. More...
 
void bearer_adv_packet_clear (void)
 Remove all set advertisement types from the list of accepted advertisement types.
 
void bearer_adv_packet_filter_mode_set (adv_packet_filter_mode_t mode)
 Set mode of the advertisement type filter. More...
 
uint32_t bearer_adv_packet_filtered_amount_get (void)
 Read out amount filtered packets according the BLE advertisement type settings. More...
 

Detailed Description

Filtering of advertisement packets based on their advertisement type.

Enumeration Type Documentation

◆ adv_packet_filter_mode_t

Possible working modes for BLE advertisement packet type filter.

ADV_FILTER_WHITELIST_MODE is default mode

Enumerator
ADV_FILTER_WHITELIST_MODE 

Whitelist mode.

ADV_FILTER_BLACKLIST_MODE 

Blacklist mode.

Definition at line 54 of file adv_packet_filter.h.

Function Documentation

◆ bearer_adv_packet_filtering_set()

void bearer_adv_packet_filtering_set ( bool  onoff)

Enable or disable the advertisement type filtering.

If enabled, only the packets with the advertisement types added via bearer_adv_packet_add() will be kept and processed by the bearer.

Note
The main BT Mesh packets (Nonconnectable advertisement type) are not filtered.
Parameters
[in]onoffadvertisement type filtering state; set to true to enable the advertisement type filter, and false to disable

◆ bearer_adv_packet_remove()

void bearer_adv_packet_remove ( ble_packet_type_t  type)

Remove the advertisement type from the list of accepted advertisement types.

Parameters
[in]typeThe advertisement type that will be removed from the filter.
Note
This function has no effect if the advertisement type has not been added.

◆ bearer_adv_packet_add()

void bearer_adv_packet_add ( ble_packet_type_t  type)

Add the advertisement type to the list of accepted advertisement types.

Parameters
[in]typeThe advertisement type that will be added to the filter.
Note
the filtering must be enabled (via a call to bearer_adv_packet_filtering_set) for the added advertisement types to have any effect.

◆ bearer_adv_packet_filter_mode_set()

void bearer_adv_packet_filter_mode_set ( adv_packet_filter_mode_t  mode)

Set mode of the advertisement type filter.

Parameters
[in]modeMode of the advertisement type filter.
Note
There are two possible modes. ADV_FILTER_WHITELIST_MODE (default) mode enables receiving packets with advertisement types in the list. ADV_FILTER_BLACKLIST_MODE mode disables receiving packets with advertisement types in the list.

◆ bearer_adv_packet_filtered_amount_get()

uint32_t bearer_adv_packet_filtered_amount_get ( void  )

Read out amount filtered packets according the BLE advertisement type settings.

Returns
Amount of the filtered packets with unsuitable BLE advertisement type.

Documentation feedback | Developer Zone | Subscribe | Updated