2

I first came across this when I was trying to make a python program that used programs to scan for wireless networks. I've used the following tools:

iwlist, iw, wpa_cli, nmcli, and iwconfig

I run into the same behavior on all of them. Suppose you're sitting by your computer and wireless access point/router. Type out one of the following commands, assuming your wifi adapter is named wlan0, turn of the router, then press enter in the terminal window.

iw wlan0 scan | grep SSID
iwlist wlan0 scan | grep SSID
wpa_cli -i wlan0 scan && wpa_cli -i wlan0 scan_results
nmcli device wifi rescan && nmcli device wifi list

All of the commands still show the SSID for quite some time. I imagine longer than it would take for the E&M standing wave to disappear. Does anyone have any fix for this problem?

  • On which wlan was connected your scanning PC? Did you cleanly shutdown the SSID wlan? Did you check (arp or tcpdump) the SSID wlan was shut? – dan Feb 12 '18 at 15:03
4

In the default configuration wpa_supplicant might display scan results that have been cached for some time.

Add this line to your wpa_supplicant.conf file to have the scan results only show those SSIDs that were detected during the previous scan:

ignore_old_scan_res=1
1

I solved this quite awhile ago, my apologies for leaving it unanswered. The following wpa_supplicant settings are responsible for the wifi behavior mentioned above:

bss_expire_count and bss_expire_age

The former is how many scans the SSID has to be missing from before it removes it from the list. The latter is the time in seconds to display an SSID after it's no longer broadcasting

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.