1

I have just bought a Raspberry Pi 4 and would like to use it as a wifi access point (for information, I will probably install Gentoo with hostapd in it).

I would like this access point to be in “passive” mode, only listening to new device probes and not emitting beacon when there is no station connected to it. I looked at hostapd configuration file, but I could not find anything suitable.

I wonder if I can, by order of preference:

  • find a configuration option to manage this automatically;
  • be able to automatically capture connection/disconnection events and switch beacon on/off using a bit of shell scripting;
  • if nothing else is available, modify a driver or an application to add this no beacon idle mode.

I've once heard of a company selling AP with such a configuration, but after days of research all over the internet, I couldn't find anything for me to do it in my RPi.

Have someone ever heard of a way to do this?

(Note: I initially asked this question on stackoverflow, but have been redirected here for “off-topic”)

  • …just hide the SSID entirely? Same security, really. –  May 13 '20 at 09:07
  • Thank you for suggestion, @DanielB, but hiding SSID does not prevent beacon from being emitted… –  May 13 '20 at 10:05
  • Maybe I wasn't clear, but I don't want this because of security, but to prevent useless power consumption and waves. Neither disabling beacon nor hiding SSID can improve security, anyway. –  May 13 '20 at 10:08
  • Not enough for an answer, but have a look at iw --help | less. There are many low level options to configure the WiFi driver, also adjusting the beacon count. What if you set it to 0? – Ingo May 13 '20 at 22:45
  • Maybe not enough for an answer, but actually the best I had until now. Thank you @Ingo, I will check if it can help me. – Stéphane Veyret May 14 '20 at 07:03
  • And if you find a solution, please make an answer ;-) – Ingo May 14 '20 at 09:08
  • 1
    One of the many functions of beacons is low-level timing synchronization between the AP and the client STAs, so in many 802.11 hardware designs I've worked with, the responsibility for transmitting beacons is often left to the 802.11 hardware (or the firmware running on the 802.11 chipset). So I suspect for many 802.11 chipset architectures, creating an ability to not send beacons would require modifying the firmware of the 802.11 chipset, if not the hardware itself. I can't speak to the architecture of whatever 802.11 implementation is used in the RPi 4. – Spiff May 14 '20 at 17:41
  • 1
    It's also worth noting that if your radio is on a 5GHz DFS channel that no one else is on, clients will only scan it passively. That is, they'll just tune to the channel and listen for beacons for ~103ms. So disabling beacons when idle can render you unfindable / unjoinable in some circumstances, because you'll never get a Probe Request you can reply to. Also some AP implementations may use passive scans during automatic channel selection, so if your AP is unfindable due to not beaconing, it may cause APs around you to choose your channel, thinking it's unoccupied. – Spiff May 14 '20 at 17:49
  • Thank you @Spiff. So I understand that it is almost impossible to do what I want. Can you convert your comments to an answer, so that I can choose it? – Stéphane Veyret May 15 '20 at 06:14

0 Answers0