Off-Topic > Off-Topic - Tiny Core Lounge
iwlist scan shows non-existent hotspot
GNUser:
I discovered something strange. If I connect my laptop to a hotspot, for example AndroidAP being hosted on my phone, then the hotspot goes away (because I completely powered off my phone for example), the next time I scan for networks using this command on the laptop...
--- Code: ---$ sudo iwlist wlan0 scanning
--- End code ---
...the now-nonexistent AndroidAP hotspot still shows up in the scan results. I have to scan a second time in order for the nonexistent hotspot to disappear from the scan results.
Any idea why the hotspot scan is finding this non-existent hotspot?
GNUser:
Here's relevant part of scan results when AndroidAP is up:
--- Code: --- Cell 21 - Address: [redacted]
Channel:1
Frequency:2.412 GHz (Channel 1)
Quality=70/70 Signal level=-37 dBm
Encryption key:on
ESSID:"AndroidAP-bd"
Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 11 Mb/s; 18 Mb/s
24 Mb/s; 36 Mb/s; 54 Mb/s
Bit Rates:6 Mb/s; 9 Mb/s; 12 Mb/s; 48 Mb/s
Mode:Master
Extra:tsf=00000000006b424f
Extra: Last beacon: 90ms ago
IE: Unknown: 000C416E64726F696441502D6264
IE: Unknown: 010882848B962430486C
IE: Unknown: 030101
IE: Unknown: 2A0100
IE: Unknown: 32040C121860
IE: IEEE 802.11i/WPA2 Version 1
Group Cipher : CCMP
Pairwise Ciphers (1) : CCMP
Authentication Suites (1) : PSK
IE: Unknown: 2D1A2D0017FFFF000000000000000000000000000000000000000000
IE: Unknown: 3D1601081100000000000000000000000000000000000000
IE: Unknown: 7F080400008001000040
IE: Unknown: DD1E00904C0408BF0C3258810FFAFF0000FAFF0000C0050001000000C3020010
IE: Unknown: DD090010180200001C0000
IE: Unknown: DD180050F2020101800003A4000027A4000042435E0062322F00
--- End code ---
And here is the "ghost" AndroidAP showing up in subsequent scan, when the hotspot is actually 100% nonexistent because my phone is physically turned off:
--- Code: --- Cell 18 - Address: [redacted]
Channel:1
Frequency:2.412 GHz (Channel 1)
Quality=70/70 Signal level=-30 dBm
Encryption key:on
ESSID:"AndroidAP-bd"
Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 11 Mb/s; 18 Mb/s
24 Mb/s; 36 Mb/s; 54 Mb/s
Bit Rates:6 Mb/s; 9 Mb/s; 12 Mb/s; 48 Mb/s
Mode:Master
Extra:tsf=000000000268ac75
Extra: Last beacon: 7230ms ago
IE: Unknown: 000C416E64726F696441502D6264
IE: Unknown: 010882848B962430486C
IE: Unknown: 030101
IE: Unknown: 2A0100
IE: Unknown: 32040C121860
IE: IEEE 802.11i/WPA2 Version 1
Group Cipher : CCMP
Pairwise Ciphers (1) : CCMP
Authentication Suites (1) : PSK
IE: Unknown: 2D1A2D0017FFFF000000000000000000000000000000000000000000
IE: Unknown: 3D1601081500000000000000000000000000000000000000
IE: Unknown: 7F080400008001000040
IE: Unknown: DD1E00904C0408BF0C3258810FFAFF0000FAFF0000C0050001000000C3020010
IE: Unknown: DD090010180201001C0000
IE: Unknown: DD180050F2020101800003A4000027A4000042435E0062322F00
--- End code ---
GNUser:
I found this, but the answers only pertain to wpa_supplicant (not iwlist):
https://unix.stackexchange.com/questions/391237/wifi-scans-show-ssid-of-a-powered-off-network-for-several-scans-afterwards
Rich:
Hi GNUser
Sounds like some kind of caching may be going on. Look at the time difference since the last updates:
Android up
--- Code: ---Extra: Last beacon: 90ms ago
--- End code ---
vs. Android down
--- Code: ---Extra: Last beacon: 7230ms ago
--- End code ---
GNUser:
Yes, cache issue sounds quite likely. However, iwlist man page does not talk about how to ignore the cache.
I'd like to try scanning using wpa_cli since it seems wpa_supplicant has some relevant configuration options, but I'm stuck here:
--- Code: ---$ sudo wpa_cli -i wlan0 scan
Failed to connect to non-global ctrl_ifname: wlan0 error: No such file or directory
--- End code ---
Any idea how to work around the above?
Navigation
[0] Message Index
[#] Next page
Go to full version