Wi-Fi: fixed IPv4 settings (address, gateway, DNS) and NTP servers #7
Closed
opened 2026-10-05 09:44:49 +00:00 by twisla
·
2 comments
No Branch/Tag Specified
Labels
Clear labels
area/apps
area/audio
area/build
area/cluster
area/gemini
area/gitea
area/gnss
area/ir
area/irc
area/lora
area/ota-debug
area/power
area/scripting
area/ssh
area/storage
area/ui
area/vpn
area/website
area/wifi
concern/memory
concern/security
Launcher and the apps in src/apps
Microphone, speaker, the codec, recording and playback
PlatformIO, Docker, scripts, partitions, sdkconfig
AtomS3 co-processors on Grove and the link protocol
GeminiService, the Gemini App, Saved Pages
The Gitea client: issues, releases, its TLS and its token
GnssService, the GNSS App, Tracks
The infrared LED and the IR Remote
IrcService and the IRC App
The Cap LoRa-1262 radio and the mesh
Updates, Probation, Safe Mode, Debug Console, crash reports
Battery, PowerService, sleep
Lua Apps from the SD card and their API
The SSH client and its terminal
StorageService, the SD card, Storage page
Canvas, widgets, dialogs, Toasts, fonts, keyboard
The WireGuard tunnel
The project website and its docs
WifiService, Wi-Fi Settings, Wi-Fi Tools
May push the heap towards its floors; measure on the device
TLS, signing, the debug token, trust on first use
kind
bug
Something that doesn't work as it should
kind
chore
Refactors, tooling, CI, scripts
kind
docs
README, CONTEXT, milestones, ADRs
kind
feature
Something new the device can do
priority
high
Next up
priority
low
Some day
priority
medium
Soon
status
blocked
Waiting on something else
status
needs-design
Needs a question round (Qnn) before code
status
ready
Designed; can be started
Milestone
No items
No Milestone
S1 System basics
Assignees
twisla (Clément Martin)
Clear assignees
No Assignees
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: twisla/roro9stack#7
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Idea
In Settings, let each network use either DHCP or a fixed IPv4 configuration: address, netmask, gateway and DNS servers. Also make the NTP servers configurable. Both come with public defaults, so they work out of the box.
Why
Not every network has a DHCP server: a lab bench, a direct link to a router, a phone hotspot with DHCP turned off, or a network where addresses are handed out by hand. This is basic system configuration. Today the device simply can't join such a network.
What's known
pool.ntp.org(src/services/wifi_service.cpp:92), and DNS always comes from DHCP.lib/wifi/src/saved_networks.h, and the IP configuration belongs to a network: an address that's right on one network is wrong on another.WiFi.config(ip, gateway, subnet, dns1, dns2)is called before connecting. With DHCP, DNS comes from the DHCP server unless overridden.lib/wifi.9.9.9.9with Cloudflare1.1.1.1as the second. lwIP holds up to 3 DNS servers.pool.ntp.org, as today.CONFIG_LWIP_SNTP_MAX_SERVERShas to be raised incustom_sdkconfig, next to the TLS buffer settings (ADR 0006).esp_sntp_servermode_dhcp.Questions for the design round
Related
lib/wifi/src/saved_networks.h,src/services/wifi_service.cpp(startNtp),src/apps/wifi_settings_page.cpp, ADR 0006 (custom_sdkconfig).Built on the
s1branch (bdd027c,3e27973, and the Settings screens after them), following a design round (docs/milestones/S1.md, Q105 to Q116). Checked on the device, onknbg-guests(10.39.39.0/24, gateway 10.39.39.1).What it does
wifi ip.Corrections to the text above
Tested: Fixed .12 and .13 reach the internet; a wrong gateway on a trial reverted by itself; back to DHCP; "Always use my DNS" on and off; both NTP servers answer; refusals on the console and in Settings.
Not tested: NTP servers offered by DHCP (this network offers none), and a Fixed network with no gateway.
To close when
s1is merged.Shipped in v0.7.0 (
s1merged intomain).