How to force stop Wifi Scan

Hi, 

I have a solution that every 15 minutes needs to perform a WiFi Scan and save the BSSIDs that it finds. Sometimes it will find the maximum number set and will complete the scan correctly but sometimes there will be no wifis around so I have set a 10 seconds timer to exit.

The issue is that when the device doesn't find any wifis and then the timer jumps, the next time I try to perform a scan I get the error "wifi_nrf: wifi_nrf_disp_scan_zep: Scan already in progress".

So is there a way to stop the scan when my timer jumps, so the scan doesn't continue forever?

I'm working with sdk 2.3.0

Thanks and best regards

Parents
  • Hi Amanda,

    Thanks for your reply. The main issue with the post that you link is that the net_if_down function doesn't stop the scan. I can see that the scan is still going on and the device is consumming 60mA even after it turns down the interface. Is there a way to use a function in the driver like this one: wifi_nrf_fmac_abort_scan?

    I cannot update to NCS 2.6.1 yet because a lot of the project depends on the previous sdk.

    Best regards

Reply
  • Hi Amanda,

    Thanks for your reply. The main issue with the post that you link is that the net_if_down function doesn't stop the scan. I can see that the scan is still going on and the device is consumming 60mA even after it turns down the interface. Is there a way to use a function in the driver like this one: wifi_nrf_fmac_abort_scan?

    I cannot update to NCS 2.6.1 yet because a lot of the project depends on the previous sdk.

    Best regards

Children
Related