2

I want to scan networks when our devices is in Access Point. When the device is in client mode, it works, but i cannot scan networks if hostapd is running as Access Point:

Try 1:

pi $ sudo iwlist wlan0 scan
wlan0     Interface doesn't support scanning : Operation not supported

Try 2:

pi $ sudo iw dev wlan0 scan
command failed: Operation not supported (-95)

Any ideas?

Kotik_o
  • 295
  • 6
  • 19

3 Answers3

2

On Raspberry PI/wheezy, you may need to get the libnl library:

apt-get install libnl-dev

Qiang Li
  • 1,099
  • 11
  • 8
2

I had the same problem. So I added ap-force to the command:

sudo iw dev wlan0 scan ap-force

and that worked for me.

anissmag
  • 21
  • 3
1

SOLUTION:

Download iw v4.X from: https://kernel.org/pub/software/network/iw/

Compile it and run:

./iw dev wlan0 scan ap-force

it works!

Kotik_o
  • 295
  • 6
  • 19