Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor Border Agent (MeshCoP Service Publisher) #2658

Open
Irving-cl opened this issue Jan 6, 2025 · 0 comments
Open

Refactor Border Agent (MeshCoP Service Publisher) #2658

Irving-cl opened this issue Jan 6, 2025 · 0 comments
Assignees

Comments

@Irving-cl
Copy link
Contributor

Irving-cl commented Jan 6, 2025

This issue tracks the process of refactoring Border Agent.

The background is that we need to support Border Agent under NCP mode as well. However the current implementation of Border Agent MeshCoP Publisher is difficult to work under NCP mode: The MeshCoP Service needs various data from OT core (to compose the txt records), which requires more data sync between host and the NCP. And it also entails more spinel properties and methods. In addition, moving the MeshCoP Service Publisher into OT core has these vantages:

  • The meshcop service publishing module is identical for both NCP & RCP mode. They both rely on the platform mDNS API to publish the meshcop service.
  • The code is more cohesive. When assembling the meshcop service, we can easily get any Thread data we want without calling OT API as it’s in OT core.
  • When the state of the meshcop service changes, OT core can directly update the meshcop service. With the current implemention, the code in ot-br-posix needs to use OT APIs to set a callback to get notified when any data changes and then update the meshcop service. For example, the network state.
  • The code is more flexible. When we want to change the meshcop service, we simply update the module and don’t need to change other things.
  • Under NCP mode, the host program will have less work. Because we hope that the host wakes up as little as possible under NCP mode to save more power.

Related PRs:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant