|
本帖最后由 宫聆 于 2021-4-8 14:09 编辑
nrf_ble_scan_short_name_t short_name_data = {"device_name", 11};
//向扫描器添加一个设备名称过滤器
err_code = nrf_ble_scan_filter_set(&m_scan,
SCAN_SHORT_NAME_FILTER,
&short_name_data );
APP_ERROR_CHECK(err_code);
//使能设备名称过滤器
err_code = nrf_ble_scan_filters_enable(&m_scan,
NRF_BLE_SCAN_SHORT_NAME_FILTER,
false);
APP_ERROR_CHECK(err_code);
================================================================================
源码如上所示,添加规则跟全名full name一样的,但是并不能过滤出来short name的设备,有知晓的大神指点一下嘛
|
|