mirror of
https://github.com/espressif/openthread.git
synced 2026-06-06 05:24:51 +00:00
66c7272eef
This commit introduces the Border Agent Admitter feature , which enhances Thread MeshCoP. A Border Admitter is an enhanced Border Agent that functions as a traditional BA while enabling new behaviors. It acts as a proxy and dispatcher, allowing multiple external Enrollers to connect to it. It then petitions to become the single Active Commissioner on the Thread mesh, forwards new joiner requests to connected Enrollers, and manages the session between joiners and multiple Enrollers The implementation includes three main components: - `Admitter`: The main class that orchestrates the feature, managing enroller sessions and aggregating steering data. - `Arbitrator`: A distributed election mechanism that runs among Border Admitters on the mesh to select a single "Prime Admitter" by publishing a new Border Admitter service in the Thread Network Data. - `CommissionerPetitioner`: A sub-component responsible for petitioning the Leader to be granted the commissioner role. It handles conflicts if another commissioner is already active. New public APIs are added in `openthread/border_agent_admitter.h`. This commit also introduces a suite of comprehensive tests for the Border Admitter functionality under the `nexus` test framework. It covers various scenarios including: - Prime Admitter election and role management - Enroller registration, keep-alive, and timeout interactions - Handling of commissioner conflicts and petitioner retry mechanisms - Support for multiple enroller sessions and combined steering data - Forwarding of Joiner `RelayRx` and `UdpProxy` messages - Joiner acceptance, release, and expiration tracking