mirror of
https://github.com/espressif/openthread.git
synced 2026-07-11 06:40:19 +00:00
bdb394eb3b
This commit introduces the `BorderAgent::EphemeralKeyManager` class, which manages the use of the ephemeral key by the Border Agent. The `EphemeralKeyManager` uses its own DTLS transport and CoAP secure sessions. This allows the `EphemeralKeyManager` and the `BorderAgent` service (which uses PSKc) to be enabled and used in parallel. Previously, a single transport and session was shared between these functions, requiring the normal BA service (with PSKc) to be stopped before the ephemeral key could be used. This is a fundamental change and improvement to the ephemeral key and Border Agent functionality. Therefore some existing `otBorderAgent` APIs need to be modified. For example, `otBorderAgentGetState()`, which returned the Border Agent state to indicate whether there were any active sessions, is no longer meaningful, as different sessions/transports are now used for PSKc and ephemeral key, and there can be multiple sessions. This commit intentionally renames and changes the `otBorderAgent` public APIs, specifically all those related to ephemeral key use, to highlight the fundamental change in behavior. While this can cause backward incompatibility, it requires app layer code that used the previous APIs to be updated to take into account the new behavior. This commit also updates `nexus/test_border_agent`, adding new tests to validate the new behavior (e.g., BA service and ephemeral key parallel sessions). It also includes and validates the Border Agent counter updates under different scenarios (this enhances and replaces `test_ephemeral_key_counters.py`).
OpenThread Certification Tests
Inspector
Inspect nodes status by the following modification:
- Insert the inspector to where you want to inspect.
import debug
debug.Inspector(self).inspect()
- Run the test and it will stop at the line above and prompt
#.
./script/test clean build cert tests/scripts/thread-cert/Cert_5_1_01_RouterAttach.py
- Inspect
#
# 1
> state
leader
> exit
# 2
> panid
face
> exit
# exit
CLI reference
# mode
This is selection mode. You may select the node to inspect here.
list- list available nodes.exit- end inspecting, continue running test case.- <number> - select the node with id <number>. This will result in entering
>mode.
> mode
This is node mode. You may run OpenThread CLI here.
exit- go back to#mode.