Process to change BLE scan filter

Hello Nordic team,

In my BLE application, I would like to initially scan for a certain peripheral using advertised UUIDs (i.e. using UUID filter). Then, when the application finds this device, I would like to change the scan filter to scan based on MAC address (i.e using ADDR filter). For this use case, do I need to call nrf_ble_scan_init() again and then set the new filter or is it enough to stop the scan and set the new filter? 

Do I need to disable Softdevice before performing these operations?

Thanks,

Anusha

Parents Reply
  • Hi Joakim,

    Thanks for your response. I haven't tried it yet but wanted to check the right process to do this. I would like to clarify one more point, which I missed to ask earlier.

    When I first perform scan initialise with UUID filter, I need to set connect_if_match to true. Later when I perform filtering with MAC address, I need connect_if_match to false. In this case, I need to reinitialise scan by calling nrf_ble_scan_init(), right?

    Is there any issue in initialising scan module twice? 

    Thanks, 

    Anusha

Children
Related