7

I've seen a fair amount of discussion about connecting to a WiFi access point (AP) that has been set up to be hidden, but nothing much on setting up the RPi as the hidden AP. Being hidden, I don't want the WiFi name/SSID visible to mobile devices so that it can't be selected and you need to know the SSID and password to be able to connect. How can I set up Pi up as a hidden WiFi access point? (I have briefly looked at tutorials on setting up an AP, but haven't seen any on a setting up a hidden one).

Application wise, I plan to have an Android application that will know the SSID and password and can programatically connect to the RPi AP. What is important is the Android app knowing the connection state ("yes I am connected to SSID abc", i.e. the RPi), so I'm not worried about - and I don't think I want - is having the RPi connected to the internet. So, have the RPi allow Android device to connect, but don't do anything with web requests (I'm thinking it would be like "Connected, no internet access"). The reason for this is because after using the important 'connection state' the Android app will programatically disconnect from the RPi to allow the device to connect to the WiFi it had originally. (Basically the result of this, is that the Android app will kick off an action if the device is nearby the RPi, where 'nearby' is tested by connecting to the RPi as described).

Thanks

1
  • To save you looking, wpa_supplicant does support hidden SSIDs in Access Point mode, so you must use hostapd or similar. Commented Sep 1, 2019 at 6:30

2 Answers 2

14

If you are using hostapd to create wifi hotspot, just add ignore_broadcast_ssid=1 line to your /etc/hostapd/hostapd.conf file, then it will hide your SSID.

You can refer more to this hostapd.conf example file.

Search for the keyword ignore_broadcast_ssid to see the explanation:

# Send empty SSID in beacons and ignore probe request frames that do not
# specify full SSID, i.e., require stations to know SSID.
# default: disabled (0)
# 1 = send empty (length=0) SSID in beacon and ignore probe request for
#     broadcast SSID
# 2 = clear SSID (ASCII 0), but keep the original length (this may be required
#     with some clients that do not support empty SSID) and ignore probe
#     requests for broadcast SSID
ignore_broadcast_ssid=0

3
  • I followed frillip.com/… to set up Pi as AP and stopped at the IPv4 forwarding, and changing it to 1 didn't seem to work as it still comes up in the WiFi network list...
    – Huddo7794
    Commented Oct 15, 2016 at 13:25
  • What do you get when you run hostapd -d /etc/hostapd/hostapd.conf? By the way, here is a nice script for using hostapd to create wifi: gist.github.com/Lewiscowles1986/fecd4de0b45b2029c390 Commented Oct 15, 2016 at 15:55
  • Thanks, using that script with hardcoded SSID/password values works for me. Broadcast value of 1 did hide it too.
    – Huddo7794
    Commented Oct 17, 2016 at 7:29
0

Adding the ignore_broadcast_ssid=1 line to file hostapd.conf to hide a Raspberry Pi wireless access point doesn't work.

The author of hostapd said, in ignore_broadcast_ssid without effect:

ignore_broadcast_ssid=1 is only supported with drivers that use hostapd for generating the Beacon frame template and processing Probe Request frames

You can set that line to 1 (empty) or 2 (clear), but it doesn't work on a Raspberry Pi 4B running Buster.

0

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.