Browse Source

scan方法支持在不添加任何过滤器时,返回扫描到的所有蓝牙设备

master
zhaohe 11 months ago
parent
commit
bfa0eb96e0
  1. 2
      components/ble/nrf_ble_scan/nrf_ble_scan.c

2
components/ble/nrf_ble_scan/nrf_ble_scan.c

@ -916,7 +916,7 @@ static void nrf_ble_scan_on_adv_report(nrf_ble_scan_t const * const p_
#endif
scan_evt.params.filter_match.p_adv_report = p_adv_report;
if(filter_cnt==0)is_filter_matched= true;
// In the multifilter mode, the number of the active filters must equal the number of the filters matched to generate the notification.
if (all_filter_mode && (filter_match_cnt == filter_cnt))
{

Loading…
Cancel
Save