201 Commits

Author SHA1 Message Date
Jonathan Hui 318b4b0771 [bbr] remove domain prefix support from stack and harness (#13203)
This commit removes all Domain Prefix configuration and management logic
from the OpenThread stack, CLI commands, unit tests, and GRL harness
THCI wrapper.

- Removed public Backbone Router Domain Prefix APIs.
- Removed Domain Prefix flag ('mDp') and 'D' flag parser/formatter
  from core network data types, Spinel, and CLI.
- Cleaned up local Backbone Router and Leader logic to exclude Domain
  Prefix configuration, tracking, and events.
- Updated RoutingManager prefix advertisement (RIO) to exclude
  special handling for Domain Prefix.
- Updated CLI documentation to remove Domain Prefix references.
- Removed domain prefix helper methods from python test certification
  scripts.
- Removed auto-addition of default domain prefix and D flag support
  from GRL harness OpenThread.py.
2026-06-04 19:36:33 -07:00
Jonathan Hui ecd4c92465 [dua] completely remove DUA features and configurations (#13191)
This commit removes the OPENTHREAD_CONFIG_TMF_PROXY_DUA_ENABLE feature
and all associated code, tests, CLI commands, and harness references.

Changes:
- Removed OPENTHREAD_CONFIG_TMF_PROXY_DUA_ENABLE definition and all
  assert/preprocessor checks.
- Completely deleted dua_manager.cpp and dua_manager.hpp.
- Removed DUA registration notifying and request URI paths.
- Cleaned up all references to Domain Unicast Address (DUA) across
  child management, notifier, time ticker, and MLE.
- Removed DUA commands and logic from the CLI and Python cert tests
  (including packet verifier).
- Verified that the entire codebase compiles clean and all tests
  successfully pass using the Nexus test suite.
2026-06-03 12:29:18 -07:00
Abtin Keshavarzian 28f30b3ce8 [nedata] add API to retrieve Commissioning Dataset (#9551)
This commit adds `otNetDataGetCommissioningDataset()` as a public
API to retrieve the Commissioning Dataset from the Network Data.

It also updates CLI `netdata show` command to output the Commissioning
Dataset information. The documentation in `README_NETDATA.md` and
in `cli_network_data` are also updated. The test scripts that parse
`netdata show` output are also updated.
2023-10-23 05:17:51 -07:00
Maciej Baczmański dc97b87376 [thci] fix for ncs thci issues (#9328)
After recent reference device release, two THCI issues
have been found.

This commit adds `"` around command arguments that have
escapable characters (like `ot networkname aa\ bb`),
and skips lines containing only ANSI escape codes
in commissioning logs.

Signed-off-by: Maciej Baczmanski <maciej.baczmanski@nordicsemi.no>
2023-07-31 10:18:08 -07:00
Abtin Keshavarzian 5fc0e7774c [csl] update CSL public APIs to use microseconds unit for period (#9285)
This commit updates public APIs for getting and setting CSL period to
use microseconds unit instead of the internal ten symbols unit. This
makes the APIs easier to use.

The CSL APIs have been renamed to follow the `otLinkGet/SetCsl{Item}()`
pattern, which is the common naming style of OpenThread. This
renaming will make the APIs more consistent and avoid potential
confusion with the now-removed APIs, which used a different unit for
CSL period.

This commit also updates the related CLI CSL commands:
- The `csl period` expects the given period to be in microseconds.
- The `csl` command (which outputs all CSL parameter) shows the CSL
  period in microsecond unit (e.g., "Period: 160000us").

The NCP spinel `SPINEL_PROP_THREAD_CSL_PERIOD` is also updated to use
microsecond unit for CSL period.

The related test script are updated to use the new unit, in particular
the test harness `setCSLperiod()` in `harness-thci/OpenThread.py` is
updated (no need to convert from msec).
2023-07-19 13:21:29 -07:00
Yakun Xu 11a38a63de [build] remove autotools (#9027)
This commit removes autotools support from OpenThread project.
2023-06-28 08:54:23 -07:00
Przemysław Bida 5ffdab8302 [thci] revert spellcheck in THCI method names (#9175)
Reverting name change intialize -> initalize. To fix thread harness
issues.
2023-06-16 10:12:44 -07:00
Zhanglong Xia f64b7cc73c [test] add code spell check and correct wrong spelling (#9066) 2023-05-22 18:04:09 -07:00
Abtin Keshavarzian af031f3b50 [netdata] new API to get lowpan context IDs (#8870)
This commit adds `otNetDataGetNextLowpanContextInfo()` to iterate
through the list of LoWPAN Context entries in Thread Network Data
providing info about the prefix, its LoWPAN Context ID and Compress
flag (relating to `ContextTlv` sub-TLVs of `PrefixTlv`s in Network
Data).

This commit also updates CLI command `netdata show` to list the
context IDs in addition to prefixes, routes, and services.
2023-03-17 21:39:59 -07:00
Abtin Keshavarzian 2caa934410 [routing-manager] new APIs to get state and new CLI commands (#8784)
This commit adds new public OT APIs in `border_routing.h` to get the
current state of `RoutingManager` and to get the current favored
on-link prefix.

This commit also updates CLI `br` commands:
- It moves the CLI `br` implementation into own `cli_br` module.
- It adds `br state` to get the current state
- It changes `br omrprefix`, `br onlinkprefix`, and `br nat64prefix`
  to output both local and favored prefixes when no additional arg
  is provided and allow the use of `local` or `favored` extra arg to
  specify the type.
- It updates the documentation of `br` related commands in the source
  code and also adding `cli/README_BR.md`.
2023-02-27 19:03:29 -08:00
Eduardo Montoya f23eee42f8 [thci] fix setBbrDataset (#8261)
Cover the case when neither `MlrTimeout` or `ReRegDelay` are being
modified.
2022-10-11 08:31:08 -07:00
Eduardo Montoya a34d1176b9 [thci] remove unneeded problematic command (#8235)
Listing the table of rules results in SSH disconnection under some
circumstances. Removing the command since it doesn't add any
functionality.
2022-10-06 09:03:26 -07:00
Jiachen Dong fe655f4ef1 [thci] make OpenThreadTHCI compatible with Thread reference 20200818 (#8195) 2022-09-22 11:37:30 -07:00
Simon Lin 3a64f399bf [thci] wait for connection reset in powerDown (#8166)
This commit fixes `powerDown` to wait for connection reset after
issuing `reset` command.
2022-09-16 08:31:27 -07:00
Simon Lin b11121b7b5 [thci] fix mdns_query incorrect ip6tables rules (#8159)
This commit fixes the bug that `mdns_query` inserts `ip6tables` rules
in an incorrect order.  It also uses `ip6tables -F INPUT` to flush the
`INPUT` chain after mDNS query is done.
2022-09-15 08:52:41 -07:00
Simon Lin a7e0516fb2 [thci] allow custom otbr-agent log dumping command via Param9 (#8137)
This commit allows THCI to use custom command to dump `otbr-agent`
logs via `Param9`.
2022-09-14 23:03:34 -07:00
Jiachen Dong a0c4ede86d [harness-simulation] add support for RF enclosure simulation (#8092)
This commit adds support for RF enclosure simulation. It can pass
Leader 9.2.9, Router 9.2.9 and Router 9.2.10 in Thread Test Harness
v56.0 now.
2022-09-14 14:31:06 -07:00
Eduardo Montoya 130cfd790c [thci] remove unused methods (#7704)
`setActiveDataset` and `setCommisionerMode` have been removed from
the `iThci` abstract class in the latest harness release.
2022-08-23 16:30:10 -07:00
Jiachen Dong 0b8e9745e5 [thci] add support for OTBR simulations (#8015)
It can run all Thread 1.2 test cases with simulations now except those
requiring multiple versions support. It has been tested with the DUT
being a role of Router, Leader, Border Router, BR_1 and BR_2.
2022-08-22 21:32:45 -07:00
Simon Lin 1bc309452f [thci] send mdns queries without dig (#7954)
Some mDNS implementations do not respond to mDNS queries sent by
`dig`.
2022-08-16 13:18:55 -07:00
Simon Lin 3120efb486 [thci] restore BBR config for 1.2 BR_1/BR_2 roles (#7997)
BBR related configurations was previously removed for Thread 1.3 BRs.
However, when running 1.2 test case for a Thread 1.3 BR, these
configurations are still necessary.

This commit restores BBR dataset configurations for 1.2 BR_1/BR_2
roles.
2022-08-11 11:08:48 -07:00
Simon Lin f4d93d8fcf [thci] enhance mdns_query to use ip6tables to filter mDNS responses (#8000) 2022-08-11 10:24:52 -07:00
Simon Lin 919157d0a6 [thci] generate more logs (#7975) 2022-08-09 09:19:20 -07:00
Jiachen Dong 0a41196540 [thci] add SSH keepalive (#7999)
Add SSH keepalive to avoid disconnection after idle for a long time.
2022-08-08 18:18:21 -07:00
Simon Lin e538aad095 [thci] find border agents with non link-local addresses (#7853)
Thread BR may advertise IPv6 GUA rather than LLA. For example, Avahi
stops publishing LLA when any GUA is found on the network interface.

This commit enhances mdns_query to find border agents with
non-link-local addresses.
2022-07-19 09:12:17 -07:00
Simon Lin 6242a1e68e [thci] allow to specify custom commands (#7912)
This commit uses `Param9` to specify custom commands for Thread BR
THCI to control `otbr-agent`.
2022-07-19 08:51:20 -07:00
Simon Lin 86e642379c [thci] configure backbone netif (#7804)
The backbone netif is always set to `eth0` in the original THCI. This
commit allows to configure backbone netif via THC parameter `Param8`.
2022-06-29 13:32:00 -07:00
JaneFromSilabs 7576306553 [thci] support 1.3 border router configurations (#7826)
Adding support for 1.3 style border router configurations which are
different from the 1.2 style border router configurations.  The
'device capabilities' is used to differentiate between these 2 device
types to assign them their needed configuration parameters.

Also moving restartAgentService to the proper class.
2022-06-28 09:32:39 -07:00
Simon Lin b7c2c52d5c [thci] wait for netdata to stabilize if BORDER_ROUTING is enabled (#7798)
A BR with `BORDER_ROUTING` feature may add OMR prefix and external
routes to the network data when Thread is started.  The network data
changes may incur additional Thread communications that may interfere
with certification traffic.

This commit enhances THCI to wait for the network data to stabilize
after the BR is started.
2022-06-14 20:11:27 -07:00
JaneFromSilabs d0a7147165 [thci] add support for Thread Version 4 (1.3) (#7806) 2022-06-13 10:36:54 -07:00
Eduardo Montoya 7cd73f30a4 [thci] version string depending on capabilities (#7665)
Return different output of `ValidateDeviceFirmware` depending on the
device's capabilities. This allows to have a single THCI file for the
same vendor for different device's versions.
2022-05-09 20:57:00 -07:00
Eduardo Montoya 43be7f41f8 [thci] logging cleanup (#7654)
Remove excesive logging redundancy:
- `API` decorator is enough to show test script calls with arguments
- `__executeCommand` already prints all OT commands and arguments
- Command timestamp is irrelevant in most cases
- Some extra detail logging lines are left commented in case they
  are needed for some debugging

As a result test logs are much easier to follow and resulting files
are much smaller.
2022-05-05 14:03:25 -07:00
Eduardo Montoya d2f18d5ebc [thci] remove support for legacy Harness tool (#7651)
Currently the official Thread Harness has support for device
capabilities even for Thread 1.1 tests.
2022-05-02 09:42:15 -07:00
Eduardo Montoya 5eb0537cf0 [thci] increase BBR Sequence Number when dataset changes (#7558)
Make sure BBR Sequence Number is increased when Re-registration
Delay or MLR Timeout changes.
2022-04-07 11:46:06 -07:00
Eduardo Montoya 47fd27be3e [mac] remove beacons payload (#7472)
Thread Specification v1.2.1 removes support for Thread Beacons payload.
2022-04-06 12:18:22 -07:00
Eduardo Montoya 01ff8952ab [thci] do not set P_slaac flag for Domain prefix (#7557)
According to the Thread Specification the `P_slaac` flag should be
set to false for the Domain prefix.
2022-04-03 18:11:38 -07:00
Eduardo Montoya f9f316314b [bbr] revert add bbr skipseqnuminc command for reference device (#7534)
This reverts commit c9066b6506 (#7283).
2022-03-29 22:16:53 -07:00
Eduardo Montoya 95aaae9fdb [thci] fix RA configuration for eth0 in the host device (#7506)
`accept_ra` was not being set properly for host reference device.

Some cleanup is added for simplification.
2022-03-22 21:25:25 -07:00
Eduardo Montoya c24e5dd6c4 [thci] selectively configure Domain Prefix advertisement on the host (#7491)
Implement changes in `setupHost` method to be able to selectively
configure the RA for the Domain Prefix.
2022-03-21 09:27:02 -07:00
Eduardo Montoya 15a9c4c0bd [thci] unify IPv6 prefix representation (#7477)
Switch to IPv6 dotted-quad format in all uses.
2022-03-14 11:25:07 -07:00
Eduardo Montoya 73eba74fc8 [thci] avoid further delay after ping command (#7457)
Test L5.3.5 is failing sometimes because there are unwanted data
requests during the second ping round. This can be mitigated by
finishing earlier with this round so there is no need for children
to synchronize CSL.
2022-03-09 08:45:38 -08:00
Eduardo Montoya 465518ec64 [thci] find IPv6 border agents only (#7452)
Without this fix some Border Agents will not send mDNS responses
with AAAA record for IPv6 link local address.
2022-03-08 17:25:35 -08:00
Eduardo Montoya db0833f73c [thci] fix setBbrDataset (#7455) 2022-03-07 10:17:25 -08:00
Simon Lin 417b5645be [thci] support ssh connection with root user (#7399) 2022-03-01 23:46:46 -08:00
Abtin Keshavarzian 564982c818 [log] implement new logging model with module name support (#7385)
This commit implements new logging model in OpenThread. Each core
module can specify its own module name using `RegisterLogModule()`.
The registered log module name is then included in the all the log
messages emitted from the specific file. This model replaces and
enhances the log region model.
2022-02-17 15:50:45 -08:00
Eduardo Montoya a727275259 [thci] move zeroconf execution to the commissioner device (#7419)
So far zeroconf was running on the Windows Harness server and there
was no control on which Ethernet interface to scan.
2022-02-16 10:24:13 -08:00
JaneFromSilabs 9e0bf6a263 [thci] prefix fix for TH 1.1 border router 7.x.x cases (#7367) 2022-01-31 10:25:09 -08:00
Eduardo Montoya 1c6062c610 [thci] fix implementation of setKeepAliveTimeOut (#7373)
Thread 1.2 harness uses this method to set the child timeout in
DUA-TC-10, DUA-TC-21 and DUA-TC-22.
2022-01-28 12:00:53 -08:00
Karthick 9f70bafd67 [thci] update registerMulticast to align with #7253 (#7364)
Enabling registration to multiple mcast addresses on the same command
line in THCI.
2022-01-28 08:21:03 -08:00
Simon Lin 9e17e471ad [thci] print traceback and re-raise exceptions (#7356)
THCI used to catch Exceptions and print errors using
`ModuleHelper.WriteIntoDebugLogger`. However, in most of time it just
help hide the actual issue and make it harder to debug.

Re-raising the exceptions should be a better approach:
- @API decorator will print the full exception Traceback via
  `ModuleHelper.WriteIntoDebugLogger` and then re-raise.
2022-01-28 08:14:59 -08:00