176 Commits

Author SHA1 Message Date
Abtin Keshavarzian 3fec404eff [seeker] introduce new otSeeker APIs (#12357)
This commit introduces Seeker APIs in OpenThread. An earlier commit
extracted the discovery and candidate selection logic from the `Joiner`
role into a new, standalone `Seeker` module.

The `Seeker` is responsible for performing MLE Discover Scans to find
nearby Joiner Router candidates. It prioritizes these candidates based
on RSSI and steering data (indicating whether the Joiner is preferred)
and manages the list of candidates for connection attempts.

This separation allows the `Seeker` functionality to be utilized
independently of the full `Joiner` role, enabling the development of
custom joining mechanisms over Thread.

A new configuration option `OPENTHREAD_CONFIG_SEEKER_ENABLE` has been
added to control the presence of `otSeeker` APIs.
2026-02-04 15:54:54 -08:00
Yakun Xu 093531d37c [doxygen] expand OT_TOOL_PRINTF_STYLE_FORMAT_ARG_CHECK (#12274)
This commit fixes incorrect return type in doxygen generated doc by
telling doxygen `OT_TOOL_PRINTF_STYLE_FORMAT_ARG_CHECK` should be
expanded. Doxygen got confused with macros following function
declarations.
2026-01-08 11:16:40 -08:00
Abtin Keshavarzian 8274fb4ec1 [meshcop] introduce new public APIs for SteeringData (#12148)
This commit introduces a set of public APIs to allow manipulation
of `otSteeringData`. The new APIs are provided when the configuration
`OPENTHREAD_CONFIG_MESHCOP_STEERING_DATA_API_ENABLE` is enabled.

The internal `SteeringData` is also improved to enhance robustness.
Methods such as `Init()`, `UpdateBloomFilter()` now return an `Error`
to signal failures on invalid arguments (e.g., invalid length)
instead of asserting.
2025-12-02 12:43:14 -08:00
Abtin Keshavarzian eb51d4be51 [multi-ail-detector] allow detector to run independently of Border Routing (#12078)
This commit updates the Multi-AIL Detection feature to operate
independently of the Border Routing Manager. This fundamental change
allows the detector to be enabled/disabled on its own, rather than
being tied to the Border Routing Manager's state.

This change also moves the Multi-AIL detection API into a separate
`openthread/multi_ail_detection.h` header and introduces new APIs to
control the detector independently. Corresponding CLI commands are
also added.

The `test-505-multi-ail-detection.py` is also updated to validate
this new independent behavior. In particular that a device that is
not enabled to act as a BR can independently run multi-AIL detection
and determine whether, if it becomes a BR, it will cause multi-AIL
issues.
2025-11-12 22:09:42 +01:00
Abtin Keshavarzian ce17d9e6a9 [doc] add API re-entrancy and error handling rules (#12057)
Adds two important notes to the main API documentation header to clarify
critical usage rules for all OpenThread APIs.

- The first note states that all API calls and callbacks must be
invoked from the same OS context (e.g., the same thread).
- The second note clarifies the behavior of output parameters when an
  API call returns an error.
2025-10-28 08:56:04 -07:00
jamesluo11 f52cf29454 [readme] add Beken to who-supports-openthread list (#12035) 2025-10-27 17:03:27 -07:00
Abtin Keshavarzian ad1cfb749e [border-agent] introduce Border Agent TXT Data Parser (#12009)
This commit introduces a new feature to parse the MeshCoP service TXT
data from a Border Agent.

The new API `otBorderAgentTxtDataParse()` allows parsing the raw TXT
data into a structured `otBorderAgentTxtDataInfo` object. This can be
used by applications to inspect the capabilities and status of a
discovered Border Agent.

Config `OPENTHREAD_CONFIG_BORDER_AGENT_TXT_DATA_PARSER_ENABLE` controls
this new feature.

The existing test for the Border Agent is updated to validate the new
parser and its output.
2025-10-22 09:40:18 +08:00
Abtin Keshavarzian 2af369e844 [meshcop] add BorderAgentTracker to discover Border Agents (#11985)
Introduces a new `BorderAgentTracker` module to discover and track
Border Agents on the infrastructure link.

The tracker browses for the `_meshcop._udp` mDNS service and maintains
a list of discovered Border Agents. For each discovered service, it
resolves the port, host name, TXT record, and host addresses.

This change also adds new public otBorderAgentTracker APIs,
corresponding `batracker` CLI commands, and a new Nexus test case to
validate the behavior.
2025-10-06 21:10:36 -07:00
Zhanglong Xia 4cb0de4233 [p2p] add initial peer-to-peer support (#11494)
This commit implements a minimum P2P which only supports
sending/receiving wake-up frames and establishing P2P links between
rx-on-when-idle devices.
2025-09-02 10:12:13 -07:00
Jonathan Hui c182933979 [doxygen] remove empty line at end of block (#10748) 2024-09-24 09:51:34 -07:00
Damian Królik bc50521cfa [mac] multipurpose wake-up frame support (#10728)
1. Add OT_WAKEUP_COORDINATOR and OT_WAKEUP_END_DEVICE build
   options.
2. Add support for parsing and constructing 802.15.4
   Multipurpose frames.
3. Add support for parsing and constructing wake-up
   frames.
2024-09-23 09:02:15 -07:00
Abtin Keshavarzian bf41332061 [mdns] add native mDNS support in OT (#9797)
This commit introduces native mDNS support within the OpenThread
stack, implementing RFC 6762 compliant registration of hosts,
services, and keys. It supports the following functionalities:

- Sending probes to claim names.
- Sending announcements on initial registration and changes.
- Sending "goodbye" announcements when unregistered or upon record
  removal.
- Negative responses (NSEC).
- Support for service sub-types and their addition/removal.
- Support for `_services._dns-sd._udp` queries (all service types).
- Responding to queries (including "QU" questions).
- Delay mechanism when responding to multi-question query messages,
  ensuring unique answers.
- Providing extra records in the Additional Data section if not
  already in the Answer section (e.g., on a PTR query, include SRV
  and host AAAA addresses).
- Implementing Known-Answer Suppression.
- Supporting multi-packet queries with known answers in follow-up
  messages.
- Rate-limiting record multicasts (once per second).
- Rate-limiting probe responses (once per 250ms).
- Detecting conflicts after probes.
- Limiting the size of emitted responses or probes, breaking into
  multiple messages if necessary.
- Detecting self originating messages (sent by mDNS module).
- Support for service browser.
- Support for service resolvers (SRV and TXT records) and IPv4/IPv6
  address resolvers for hostnames.
- Introduces smart cache management:
  - Passively caches service records for active browsers.
  - Passively caches address records for active service resolvers.
- Enables multiple simultaneous browsers/resolvers for the same
  service/host.

This commit introduces public `otMdns` OpenThread APIs and related CLI
commands for the mDNS module.

For platform abstraction, `otPlatMdns` APIs are defined in
`mdns_socket.h` (e.g., to send or receive mDNS messages):

- An implementation of the platform APIs is provided for posix.
- Also under the simulation platform, a simplified implementation of the
  `otPlatMdns` APIs is provided (intended for testing).

This commit also adds a detailed `test_mdns` unit test, validating
various functionalities and covering potential edge cases.
2024-04-09 08:32:01 -07:00
Abtin Keshavarzian 5c6b8328bc [utils] implement Verhoeff checksum calculation and validation (#9966)
This commit adds `Utils::VerhoeffChecksum` class along with public OT
APIs and related CLI commands for Verhoeff checksum calculation and
validation. Unit test `test_checksum` is updated to test the new
module.
2024-04-08 17:11:43 -07:00
Abtin Keshavarzian d099d78620 [doc] use space char instead of tabs in ot_config_doc.h (#9983)
Makes it consistent and follows the OT style guide.
2024-04-01 22:08:57 -07:00
Abtin Keshavarzian b212a0a748 [srp] implement AdvertisingProxy and define Dnssd platform APIs (#9268)
This commit adds a generic SRP Advertising Proxy implementation to
OpenThread core, which uses a set of newly defined `otPlatDnssd`
platform APIs for DNS-SD (mDNS) support on infrastructure network on
a Border Router.

`Srp::Server` provides `ServiceUpdateHandler` callback mechanism that
allows platforms to implement their own advertising proxy function.
While this is still supported, the new generic advertising proxy
implementation makes it easier to port and support the proxy function
on new platforms. The platform needs to provide the DNS-SD platform
APIs, which are designed to be simple and easy to implement.

The `AdvertisingProxy` directly interacts with `Srp::Server` and its
registered `Host` and `Service` entries, tracking whether an entry
has been successfully advertised, is currently being advertised, or
has been replaced by a new registration.

The `AdvertisingProxy` ensures that consecutive SRP updates for the
same host or service are committed on the server in the order they
are received, even if their advertisements are finished in a
different order. This is important for SRP Replication support, as
the server may receive a large number of SRP updates back-to-back for
the same host.

The `AdvertisingProxy` will also register key records for SRP host and
service instance names. This will keep the claim on the name of a
removed entry while its key lease is not expired. It is also used
when an SRP host registration has no off-mesh routable address.

This commit adds a detailed unit test `test_srp_adv_proxy` that
validates the `AdvertisingProxy` under many scenarios. The test
covers a range of cases, including delayed registration callbacks and
timeouts, new registrations replacing outstanding advertisements,
platform DNS-SD state changes and failures, host address changes
adding/removing OMR addresses.
2024-02-09 10:43:47 -08:00
jrhodie 7a2983b01c [docs] add TREL config group (#9791) 2024-01-23 10:07:51 -08:00
gavinmcgovern 83d3800db3 [docs] add Aqara to who supports list (#9758) 2024-01-09 22:48:00 -08:00
jrhodie 16596a38c3 [docs] create config variables list (#9721) 2023-12-20 12:51:50 -08:00
jrhodie 266a97b80a [docs] reference groups added and typos fixed (#9709) 2023-12-13 12:18:40 -08:00
Marek Porwisz 834c8cbc8e [spinel] add support for multiple spinel interfaces (#9360)
This feature allows the RCP to support multiple host stacks on different PANs
by making use of the spinel Interface ID.

Created unit tests for testing multipan feature with multiple ot-instance
support.

Based on Si-Labs PR #8914 by @parag-silabs, but a little different approach.
Instead of handling everything by a single sub-mac instance, multiple
OpenThread instances are created on RCP side that map to different IID.
Thanks to this there are separate data kept for each interface. Platform
is able to determine interface by ot instance pointer passed as an argument
to most of the API functions.
Tx/scan queue was removed as it is possible to request transmission in
parallel, it is up to the platform to decide if it should fail or queue
second tx or it has two radios available.

NOTE:
Platform needs to provide different otRadioFrame of each instance and
the processing needs to take into account the instance being used.

Signed-off-by: Marek Porwisz <marek.porwisz@nordicsemi.no>
2023-11-28 16:16:37 -08:00
Yakun Xu 11a38a63de [build] remove autotools (#9027)
This commit removes autotools support from OpenThread project.
2023-06-28 08:54:23 -07:00
gavinmcgovern 79b056add6 [docs] add radio defgroup for proper documentation (#9195) 2023-06-22 14:59:21 -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 0a79c30a20 [mesh-diag] new module and new API to discover network topology (#8682) 2023-03-02 00:43:46 -08:00
Jeff Bumgardner 3d8406b31c [docs] add plat-dns module to Doxygen menu (#8819)
New API module from #8668 wasn't added to the high-level Doxygen
menu. This causes the module to show up incorrectly when we import
reference docs into openthread.io.
2023-03-01 21:54:26 -08:00
gavinmcgovern c311b85cc9 [docs] add Nabu Casa to supporter list (#8785) 2023-02-21 16:17:36 -08:00
gavinmcgovern bdb9382976 [docs] resized Qorvo logo (#8279) 2022-10-14 11:07:41 -07:00
gavinmcgovern 9ebe41f16e [docs] who supports OT updates (#8263) 2022-10-13 11:38:44 -07:00
Sarah cd83fc1477 [docs] CLI Dataset (#7944) 2022-08-25 11:15:37 -07:00
Sarah c73db3ff2f [docs] add NAT64 to Doxygen (#7916)
I added the group definition under IPv6 Networking.
2022-07-19 13:21:20 -07:00
Abtin Keshavarzian 0ec9612379 [docs] add plat-infra-if and api-border-routing doxygen groups (#7898) 2022-07-13 19:59:47 -07:00
Sarah 3f47516ce8 [docs] add Doxygen group for new TCP Abstractions API (#7647) 2022-05-17 10:29:16 -07:00
Jonathan Donald 3350f598f6 [docs] add Infineon to list of contributors (#7523) 2022-03-25 15:18:00 -07:00
Sarah 3b79cb0d08 [docs] trel doxygen updates (#7386) 2022-02-01 17:21:06 -08:00
Abtin Keshavarzian 69ad96675f [trel] implement new TREL model using DNS-SD (#7125)
This commit implements the new TREL model which uses DNS-SD to
discover TREL peers on the network. This implementation replaces the
previous model which relied on link-local multicast.

This commit adds a new set of `otPlatTrel` APIs and callbacks that are
then used by an updated `Trel::Interface` implementation. The
`Trel::Interface` maintains a TREL peer table which is populated from
DNS-SD discovered services. A device supporting TREL registers a new
service to be advertised using DNS-SD with the service name
`_trel._udp`. It also initiates an ongoing DNS-SD browse for the same
service name within the local browsing domain to discover other
devices supporting TREL. `Trel::Interface` encapsulates and send
unicast frames as a unicast UDP message between TREL peers. Broadcast
frames are sent as a group of UDP unicast transmission to a sub-set
of TREL peers.

This commit also adds a new set of public APIs for TREL along with
support for them in CLI:
- APIs for enabling/disabling of TREL operation at run-time.
- Filter mode API which when enabled temporarily drops all the traffic
  on the TREL interface (is mainly intended for testing).
- APIs to get the TREL peer table entries.

This commit adds an implementation of the new `otPlatTrel` APIs under
`simulation` platform. This is used for testing. This implementation
emulates a simplified version of DNS-SD mechanism.

A basic implementation  of the `otPlatTrel` is also provided under
`posix` platform. However certain functions are tied to mDNS or
DNS-SD library being used on a device and need to be implemented per
project/platform. A set of weak empty functions `trelDnssd{}` are
defined (along with a description of the their expected behavior)
which can be overridden during project/platform integration.
2022-01-28 12:07:42 -08:00
Łukasz Duda 925d9b657c [crypto] allow platform to define its own CSPRNG (#7355)
This commit provides the following changes:

 * Introduce a new `otPlatCryptoRandom*` API
 * Move usage of `mbedtls_entropy_*` and `mbedtls_ctr_drbg_*` out of
   ARM PSA enabled platforms
 * Stop exposing internal mbedtls contextes for entropy and CTR DRBG
   in OpenThread API

Signed-off-by: Lukasz Duda <lukasz.duda@nordicsemi.no>
2022-01-28 09:06:21 -08:00
Sarah 9e161b96b5 [documentation] update code comments and contributing section (#7240) 2021-12-22 13:11:33 -08:00
Sarah bfd26b988b [docs] dark theme support and full image paths (#7110) 2021-10-26 14:29:49 -07:00
gavinmcgovern 1190fb5437 [docs] add markup for history tracker (#6932) 2021-08-18 09:38:10 -07:00
Sam Kumar b0081172af [tcp] add TCP API for OpenThread (#6491)
Co-authored-by: Jonathan Hui <jonhui@google.com>
Co-authored-by: Abtin Keshavarzian <abtink@google.com>
Co-authored-by: Sam Kumar <sam_k@apple.com>
Co-authored-by: Simon Lin <simonlin@google.com>
2021-06-16 22:09:33 -07:00
gavinmcgovern bed089c2cb [docs] add Espressif and Telink logos and links (#6729) 2021-06-14 17:32:55 -07:00
Jonathan Hui df8e06aaab [docs] remove doc/STYLE_GUIDE.md (#6668)
Site docs have moved to https://github.com/openthread/ot-docs
2021-05-21 16:58:17 -07:00
Jonathan Hui 45a23d89fe [docs] move openthread.io content to openthread/ot-docs (#6415) 2021-05-12 11:29:35 -07:00
Yakun Xu bf422ee8b3 [cmake] add OT_DOC option (#6527) 2021-04-29 07:49:10 -07:00
Simon Lin 5a39566f81 [dnssd] implement DNS-SD Discovery Proxy (#6191)
This commit implements DNS-SD Discovery Proxy.
- Implemented DNS-SD Discovery Proxy functionalities - OT part
- Fixed an memory issue of NameCompressInfo (introduced in #6155 , but
  somehow revealed by this commit)

Some implementation details:
- Discovery Proxy subscribes to services/service instances/hosts
  through callbacks set by a public OT API. It is up to the platform
  mDNS implementation to collect service instance/host information and
  notify OT via a public OT API.
- Discovery Proxy can handle DNS browsing of one service or DNS
  resolving of one service instance/host. We leave browsing multiple
  services or resolving multiple service instances/hosts for future
  enhancements if necessary.
2021-04-08 18:21:23 -07:00
Jonathan Hui b7751460e0 [cc2650] remove example platform (#6398) 2021-04-02 18:50:37 -07:00
gavinmcgovern 1d42a2f194 [docs] remove plat-uart (#6351) 2021-03-25 18:00:03 -07:00
gavinmcgovern b01b26a18a [ping-sender] adding missing doxygen tags (#6330) 2021-03-24 10:35:22 -07:00
Yakun Xu db1b980e57 [api] remove UART from in cli/ncp API (#6243)
This commit removes application library CLI/NCP dependency on platform
layer UART APIs. Instead, application layer provides callbacks sending
CLI/NCP data.

With this change, platforms with native support for formatted output
can simply implement the CLI output callback with something like
`vprintf()`.
2021-03-18 22:13:05 -07:00
Jonathan Hui da1b0ddbe0 [git] reflect branch rename from 'master' to 'main' (#6249) 2021-03-08 21:58:32 -08:00