All of lore.kernel.org
 help / color / mirror / Atom feed
* How to elegantly engage/disengage AP mode
@ 2025-02-18  0:58 KeithG
  2025-02-18 13:38 ` James Prestwood
  0 siblings, 1 reply; 2+ messages in thread
From: KeithG @ 2025-02-18  0:58 UTC (permalink / raw)
  To: iwd, connman

Hi. I am soliciting ideas on how to elegantly engage/disengage AP mode
when configuration is needed on a headless device.

What we do now: We use connman as our connection manager with iwd
handling wlan duties. At first boot our headless RPi based appliance
checks to see if it has a valid ethernet address on either the wlan or
the ethernet. If not, it creates an AP on a made up MAC address and
launches (with either IWD or Hostapd) an AP to allow a connection to
configure the internet. This works fine and we can use this to
configure the RPi and when we select a valid SSID with connman and
type in the password, it brings the AP down and connects to the SSID.
All good.

The problem: What happens if the SSID goes away either because we
moved the Pi or the SSID goes away? What we would like is it to scan
for a known SSID and reconnect if it finds one, (which it already
does) and if ones does not appear, to restart AP mode so we can
connect to it. If it finds an SSID while we are connecting, continue
to set up, but if the SSID reappears and no-one has connected, to then
shut down AP and re-connect to the SSID.

Question: Are there any elegant ways of doing this? We currently use
scripts and such to look at connmanctl and iwctl, but could start
digging into dbus, to monitor what is going on if needed. We thought
this may have been solved previously and wanted to ask here.

Any ideas? This seems like something that would be useful for just
about any headless internet connected device.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-02-18 13:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-18  0:58 How to elegantly engage/disengage AP mode KeithG
2025-02-18 13:38 ` James Prestwood

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.