refactor(service): Add destination node number to remote admin commands#4276
Merged
Conversation
This commit refactors the `IMeshService` interface and its implementations to include a destination node number (`destNum`) for various remote administration commands. Previously, commands like `setRemoteOwner`, `beginEditSettings`, `commitEditSettings`, and `rebootToDfu` implicitly targeted the local node (`myNodeNum`). This change makes the target explicit, allowing these actions to be performed on any node in the mesh.
### Key Changes:
- **`IMeshService.aidl`:** The AIDL interface is updated to require a `destNum` parameter for the following methods:
- `setRemoteOwner`
- `beginEditSettings`
- `commitEditSettings`
- `rebootToDfu`
- **`MeshService.kt` & `MeshActionHandler.kt`:** The service and action handler implementations are updated to pass the `destNum` through to the `commandSender`. This ensures that admin packets are sent to the correct destination node.
- **`RadioConfigViewModel.kt`:** When applying a device profile, `beginEditSettings` and `commitEditSettings` are now called with the destination node's number.
- **`UsbUpdateHandler.kt`:** The `rebootToDfu` call now explicitly targets the connected device (`myNodeNum`) for firmware updates.
- **Testing:** The `FakeIMeshService` used in tests has been updated to match the new method signatures.
Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
DaneEvans
approved these changes
Jan 21, 2026
DaneEvans
left a comment
Collaborator
There was a problem hiding this comment.
looks better, I'll test it in internal
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4276 +/- ##
=====================================
Coverage 0.00% 0.00%
=====================================
Files 3 3
Lines 23 23
Branches 7 7
=====================================
Misses 23 23 ☔ View full report in Codecov by Sentry. |
Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
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.
This commit refactors the
IMeshServiceinterface and its implementations to include a destination node number (destNum) for various remote administration commands. Previously, commands likesetRemoteOwner,beginEditSettings,commitEditSettings, andrebootToDfuimplicitly targeted the local node (myNodeNum). This change makes the target explicit, allowing these actions to be performed on any node in the mesh.Key Changes:
IMeshService.aidl: The AIDL interface is updated to require adestNumparameter for the following methods:setRemoteOwnerbeginEditSettingscommitEditSettingsrebootToDfuMeshService.kt&MeshActionHandler.kt: The service and action handler implementations are updated to pass thedestNumthrough to thecommandSender. This ensures that admin packets are sent to the correct destination node.RadioConfigViewModel.kt: When applying a device profile,beginEditSettingsandcommitEditSettingsare now called with the destination node's number.UsbUpdateHandler.kt: TherebootToDfucall now explicitly targets the connected device (myNodeNum) for firmware updates.FakeIMeshServiceused in tests has been updated to match the new method signatures.