4

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.

2 Answers 2

7

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.

2
  • Thanks, I was completely unaware that iwlist was deprecated! I had to compile iw from source, as the version I had in my distro was too old, but after that I was able to retrieve the AP list.
    – Hamza
    May 21, 2014 at 21:28
  • @BatchyX - There is no package called iw, at least not on Debian Wheezy. Where can I get this iw ? Dec 20, 2014 at 0:24
0

I encountered this issue when my wifi device was in 'Access Point' Mode. I changed mode to 'client'. Then command started working perfectly. Command works with 'ad-hoc' mode as well.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .