1.1.2.1.1.4.65 BLE_GAP_SetScanningFilter
C
uint16_t BLE_GAP_SetScanningFilter(BLE_GAP_ScanFilterConfig_T *p_param);
Description
Set the scanning filter parameters to filter received advertising or scan response PDU. There are 3 Advertising Data Type (AD_Type) contents filter options can be enabled individually. While either option is enabled and PDU contents with specific AD_Type data that same as compared target parameters, LE Stack will report this received PDU by BLE_GAP_EVT_ADV_REPORT or BLE_GAP_EVT_EXT_ADV_REPORT event.
Name Filter: To filter the contents of Shortened Local Name (AD_Type=0x08) or Full Complete Local Name (AD_Type=0x09).
Service Data Filter: To filter the contents of Service Data (AD_Type=0x16).
Manufacture Data Filter: To filter the contents of Manufacturer Specific Data (AD_Type=0xFF)
Note
This scanning filter is an advanced filtering procedure after filterPolicy setting in the BLE_GAP_SetScanningParam API or BLE_GAP_SetExtScanningParams API.
Parameters
Parameter | Description |
---|---|
[in] p_param | Pointer to BLE_GAP_ScanFilterConfig_T structure buffer. |
Return values
Return value | Description |
---|---|
MBA_RES_SUCCESS | Successfully set the scanning filter parameters. |
MBA_RES_OOM | Internal memory allocation failure. |
MBA_RES_INVALID_PARA | Invalid parameters. |