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

Related