# Wi-Fi Manager Monitors the robot's Wi-Fi connection and falls back to a hotspot if the target SSID is unavailable. If the configured SSID is not seen within `WIFI_TIMEOUT` seconds of startup, or if the connection is later lost, the manager creates a NetworkManager Wi-Fi hotspot so the robot remains reachable. When the target SSID becomes visible again the hotspot is torn down and the robot reconnects. Communicates with the host NetworkManager via `nmcli` (the host D-Bus socket is bind-mounted into the container). --- ## Environment variables | Variable | Default | Description | |---|---|---| | `WIFI_SSID` | _(empty)_ | Target SSID to connect to. If empty, the hotspot starts immediately. | | `HOTSPOT_SSID` | `raspbot-hotspot` | SSID of the fallback hotspot | | `HOTSPOT_PASSWORD` | `raspbot1234` | Passphrase for the fallback hotspot | | `HOTSPOT_BAND` | `bg` | Wi-Fi band: `bg` (2.4 GHz) or `a` (5 GHz) | | `WIFI_IFACE` | _(auto-detect)_ | Wi-Fi interface name. Auto-detected from NetworkManager if empty. | | `WIFI_TIMEOUT` | `30` | Seconds to wait for the target SSID before creating the hotspot | | `POLL_INTERVAL` | `15` | Seconds between connection checks | --- ## Docker requirements The container needs `NET_ADMIN` capability and access to the host D-Bus socket: ```yaml cap_add: - NET_ADMIN volumes: - /run/dbus/system_bus_socket:/run/dbus/system_bus_socket ``` Both are already configured in `docker-compose.yml`.