Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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.

share|improve this question
add comment

1 Answer 1

up vote 4 down vote accepted

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.

share|improve this answer
    
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 at 21:28
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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