feat: wi-fi - expand support and fix issues, add GUI components

This commit is contained in:
2026-08-07 10:36:53 +02:00
parent bbe1df62fd
commit 9eb21eb3e3
67 changed files with 4573 additions and 245 deletions
+24
View File
@@ -224,6 +224,10 @@ namespace montauk::abi {
static constexpr uint64_t SYS_WIFI_INFO = 159; // (WifiInfo*) -> 0, -1 if absent
static constexpr uint64_t SYS_WIFI_CONNECT = 160; // (ssid, password) -> 0, <0 on error
static constexpr uint64_t SYS_WIFI_DISCONNECT = 161; // () -> 0
static constexpr uint64_t SYS_WIFI_SCAN_START = 162; // (timeoutMs) -> 0 started, 1 busy, -1 no adapter
static constexpr uint64_t SYS_WIFI_RESULTS = 163; // (WifiNetwork*, maxCount) -> count, no radio work
static constexpr uint64_t SYS_WIFI_CONNECT_ASYNC = 164; // (ssid, password) -> 0 accepted, <0 on error
static constexpr uint64_t SYS_NETIFS = 165; // (NetIfInfo*, maxCount) -> count
// Tunable parameters (for SYS_SDR_SETPARAM / SYS_SDR_GETPARAM).
static constexpr int SDR_PARAM_FREQ = 0; // center frequency, Hz
@@ -633,6 +637,26 @@ namespace montauk::abi {
uint8_t bssid[6];
uint8_t connected; // 1 once the link can carry IP traffic
uint8_t channel;
int32_t lastError; // WIFI_ERR_* from the last async join, 0 = none
uint32_t scanGeneration; // bumped every time a scan finishes
uint8_t joining; // 1 while an async join is in flight
uint8_t _pad[3];
};
// Link-layer interface kinds reported in NetIfInfo.kind.
static constexpr uint8_t NETIF_KIND_ETHERNET = 0;
static constexpr uint8_t NETIF_KIND_WIRELESS = 1;
// One registered link-layer interface (returned by SYS_NETIFS). The IP
// configuration is global to the stack, so it belongs to whichever
// interface reports active = 1.
struct NetIfInfo {
char name[16]; // "eth0", "wlan0"
uint8_t mac[6];
uint8_t kind; // NETIF_KIND_*
uint8_t linkUp;
uint8_t active; // 1 if this is the interface carrying traffic
uint8_t _pad[3];
};
struct ThermalInfo {