Repository navigation
FUG-83: derive AP SSID + mDNS/DHCP hostname from the configured device name - #56
Merged
Merged
Conversation
…e name The soft-AP SSID was hardcoded "ledmapper" and there was no mDNS/hostname at all — only a hardcoded "ledmapper.local" baked into the wss cert SAN. Derive both from the user-configured device name: - AP SSID = "<name>-AP" (SSIDs allow spaces; capped to the 32-byte limit). - hostname = a DNS-label-safe slug of the name (keep [A-Za-z0-9], collapse other runs to '-', trim) so <hostname>.local resolves, e.g. "Led Widget A1B2C3" -> "Led-Widget-A1B2C3", "TestWidget" -> "TestWidget". Bring up the IDF mDNS responder (hostname + friendly instance name + a _http._tcp service) so <hostname>.local resolves; set the STA/AP DHCP hostnames too; and use <hostname>.local (not the hardcoded string) in the wss cert SAN so https://<name>.local matches. A live rename reconfigures the AP SSID, hostnames and mDNS, and forces a cert re-issue. setup() is reordered so the device name is resolved before WiFi comes up; g_cert_ip is relocated so the rename path can reset it. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
FUG-83 AP name and hostname should match configured name
When the user configures the device name, that name should also be used for the AP and the hostname (for mDNS). E.g. if the device name is |
Contributor
|
issuefleet Bot
pushed a commit
that referenced
this pull request
Aug 7, 2026
The rebase onto #56 (FUG-83) removed kApSsid (now the derived g_ap_ssid) and added per-name hostnames + mDNS to the soft-AP bring-up. The re-onboarding watchdog's enter_onboarding still called WiFi.softAP(kApSsid, ...) — now mirror the initial bring-up: setHostname + softAPsetHostname + softAP(g_ap_ssid) + mdns_begin_or_update, so a LAN-loss re-provisioning surface is identical to a fresh boot's. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
issuefleet Bot
pushed a commit
that referenced
this pull request
Aug 9, 2026
The rebase onto #56 (FUG-83) removed kApSsid (now the derived g_ap_ssid) and added per-name hostnames + mDNS to the soft-AP bring-up. The re-onboarding watchdog's enter_onboarding still called WiFi.softAP(kApSsid, ...) — now mirror the initial bring-up: setHostname + softAPsetHostname + softAP(g_ap_ssid) + mdns_begin_or_update, so a LAN-loss re-provisioning surface is identical to a fresh boot's. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This branch was previously deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
The device name the user configures now drives the soft-AP SSID and the
device hostname, as requested in FUG-83.
<name>-AP(was hardcodedledmapper). SSIDs allow spaces, sothe display name is used verbatim, capped to the 32-byte SSID limit.
<name>.localresolvesover mDNS. Slugging keeps
[A-Za-z0-9], collapses any other run to a single-, and trims — e.g.Led Widget A1B2C3→Led-Widget-A1B2C3, and a simpleTestWidgetstaysTestWidget. Empty/all-symbol names fall back toledmapper.So a device named
TestWidgetadvertises theTestWidget-APsoft-AP andanswers to
TestWidget.local, matching the issue's example.How
mdns_init+mdns_hostname_set+mdns_instance_name_setwith the friendly display name + a lightweight_http._tcpservice) so<name>.localresolves on both the STA and soft-APinterfaces. The
espressif__mdnscomponent is already in the SDK.WiFi.setHostname/WiFi.softAPsetHostname) so the router/DHCP leases also show the name.<name>.local(instead of the previouslyhardcoded
ledmapper.local) sohttps://<name>.localvalidates.set_device_name→poll_device_rename) recomputes theSSID + hostname, reconfigures the soft-AP (while it's still up), re-points the
mDNS hostname/instance, and forces a cert re-issue so the new
.locallandsin the SAN.
setup()is reordered so the device name is resolved before WiFi comes up(the SSID + hostname must be known at
WiFi.mode/softAP/begintime);g_cert_ipmoved up so the rename path can reset it.Verification
bazel build -c opt //firmware/player_app:esp32c6— passes, producesesp32c6.bin. This is the real gate: it confirms the mDNS component bothcompiles (header + matching signatures) and links into the image
(
-lespressif__mdnsis in the SDK's link recipe; the symbols resolve).mDNS functions exist with the signatures used.
Not yet exercised on real hardware (no HITL access from this worktree);
suggest a quick DUT check that the AP shows as
<name>-APand<name>.localresolves after a join + after a rename.
Notes
mDNS adds a small always-resident cost. The device already tears the soft-AP
down after a LAN join to free heap for the ~17 KB TLS handshake buffer; the
mDNS responder is comparatively light, but worth watching on a real DUT that
the wss handshake still has headroom.
Closes-Linear: FUG-83 (https://linear.app/fughilli/issue/FUG-83/ap-name-and-hostname-should-match-configured-name)