WifiGD
WifiGD is a GDExtension add-on for Godot 4.3+ that lets your game or tool control system Wi‑Fi from GDScript. Scan nearby networks, connect (open or WPA2‑PSK), disconnect, list adapters, read connection state (SSID, IP, gateway, DNS), and enable or disable the Wi‑Fi radio — with both sync and async APIs so heavy OS work can stay off the main thread.
Godot has no built-in Wi‑Fi API. WifiGD wraps native OS APIs behind a single WifiManager node you can register as an autoload or place in a scene.
Features
- Scan nearby Wi‑Fi networks (SSID, BSSID, signal strength, security type)
- Connect and disconnect (open and WPA2‑PSK)
- Radio control — check and toggle system Wi‑Fi on/off
- Adapters — list network interfaces and filter by adapter when needed
- Connectivity — connection state, active SSID, local IP, gateway, DNS
- Async-first — worker-thread operations with signals (
scan_completed,connect_completed,disconnect_completed,connectivity_changed,wifi_enabled_changed, and more) - Cached state — polled connectivity and radio state for UI-friendly updates
- Prebuilt binaries for Windows and Linux (debug + release, x86_64)
- Demo scene included for a quick UI walkthrough
- MIT license
Platforms
| Platform | Status |
|---|---|
| Windows 10/11 (x86_64) | Supported (Native WLAN API) |
| Linux (x86_64) | Supported (NetworkManager / libnm) |
| macOS | Not implemented yet |
Quick start
- Install from the Asset Library, or copy
addons/WifiGD/into your project. - Ensure binaries exist under
addons/WifiGD/bin/for your platform. - Add the autoload scene as a singleton (recommended), e.g. name it
WiFi:
res://addons/WifiGD/wifi_manager_autoload.tscn - Connect signals and call async methods from GDScript.
func _ready() -> void:
WiFi.scan_completed.connect(_on_scan_done)
WiFi.scan_wifi_networks_async()
func _on_scan_done(networks: Array, error: int, message: String) -> void:
if error != OK:
push_error(message)
return
for net in networks:
print(net.ssid, " ", net.signal_strength)
Permissions & requirements
Desktop OSes gate Wi‑Fi APIs with system policy:
- Windows: Location services must be on for active scans; radio toggle may need administrator rights.
- Linux: NetworkManager required; connect/disconnect and radio toggle may need polkit authorization. Godot does not show polkit dialogs — run from a full desktop session or configure polkit rules as needed.
See the project README for full permission details and platform notes.
What you get
WifiManagerclass (extendsNode)- Autoload scene + example demo scene
- Prebuilt Windows (
.dll) and Linux (.so) libraries - In-editor class docs (
WifiManager)
No editor plugin setup — registration is via WifiGD.gdextension.
Ideal for
- LAN / local multiplayer tools that need to join a known SSID
- Kiosk, installation, or venue builds that manage network selection
- Diagnostics, admin, or setup screens inside a Godot app
- Prototypes that need real Wi‑Fi control without leaving Godot
API
WifiManager extends Node. Prefer the async methods during gameplay; sync variants block until the OS request finishes. Empty adapter_id uses the default Wi‑Fi adapter.
| Method | Description |
|---|---|
scan_wifi_networks_async(adapter_id := "") |
Scan nearby networks; result via scan_completed |
connect_to_wifi_async(ssid, password := "", adapter_id := "") |
Connect (open or WPA2‑PSK); result via connect_completed |
disconnect_from_wifi_async(adapter_id := "") |
Disconnect; result via disconnect_completed |
fetch_adapters_async() |
Refresh adapter list; result via adapters_updated |
set_wifi_enabled_async(enabled) |
Toggle Wi‑Fi radio; result via wifi_radio_set_completed |
is_wifi_enabled() |
Whether the radio is effectively on |
get_wifi_radio_state() |
Dictionary: enabled, can_toggle, permission, etc. |
get_connectivity_info() |
Connection state, SSID, IP, gateway, DNS |
get_connection_state() |
DISCONNECTED / CONNECTING / CONNECTED / FAILED |
get_network_adapters() / get_cached_adapters() |
Adapter list (live or last cached) |
get_last_error() |
Short user-facing message for the last failure |
Sync counterparts: scan_wifi_networks, connect_to_wifi, disconnect_from_wifi, set_wifi_enabled.
| Signal | Payload |
|---|---|
scan_completed |
networks: Array, error: int, message: String |
connect_completed |
error: int, message: String |
disconnect_completed |
error: int, message: String |
adapters_updated |
adapters: Array, error: int, message: String |
connectivity_changed |
info: Dictionary |
connection_state_changed |
state: int, ssid: String |
wifi_enabled_changed |
enabled: bool |
wifi_radio_set_completed |
error: int, message: String |
error is a Godot Error code (OK, ERR_CANT_CONNECT, ERR_BUSY, …). Scan/network results are dictionaries (ssid, signal_strength, is_secured, …).
DISCONNECTED (0) · CONNECTING (1) · CONNECTED (2) · FAILED (3)
Full parameter lists and dictionary field docs are in the project README and in-editor class reference.
License
MIT — free for commercial and non‑commercial use.
Support & docs
Full API tables, data types (WifiNetwork, NetworkAdapter, ConnectivityInfo, WifiRadioState), build instructions, and roadmap: project repository and README.
Changelog for version v0.1.0
No changelog provided for this version.