Getting a list of WiFi networks nearby when the adapter is in AP mode
iwlist
is seriously deprecated. Remove it from your system and never use it again. Do the same with iwconfig
, iwspy
. Those tools are ancient and were designed in an era where 802.11n didn't exist. Kernel developers maintain a ugly compatibility layer to still support wireless-tools
, and this compatibility layer often lies.
Now install iw
if not already done. The iw
command you are looking for is
iw dev wlan0 scan ap-force
.
This is a fairly recent addition. Not all drivers support this, but most should do.
Related videos on Youtube
Hamza
Updated on September 18, 2022Comments
-
Hamza over 1 year
I am trying to get a list of wireless networks nearby while the adapter is acting as an access point but iwlist returns the following error:
$ sudo iwlist wlan0 scan wlan0 Interface doesn't support scanning : Operation not supported
Is there another way of getting this list, perhaps with another utility? My Tomato powered WRT54 seems to be able to achieve this (listing nearby APs while the device itself is set up as an AP), so I'm curious how I could replicate that behaviour.
Thanks.
-
Tam Borine over 9 years@BatchyX - There is no package called
iw
, at least not on Debian Wheezy. Where can I get thisiw
?