WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: iwlist scan shows non-existent hotspot  (Read 5272 times)

Offline GNUser

  • Wiki Author
  • Hero Member
  • *****
  • Posts: 1509
Re: iwlist scan shows non-existent hotspot
« Reply #15 on: May 27, 2020, 03:07:49 PM »
Reloading the wireless interface's kernel module before scanning is a good-enough solution for now.
If I find a more direct way of clearing the cached scan results, I'll post it here.
If someone beats me to the punch, please do share ;)

Offline jazzbiker

  • Hero Member
  • *****
  • Posts: 934
Re: iwlist scan shows non-existent hotspot
« Reply #16 on: May 27, 2020, 03:11:43 PM »
II have to scan a second time in order for the nonexistent hotspot to disappear from the scan results.

You wrote this.

Offline GNUser

  • Wiki Author
  • Hero Member
  • *****
  • Posts: 1509
Re: iwlist scan shows non-existent hotspot
« Reply #17 on: May 27, 2020, 03:14:30 PM »
I don't like that "solution" because I don't have any guarantees--I don't know for how long entries live in the cache.

Maybe it's just by accident that a second scan works. Perhaps if second scan completes quickly enough, the non-existent hotspot will still show up...

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11624
Re: iwlist scan shows non-existent hotspot
« Reply #18 on: May 27, 2020, 03:24:54 PM »
Hi GNUser
I just turned on a Netbook to see what shows up in sysctl for wireless networking and this provided many results:
Code: [Select]
sudo sysctl -a 2>&1 | grep -i wlanI recommend researching the names containing  time  or  delay  for starters.

Offline GNUser

  • Wiki Author
  • Hero Member
  • *****
  • Posts: 1509
Re: iwlist scan shows non-existent hotspot
« Reply #19 on: May 27, 2020, 03:38:26 PM »
Thank you, Rich. I took a look and the output and there are indeed several candidate parameters.

Unfortunately, even with help (https://www.kernel.org/doc/Documentation/networking/ip-sysctl.txt) it's hard to find what I'm looking for given the highly technical verbiage. I'll explore this further when I have more time.

Offline jazzbiker

  • Hero Member
  • *****
  • Posts: 934
Re: iwlist scan shows non-existent hotspot
« Reply #20 on: May 27, 2020, 08:30:14 PM »
Hi, GNUser!

I'm surrounded by a lot of Wifi networks. I've chosen one of them with the weak signal under -90dB, and made:
Code: [Select]
tc@box:/tmp$ APN="<SSID of distant Wifi network>"
tc@box:/tmp$ while true; do sudo iwlist wlan0 scan  | grep -A 6 "$APN" | grep "Last beacon" ; [ $? = 1 ] && echo none ; done
                    Extra: Last beacon: 19547ms ago
                    Extra: Last beacon: 22734ms ago
                    Extra: Last beacon: 25917ms ago
                    Extra: Last beacon: 29104ms ago
none
                    Extra: Last beacon: 361ms ago
                    Extra: Last beacon: 3547ms ago
                    Extra: Last beacon: 6741ms ago
                    Extra: Last beacon: 9927ms ago
                    Extra: Last beacon: 13117ms ago
                    Extra: Last beacon: 16301ms ago
                    Extra: Last beacon: 19487ms ago
                    Extra: Last beacon: 22674ms ago
                    Extra: Last beacon: 25861ms ago
                    Extra: Last beacon: 29047ms ago
none
none

In my understanding this means, that lost AP stay in the cache for 30 seconds and only then is thrown away.

aus9

  • Guest
Re: iwlist scan shows non-existent hotspot
« Reply #21 on: May 28, 2020, 10:59:30 PM »
recently I re-looked at wicd.

Altho its a GUI and might not suit GNUser, I can confirm its quite good at detecting real networks, not past networks. Might be worth a shot?

and purely selfishly.....I like its ability to swap between wired and wireless if you name your interfaces, wlan0 and eth0.....and hide WL router names you do not want to connect to, ie your neighbours
« Last Edit: May 28, 2020, 11:03:01 PM by aus9 »