feat: publish device on the LAN via mDNS / Bonjour#22
Open
PAzter1101 wants to merge 3 commits intojrl290:mainfrom
Open
feat: publish device on the LAN via mDNS / Bonjour#22PAzter1101 wants to merge 3 commits intojrl290:mainfrom
PAzter1101 wants to merge 3 commits intojrl290:mainfrom
Conversation
PlatformIO Library Manager finds two libraries matching `MsgPack@^0.4.2` (hideakitai/MsgPack and mbed-yihui/msgpack) and stalls with an ambiguous-package prompt that fails the build. Pinning the owner keeps the same version range while removing the prompt.
In Boundary mode, advertise the node as `<hostname>.local` and (when the Local TCP Server is enabled) register a `_reticulum._tcp` service so LAN-side Reticulum tools can find it without a static IP or DHCP reservation. In configuration-portal AP mode the captive portal is reachable as `rtnode.local` for users who don't want to remember the `10.0.0.1` AP address. Configuration portal additions: * New "Local Network Name (mDNS)" section with Enable / Disable toggle (default Enabled) and an optional custom Hostname field. Empty hostname falls back to `rtnode<XXXX>` where `XXXX` is the last 4 hex chars of the device MAC. * Hostname input is normalised to lowercase + `[a-z0-9-]` and stripped of leading / trailing hyphens before being saved. EEPROM additions: * `ADDR_CONF_MDNS_EN` @ 0x151 (1 byte) * `ADDR_CONF_MDNS_NAME` @ 0x152 (33 bytes, null-terminated) Both default to "enabled / auto-generated name" when the bytes are unprogrammed (0xFF), so existing installations keep working without a factory reset. OLED layout: * When mDNS is enabled, the right panel shows three rows in the lower area: hostname (`rtnode.local`), IP, port. The previous bottom separator line is dropped to free the row. * When mDNS is disabled, the original two-row layout (IP + port + separator) is preserved unchanged. The mDNS service is implemented as a thin header-only wrapper around `ESPmDNS` in `MdnsService.h`. It is started lazily from the main loop once WiFi finishes its asynchronous association, and is torn down before switching the radio into config-portal AP mode so the ESPmDNS state never survives a WiFi mode change. README updated with the new section, the corrected AP address (`10.0.0.1` / `rtnode.local`), and a hint that `target_host` in the Reticulum interface config can be the device's `.local` name instead of an IP.
Owner
|
I'll check this out. Probably closer to the weekend Just fyi, the IP address is printed on the device screen |
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.
Summary
Adds mDNS / Bonjour publishing so the device is reachable as
<hostname>.localfrom any machine on the same LAN, without needing a static IP or a router-side DHCP reservation. The Local TCP Server (when enabled) is also advertised as a_reticulum._tcpservice for auto-discovery by Reticulum-aware tooling.In configuration-portal AP mode the captive portal is reachable as
rtnode.local, removing the need to remember10.0.0.1.Motivation
Right now the only way to point an external
rnsd(or Sideband) at a transport node's Local TCP Server is to look the address up in the router admin and either set up a DHCP reservation or hard-code the lease. Both break the moment the lease changes hands or the user moves to a different network. mDNS solves it with a stable, human-readable name.What's in the patch
Configuration portal
New Local Network Name (mDNS) section:
rtnode<XXXX>whereXXXXis the last 4 hex chars of the device MAC. Input is normalised to lowercase +[a-z0-9-]and stripped of leading/trailing hyphens before save.OLED display
When mDNS is enabled, the right-panel lower area shows three rows: hostname, IP, port. The previous bottom separator line is dropped to free the row.
When mDNS is disabled, the original two-row layout (IP + port + separator) is preserved unchanged.
EEPROM additions
0x1510x152Both default to "enabled / auto-generated name" when the bytes are unprogrammed (
0xFF), so existing installations keep working without any factory reset.Implementation
mDNS itself is a thin header-only wrapper around
ESPmDNSinMdnsService.h. It is started lazily from the main loop once WiFi finishes its asynchronous association, and torn down before switching the radio into config-portal AP mode so the ESPmDNS state never survives a WiFi mode change.Build fix (separate commit)
platformio.inihadMsgPack@^0.4.2which is now ambiguous betweenhideakitai/MsgPackandmbed-yihui/msgpackand stalls the Library Manager. Pinned tohideakitai/MsgPack@^0.4.2to keep the same version range while removing the prompt. This is its own commit so you can pick it up or skip it.Backwards compatibility
0xFF) reads, so users who flash this build over an existing install get mDNS automatically without losing any saved settings.Testing
Tested on a Heltec V4 (V4.3 revision):
rtnode<XXXX>.localfrom a Linux host (avahi-resolve,getent hosts)_reticulum._tcpservice appears inavahi-browse -art _reticulum._tcpwith the correct port and addressrnsdconnects to the Local TCP Server using the.localname astarget_hostrtnode.localNot tested on Heltec V3 — the implementation only touches the WiFi/Boundary path and uses standard ESPmDNS APIs supported on all ESP32-S3 board variants in this repo, so I expect it to work, but a V3 owner would need to confirm.
Notes