I setup my raspberry pi in AP mode with SSID: rpi-ap-test and my computer can connect to that SSID.

When I do a wifi scan on raspberry pi terminal (iwlist scan), I can see almost APs that my computer can see except rpi-ap-test.

Here is my hostapd.conf file:


I am developing a script that will detect whether raspberry pi in AP mode or not by searching its AP SSID.

Does anyone have any suggestions for me? I am really appreciate.

  • I don't really understand your question but I want RPi in AP mode and scan to see its SSID. It is to ensure that my RPi in AP mode.
    – Rain
    Commented Mar 12, 2018 at 2:25
  • No, it is not an option. I run detection script on the same device that currently in AP mode.
    – Rain
    Commented Mar 13, 2018 at 3:59

1 Answer 1


I think you have to give up hope to find out this way, if your Raspberry Pi is in AP mode or not. It's not even a software questions. It is simply physically not possible.

The results in iwlist scan are populated from scans that are carried out by the wireless chip inside the Raspberry Pi.

  • During a passive scan the wireless radio listens for incoming beacon frames from APs in range on the different channels.
  • During an active scan the wireless radio sends out probe request frames and waits for probe response frames from APs in range on the different channels.

In both cases the Wifi radio would have to be able to send out the beacon frame/probe response frame (advertising your rpi-ap-test) and listen to it at the same time, which is not possible with a single Wifi radio, as in the Raspberry Pi.

As alternative you could use the output of e.g. iw wlan0 info. Here the field type will report AP, when in AP mode. Replace wlan0 with the name of your wireless interface.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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