Skip to content

Add Destination::set_default_app_data() - #104

Merged
attermann merged 1 commit into
attermann:masterfrom
tostolaza:feat/destination-default-app-data
Nov 10, 2026
Merged

attermann merged 1 commit into
attermann:masterfrom
tostolaza:feat/destination-default-app-data

Conversation

@tostolaza

Copy link
Copy Markdown
Contributor

Problem

Destination::announce() already falls back to _default_app_data when it is called without app_data, but there is no way to set it. Announces sent in answer to path requests (Transport calls announce() with empty app_data) therefore never carry app_data. A NomadNet node reached through a path response, typically from another interface or via a transport node, shows up in clients as "Peer " instead of by name.

Change

Add Destination::set_default_app_data() and clear_default_app_data(), matching the Python RNS Destination API. No behaviour changes unless an application sets a default.

Tested

  • nRF52840 (MASN V1.2) running microReticulum_Firmware in transport mode, with the NomadNet node name set as default app_data: clients on another interface now list the node by name.
  • Not tested: ESP32, native.

Used by attermann/microReticulum_Firmware#123, which calls it only when the library provides it, so the firmware builds either way.

🤖 Generated with Claude Code

Destination::announce() already falls back to _default_app_data when it
is called without app_data, but nothing could set it. Announces sent in
answer to path requests (Transport calls announce() with empty
app_data) therefore never carried app_data, so a NomadNet node reached
through a path response showed up in clients as "Peer <hash>" instead of
by name.

Add set_default_app_data() and clear_default_app_data(), matching the
Python RNS Destination API.

Tested on an nRF52840 (MASN V1.2) running microReticulum_Firmware: with
the node name set as default app_data, clients on another interface show
the NomadNet node by name.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@attermann

Copy link
Copy Markdown
Owner

Thanks for this, and for the clear write-up of the path-response symptom. Having the setter is overdue, since announce() already falls back to the default.

It's small, matches the Python API, and CI is green. One optional follow-up: a small test that checks an announce with no app_data picks up the default would help. It doesn't need to block this PR.

@attermann
attermann merged commit 877a0d1 into attermann:master Nov 10, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants