Technical Documentation: Settings - Network
Architecture


The Network configuration tab interacts with the robot's NetworkManager or WPA_Supplicant service via the Go Backend's OS bridge.
Technical Details
- File Path: lib/screens/settings_screen.dart (Network Tab)
- Data Model: NetworkInterface (stores SSID, IP, Gateway, DNS, and Stats).
- Backend Bridge: Uses /etc/netplan or similar configuration mechanisms via safe Shell execution on the robot's Linux core.
Functional Components
- Wi-Fi Scanning: Triggers nmcli dev wifi rescan and nmcli dev wifi list to populate the available networks table in the UI.
- Connectivity Ping: Uses a background task on the backend to ping the gateway (e.g., 8.8.8.8) every 10 seconds, pushing the latency_ms to the UI via Socket.IO.
- Static Configurations: Validates IPv4 formats (AAA.BBB.CCC.DDD) in the UI before submitting to prevent breaking the robot's network connectivity.
Safety Mechanism
- Recovery Mode: If a new network configuration fails after 60 seconds, the backend is programmed to automatically revert to the "Last Known Good" configuration to prevent the robot from becoming permanently unreachable.