Initializes the `Utils` object.
Indicates whether or not the instance is valid/initialized. The instance is considered valid if it is acquired and initialized using either `otInstanceInitSingle()` (in single instance case) or `otInstanceInit()` (in multi instance case). A subsequent call to `otInstanceFinalize()` causes the instance to be considered as uninitialized.
Parses the argument as an IP address. If the argument string is an IPv4 address, this method will try to synthesize an IPv6 address using preferred NAT64 prefix in the network data.
Registers a callback to indicate when certain configuration or state changes within OpenThread.
Sets the current MAC frame counter value. Is used when radio provides `OT_RADIO_CAPS_TRANSMIT_SEC` capability.
Gets the factory-assigned IEEE EUI-64 for this interface.
Get the radio supported channel mask that the device is allowed to be on.
Get the radio transmit frame buffer. OpenThread forms the IEEE 802.15.4 frame in this buffer then calls `otPlatRadioTransmit()` to request transmission.
Sets the Active Operational Dataset. If the dataset does not include an Active Timestamp, the dataset is only partially complete. If Thread is enabled on a device that has a partially complete Active Dataset, the device will attempt to attach to an existing Thread network using any existing information in the dataset. Only the Thread Network Key is needed to attach to a network. If channel is not included in the dataset, the device will send MLE Announce messages across different channels to find neighbors on other channels. If the device successfully attaches to a Thread network, the device will then retrieve the full Active Dataset from its Parent. Note that a router-capable device will not transition to the Router or Leader roles until it has a complete Active Dataset.
Sends a CoAP request with custom transmission parameters. If a response for a request is expected, respective function and context information should be provided. If no response is expected, these arguments should be NULL pointers.
Frees a previously allocated service entry. The @p aService MUST be previously allocated using `otSrpClientBuffersAllocateService()` and not yet freed. Otherwise the behavior of this function is undefined.
Initializes an `otBorderRoutingPrefixTableIterator`. An iterator MUST be initialized before it is used. An iterator can be initialized again to restart from the beginning of the table. When iterating over entries in the table, to ensure the update times `mMsecSinceLastUpdate` of entries are consistent, they are given relative to the time the iterator was initialized.
This is a callback function from platform layer to report a discovered TREL peer info.
This is a callback function from platform layer to report a discovered TREL peer info.
Get the radio's transmit power in dBm.
Set the radio's transmit power in dBm for all channels.
Get the radio's CCA ED threshold in dBm measured at antenna connector per IEEE 802.15.4 - 2015 section 10.1.4.
Set the radio's CCA ED threshold in dBm measured at antenna connector per IEEE 802.15.4 - 2015 section 10.1.4.
Get the status of promiscuous mode.
Sets the rx-on-when-idle state to the radio platform. There are a few situations that the radio can enter sleep state if the device is in rx-off-when-idle state but it's hard and costly for the SubMac to identify these situations and instruct the radio to enter sleep: - Finalization of a regular frame reception task, provided that: - The frame is received without errors and passes the filtering and it's not an spurious ACK. - ACK is not requested or transmission of ACK is not possible due to internal conditions. - Finalization of a frame transmission or transmission of an ACK frame, when ACK is not requested in the transmitted frame. - Finalization of the reception operation of a requested ACK due to: - ACK timeout expiration. - Reception of an invalid ACK or not an ACK frame. - Reception of the proper ACK, unless the transmitted frame was a Data Request Command and the frame pending bit on the received ACK is set to true. In this case the radio platform implementation SHOULD keep the receiver on until a determined timeout which triggers an idle period start.`OPENTHREAD_CONFIG_MAC_DATA_POLL_TIMEOUT` can be taken as a reference for this. - Finalization of a stand alone CCA task. - Finalization of a CCA operation with busy result during CSMA/CA procedure. - Finalization of an Energy Detection task. - Finalization of a radio reception window scheduled with `otPlatRadioReceiveAt`. If a platform supports `OT_RADIO_CAPS_RX_ON_WHEN_IDLE` it must also support `OT_RADIO_CAPS_CSMA_BACKOFF` and handle idle periods after CCA as described above. Upon the transition of the "RxOnWhenIdle" flag from TRUE to FALSE, the radio platform should enter sleep mode. If the radio is currently in receive mode, it should enter sleep mode immediately. Otherwise, it should enter sleep mode after the current operation is completed.
Get the radio version string. This is an optional radio driver platform function. If not provided by platform radio driver, OpenThread uses the OpenThread version instead (@sa otGetVersionString()).
Gets the radio preferred channel mask that the device prefers to form on.
Get the current estimated worst case accuracy (maximum ± deviation from the nominal frequency) of the local radio clock in units of PPM. This is the clock used to schedule CSL operations. In case the implementation does not estimate the current value but returns a fixed value, this value MUST be the worst-case accuracy over all possible foreseen operating conditions (temperature, pressure, etc) of the implementation.
The fixed uncertainty (i.e. random jitter) of the arrival time of CSL transmissions received by this device in units of 10 microseconds. This designates the worst case constant positive or negative deviation of the actual arrival time of a transmission from the transmission time calculated relative to the local radio clock independent of elapsed time. In addition to uncertainty accumulated over elapsed time, the CSL channel sample ("RX window") must be extended by twice this deviation such that an actual transmission is guaranteed to be detected by the local receiver in the presence of random arrival time jitter.
The radio driver calls this method to notify OpenThread that the transmission has started.
The radio driver calls this function to notify OpenThread that the transmit operation has completed, providing both the transmitted frame and, if applicable, the received ack frame. When radio provides `OT_RADIO_CAPS_TRANSMIT_SEC` capability, radio platform layer updates @p aFrame with the security frame counter and key index values maintained by the radio.
The radio driver calls this method to notify OpenThread diagnostics module that the transmission has completed. Is used when diagnostics is enabled.
The radio driver calls this method to notify OpenThread that the energy scan is complete. Is used when radio provides OT_RADIO_CAPS_ENERGY_SCAN capability.
Get the current time in microseconds referenced to a continuous monotonic local radio clock (64 bits width). The radio clock SHALL NOT wrap during the device's uptime. Implementations SHALL therefore identify and compensate for internal counter overflows. The clock does not have a defined epoch and it SHALL NOT introduce any continuous or discontinuous adjustments (e.g. leap seconds). Implementations SHALL compensate for any sleep times of the device. Implementations MAY choose to discipline the radio clock and compensate for sleep times by any means (e.g. by combining a high precision/low power RTC with a high resolution counter) as long as the exposed combined clock provides continuous monotonic microsecond resolution ticks within the accuracy limits announced by otPlatRadioGetCslAccuracy.
The radio driver calls this method to notify OpenThread of a received frame.
The radio driver calls this method to notify OpenThread diagnostics module of a received frame. Is used when diagnostics is enabled.
Registers a callback to provide received IPv6 datagrams. By default, this callback does not pass Thread control traffic. See otIp6SetReceiveFilterEnabled() to change the Thread control traffic filter setting. @sa otIp6IsReceiveFilterEnabled @sa otIp6SetReceiveFilterEnabled
Registers a callback to notify internal IPv6 address changes.
Gets the Active Operational Dataset.
Gets the Active Operational Dataset.
Gets the Pending Operational Dataset.
Sets the Pending Operational Dataset.
Get the IEEE 802.15.4 channel. @sa otLinkSetChannel
Set the IEEE 802.15.4 channel Succeeds only when Thread protocols are disabled. A successful call to this function invalidates the Active and Pending Operational Datasets in non-volatile memory. @sa otLinkGetChannel
Set the IEEE 802.15.4 PAN ID. Succeeds only when Thread protocols are disabled. A successful call to this function also invalidates the Active and Pending Operational Datasets in non-volatile memory. @sa otLinkGetPanId
Set/clear user-specified/external data poll period for sleepy end device. @sa otLinkGetPollPeriod
Gets the current MAC frame counter value.
Returns a pointer to the Mesh Local Prefix.
Get the Thread Network Name. @sa otThreadSetNetworkName
Indicates whether or not OpenThread has tasklets pending.
Get the next external route in the partition's Network Data.
For FTD only, creates a new Operational Dataset to use when forming a new network.
Signal that the alarm has fired.
Signal that the alarm has fired.
Sets the address mode to be used by the SRP server.
Enables/disables the SRP server. On a Border Router, it is recommended to use `otSrpServerSetAutoEnableMode()` instead.
Returns the next registered host on the SRP server.
Sets the host name label. After a successful call to this function, `otSrpClientCallback` will be called to report the status of host info registration with SRP server. The name string buffer pointed to by @p aName MUST persist and stay unchanged after returning from this function. OpenThread will keep the pointer to the string. The host name can be set before client is started or after start but before host info is registered with server (host info should be in either `STATE_TO_ADD` or `STATE_REMOVED`).
Sets/updates the list of host IPv6 address. Host IPv6 addresses can be set/changed before start or during operation of SRP client (e.g. to add/remove or change a previously registered host address), except when the host info is being removed (client is busy handling a remove request from an earlier call to `otSrpClientRemoveHostAndServices()` and host info still being in either `STATE_TO_REMOVE` or `STATE_REMOVING` states). The host IPv6 address array pointed to by @p aIp6Addresses MUST persist and remain unchanged after returning from this function (with `OT_ERROR_NONE`). OpenThread will save the pointer to the array. After a successful call to this function, `otSrpClientCallback` will be called to report the status of the address registration with SRP server. Calling this function disables auto host address mode if it was previously enabled from a successful call to `otSrpClientEnableAutoHostAddress()`.
Gets the list of services being managed by client.
Enables or disables Backbone functionality. If enabled, a Server Data Request message `SRV_DATA.ntf` is triggered for the attached device if there is no Backbone Router Service in the Thread Network Data. If disabled, `SRV_DATA.ntf` is triggered if the Backbone Router is in the Primary state. Available when `OPENTHREAD_CONFIG_BACKBONE_ROUTER_ENABLE` is enabled. @sa otBackboneRouterGetState @sa otBackboneRouterGetConfig @sa otBackboneRouterSetConfig @sa otBackboneRouterRegister
Creates a new CoAP message.
Sends a CoAP response from the server with custom transmission parameters.
Allocate a new message buffer for sending a UDP message. @sa otMessageFree
Check if a UDP socket is open.
Enables or disables the Border Routing Manager.
This function performs the OpenThread radio process.
Signal that the alarm has fired.
Signal that the alarm has fired.
Initializes the Console interpreter.
Is a callback from platform to notify of a received TREL UDP packet.
Is a callback from platform to notify of a received TREL UDP packet.
Disables the OpenThread library. Call this function when OpenThread is no longer in use.
Initialize the CLI module.
Enable or disable promiscuous mode.
Update MAC keys and key index Is used when radio provides OT_RADIO_CAPS_TRANSMIT_SEC capability.
Get the radio capabilities.
Get the radio receive sensitivity value.
Set the region code. The radio region format is the 2-bytes ascii representation of the ISO 3166 alpha-2 code.
Get the region code. The radio region format is the 2-bytes ascii representation of the ISO 3166 alpha-2 code.
Get the most recent RSSI measurement.
Begin the energy scan sequence on the radio. Is used when radio provides OT_RADIO_CAPS_ENERGY_SCAN capability.
The radio driver calls this method to notify OpenThread that the spinel bus latency has been changed.
Enable/Disable source address match feature. The source address match feature controls how the radio layer decides the "frame pending" bit for acks sent in response to data request commands from children. If disabled, the radio layer must set the "frame pending" on all acks to data request commands. If enabled, the radio layer uses the source address match table to determine whether to set or clear the "frame pending" bit in an ack to a data request command. The source address match table provides the list of children for which there is a pending frame. Either a short address or an extended/long address can be added to the source address match table.
Clear all short addresses from the source address match table.
Clear all the extended/long addresses from source address match table.
Sets the current MAC frame counter value only if the new given value is larger than the current value. Is used when radio provides `OT_RADIO_CAPS_TRANSMIT_SEC` capability.
Get current state of the radio. Is not required by OpenThread. It may be used for debugging and/or application-specific purposes.
Check whether radio is enabled or not.
Transition the radio from Receive to Sleep (turn off the radio).
Transition the radio from Sleep to Receive (turn on the radio).
Begin the transmit sequence on the radio. The caller must form the IEEE 802.15.4 frame in the buffer provided by `otPlatRadioGetTransmitBuffer()` before requesting transmission. The channel and transmit power are also included in the otRadioFrame structure. The transmit sequence consists of: 1. Transitioning the radio to Transmit from one of the following states: - Receive if RX is on when the device is idle or OT_RADIO_CAPS_SLEEP_TO_TX is not supported - Sleep if RX is off when the device is idle and OT_RADIO_CAPS_SLEEP_TO_TX is supported. 2. Transmits the psdu on the given channel and at the given transmit power.
Brings the IPv6 interface up or down. Call this to enable or disable IPv6 communication.
Indicates whether or not the IPv6 interface is up.
Subscribes the Thread interface to a Network Interface Multicast Address. The passed in instance @p aAddress will be copied by the Thread interface. The Thread interface only supports a fixed number of externally added multicast addresses. See `OPENTHREAD_CONFIG_IP6_MAX_EXT_MCAST_ADDRS`.
Unsubscribes the Thread interface to a Network Interface Multicast Address.
Allocate a new message buffer for sending an IPv6 message. @sa otMessageFree
Sets whether or not Thread control traffic is filtered out when delivering IPv6 datagrams via the callback specified in otIp6SetReceiveCallback(). @sa otIp6SetReceiveCallback @sa otIsReceiveIp6FilterEnabled
Sends an IPv6 datagram via the Thread interface. The caller transfers ownership of @p aMessage when making this call. OpenThread will free @p aMessage when processing is complete, including when a value other than `OT_ERROR_NONE` is returned.
Adds a port to the allowed unsecured port list.
Removes a port from the allowed unsecure port list.
Sets the Active Operational Dataset. If the dataset does not include an Active Timestamp, the dataset is only partially complete. If Thread is enabled on a device that has a partially complete Active Dataset, the device will attempt to attach to an existing Thread network using any existing information in the dataset. Only the Thread Network Key is needed to attach to a network. If channel is not included in the dataset, the device will send MLE Announce messages across different channels to find neighbors on other channels. If the device successfully attaches to a Thread network, the device will then retrieve the full Active Dataset from its Parent. Note that a router-capable device will not transition to the Router or Leader roles until it has a complete Active Dataset. This function consistently returns `OT_ERROR_NONE` and can effectively be treated as having a `void` return type. Previously, other errors (e.g., `OT_ERROR_NOT_IMPLEMENTED`) were allowed for legacy reasons. However, as non-volatile storage is now mandatory for Thread operation, any failure to save the dataset will trigger an assertion. The `otError` return type is retained for backward compatibility.
Gets the Pending Operational Dataset.
Gets the IEEE 802.15.4 Extended Address.
Sets the IEEE 802.15.4 Extended Address.
Get the factory-assigned IEEE EUI-64.
Enables or disables the link layer.
Indicates whether or not the link layer is enabled.
Get the IEEE 802.15.4 PAN ID. @sa otLinkSetPanId
Get the data poll period of sleepy end device. @sa otLinkSetPollPeriod
Get the IEEE 802.15.4 Short Address.
Returns the maximum number of frame retries during direct transmission.
Sets the maximum number of frame retries during direct transmission.
Returns the maximum number of frame retries during indirect transmission.
Sets the maximum number of frame retries during indirect transmission.
Gets the Thread Child Timeout (in seconds) used when operating in the Child role. @sa otThreadSetChildTimeout
Sets the Thread Child Timeout (in seconds) used when operating in the Child role. @sa otThreadGetChildTimeout
Gets the IEEE 802.15.4 Extended PAN ID. @sa otThreadSetExtendedPanId
Set the MLE Link Mode configuration. @sa otThreadGetLinkMode
Set the Thread Network Name. Succeeds only when Thread protocols are disabled. A successful call to this function invalidates the Active and Pending Operational Datasets in non-volatile memory. @sa otThreadGetNetworkName
Gets the Thread Domain Name. @sa otThreadSetDomainName
Sets the Thread Domain Name. Only succeeds when Thread protocols are disabled. @sa otThreadGetDomainName
Gets the thrKeySequenceCounter. @sa otThreadSetKeySequenceCounter
Sets the thrKeySequenceCounter. @sa otThreadGetKeySequenceCounter
Gets the thrKeySwitchGuardTime (in hours). @sa otThreadSetKeySwitchGuardTime
Starts Thread protocol operation. The interface must be up when calling this function. Calling this function with @p aEnabled set to FALSE stops any ongoing processes of detaching started by otThreadDetachGracefully(). Its callback will be called.
Sets the thrKeySwitchGuardTime (in hours). @sa otThreadGetKeySwitchGuardTime
Run all queued OpenThread tasklets at the time this is called.
OpenThread calls this function when the tasklet queue transitions from empty to non-empty.
This function performs the OpenThread related platform process (radio, uart, alarm etc.)
This function initiizes OpenThread state event post. @pram[in] instance The OpenThread instance
This function drives the execution of the task queue.
Provide full or stable copy of the Partition's Thread Network Data.
Get the current length (number of bytes) of Partition's Thread Network Data.
Get the maximum observed length of the Thread Network Data since OT stack initialization or since the last call to `otNetDataResetMaxLength()`.
Reset the tracked maximum length of the Thread Network Data. @sa otNetDataGetMaxLength
Get the next On Mesh Prefix in the partition's Network Data.
Get the next service in the partition's Network Data.
Get the next 6LoWPAN Context ID info in the partition's Network Data.
Gets the Commissioning Dataset from the partition's Network Data.
Check if the steering data includes a Joiner.
Enable or disable NAT64 functions. Note: This includes the NAT64 Translator (when `OPENTHREAD_CONFIG_NAT64_TRANSLATOR_ENABLE` is enabled) and the NAT64 Prefix Manager (when `OPENTHREAD_CONFIG_NAT64_BORDER_ROUTING_ENABLE` is enabled). When `OPENTHREAD_CONFIG_NAT64_TRANSLATOR_ENABLE` is enabled, setting disabled to true resets the mapping table in the translator. Available when `OPENTHREAD_CONFIG_NAT64_TRANSLATOR_ENABLE` or `OPENTHREAD_CONFIG_NAT64_BORDER_ROUTING_ENABLE` is enabled. @sa otNat64GetTranslatorState @sa otNat64GetPrefixManagerState
Sets the IPv6 address by performing NAT64 address translation from the preferred NAT64 prefix and the given IPv4 address as specified in RFC 6052.
Set the alarm to fire at @p aDt microseconds after @p aT0. For @p aT0, the platform MUST support all values in [0, 2^32-1]. For @p aDt, the platform MUST support all values in [0, 2^31-1].
Set the alarm to fire at @p aDt milliseconds after @p aT0. For @p aT0 the platform MUST support all values in [0, 2^32-1]. For @p aDt, the platform MUST support all values in [0, 2^31-1].
Returns the domain authorized to the SRP server. If the domain if not set by SetDomain, "default.service.arpa." will be returned. A trailing dot is always appended even if the domain is set without it.
Sets the domain on the SRP server. A trailing dot will be appended to @p aDomain if it is not already there. Should only be called before the SRP server is enabled.
Returns the state of the SRP server.
Returns the address mode being used by the SRP server.
Returns the sequence number used with anycast address mode. The sequence number is included in "DNS/SRP Service Anycast Address" entry published in the Network Data.
Sets the sequence number used with anycast address mode.
Enables/disables the auto-enable mode on SRP server. Requires `OPENTHREAD_CONFIG_BORDER_ROUTING_ENABLE` feature. When this mode is enabled, the Border Routing Manager controls if/when to enable or disable the SRP server. SRP sever is auto-enabled if/when Border Routing is started and it is done with the initial prefix and route configurations (when the OMR and on-link prefixes are determined, advertised in emitted Router Advertisement message on infrastructure side and published in the Thread Network Data). The SRP server is auto-disabled if/when BR is stopped (e.g., if the infrastructure network interface is brought down or if BR gets detached). This mode can be disabled by a `otSrpServerSetAutoEnableMode()` call with @p aEnabled set to `false` or if the SRP server is explicitly enabled or disabled by a call to `otSrpServerSetEnabled()` function. Disabling auto-enable mode using `otSrpServerSetAutoEnableMode(false)` will not change the current state of SRP sever (e.g., if it is enabled it stays enabled).
Indicates whether the auto-enable mode is enabled or disabled. Requires `OPENTHREAD_CONFIG_BORDER_ROUTING_ENABLE` feature.
Returns SRP server TTL configuration.
Sets SRP server TTL configuration. The granted TTL will always be no greater than the max lease interval configured via `otSrpServerSetLeaseConfig()`, regardless of the minimum and maximum TTL configuration.
Returns SRP server LEASE and KEY-LEASE configurations.
Sets SRP server LEASE and KEY-LEASE configurations. When a non-zero LEASE time is requested from a client, the granted value will be limited in range [aMinLease, aMaxLease]; and a non-zero KEY-LEASE will be granted in range [aMinKeyLease, aMaxKeyLease]. For zero LEASE or KEY-LEASE time, zero will be granted.
Requests "DNS/SRP Service Anycast Address" to be published in the Thread Network Data. Requires the feature `OPENTHREAD_CONFIG_TMF_NETDATA_SERVICE_ENABLE` to be enabled. A call to this function will remove and replace any previous "DNS/SRP Service" entry that was being published (from earlier call to any of `otNetDataPublishDnsSrpService{Type}()` functions).
Requests "DNS/SRP Service Unicast Address" to be published in the Thread Network Data. Requires the feature `OPENTHREAD_CONFIG_TMF_NETDATA_SERVICE_ENABLE` to be enabled. A call to this function will remove and replace any previous "DNS/SRP Service" entry that was being published (from earlier call to any of `otNetDataPublishDnsSrpService{Type}()` functions). Publishes the "DNS/SRP Service Unicast Address" by including the address and port info in the Service TLV data.
Requests "DNS/SRP Service Unicast Address" to be published in the Thread Network Data. Requires the feature `OPENTHREAD_CONFIG_TMF_NETDATA_SERVICE_ENABLE` to be enabled. A call to this function will remove and replace any previous "DNS/SRP Service" entry that was being published (from earlier call to any of `otNetDataPublishDnsSrpService{Type}()` functions). Unlike `otNetDataPublishDnsSrpServiceUnicast()` which requires the published address to be given and includes the info in the Service TLV data, this function uses the device's mesh-local EID and includes the info in the Server TLV data.
Unpublishes any previously added DNS/SRP (Anycast or Unicast) Service entry from the Thread Network Data. `OPENTHREAD_CONFIG_TMF_NETDATA_SERVICE_ENABLE` must be enabled.
Requests an on-mesh prefix to be published in the Thread Network Data. Requires the feature `OPENTHREAD_CONFIG_BORDER_ROUTER_ENABLE` to be enabled. Only stable entries can be published (i.e.,`aConfig.mStable` MUST be TRUE). A subsequent call to this method will replace a previous request for the same prefix. In particular, if the new call only changes the flags (e.g., preference level) and the prefix is already added in the Network Data, the change to flags is immediately reflected in the Network Data. This ensures that existing entries in the Network Data are not abruptly removed. Note that a change in the preference level can potentially later cause the entry to be removed from the Network Data after determining there are other nodes that are publishing the same prefix with the same or higher preference.
Requests an external route prefix to be published in the Thread Network Data. Requires the feature `OPENTHREAD_CONFIG_BORDER_ROUTER_ENABLE` to be enabled. Only stable entries can be published (i.e.,`aConfig.mStable` MUST be TRUE). A subsequent call to this method will replace a previous request for the same prefix. In particular, if the new call only changes the flags (e.g., preference level) and the prefix is already added in the Network Data, the change to flags is immediately reflected in the Network Data. This ensures that existing entries in the Network Data are not abruptly removed. Note that a change in the preference level can potentially later cause the entry to be removed from the Network Data after determining there are other nodes that are publishing the same prefix with the same or higher preference.
Replaces a previously published external route in the Thread Network Data. Requires the feature `OPENTHREAD_CONFIG_BORDER_ROUTER_ENABLE` to be enabled. If there is no previously published external route matching @p aPrefix, this function behaves similarly to `otNetDataPublishExternalRoute()`, i.e., it will start the process of publishing @a aConfig as an external route in the Thread Network Data. If there is a previously published route entry matching @p aPrefix, it will be replaced with the new prefix from @p aConfig. - If the @p aPrefix was already added in the Network Data, the change to the new prefix in @p aConfig is immediately reflected in the Network Data. This ensures that route entries in the Network Data are not abruptly removed and the transition from aPrefix to the new prefix is smooth. - If the old published @p aPrefix was not added in the Network Data, it will be replaced with the new @p aConfig prefix but it will not be immediately added. Instead, it will start the process of publishing it in the Network Data (monitoring the Network Data to determine when/if to add the prefix, depending on the number of similar prefixes present in the Network Data).
Unpublishes a previously published On-Mesh or External Route Prefix. `OPENTHREAD_CONFIG_BORDER_ROUTER_ENABLE` must be enabled.
Starts the SRP client operation. SRP client will prepare and send "SRP Update" message to the SRP server once all the following conditions are met: - The SRP client is started - `otSrpClientStart()` is called. - Host name is set - `otSrpClientSetHostName()` is called. - At least one host IPv6 address is set - `otSrpClientSetHostAddresses()` is called. - At least one service is added - `otSrpClientAddService()` is called. It does not matter in which order these functions are called. When all conditions are met, the SRP client will wait for a short delay before preparing an "SRP Update" message and sending it to server. This delay allows for user to add multiple services and/or IPv6 addresses before the first SRP Update message is sent (ensuring a single SRP Update is sent containing all the info). The config `OPENTHREAD_CONFIG_SRP_CLIENT_UPDATE_TX_DELAY` specifies the delay interval.
Stops the SRP client operation. Stops any further interactions with the SRP server. Note that it does not remove or clear host info and/or list of services. It marks all services to be added/removed again once the client is (re)started.
Indicates whether the SRP client is running or not.
Gets the socket address (IPv6 address and port number) of the SRP server which is being used by SRP client. If the client is not running, the address is unspecified (all zero) with zero port number.
Sets the callback to notify caller of events/changes from SRP client. The SRP client allows a single callback to be registered. So consecutive calls to this function will overwrite any previously set callback functions.
Enables the auto-start mode. This is only available when auto-start feature `OPENTHREAD_CONFIG_SRP_CLIENT_AUTO_START_API_ENABLE` is enabled. Config option `OPENTHREAD_CONFIG_SRP_CLIENT_AUTO_START_DEFAULT_MODE` specifies the default auto-start mode (whether it is enabled or disabled at the start of OT stack). When auto-start is enabled, the SRP client will monitor the Thread Network Data to discover SRP servers and select the preferred server and automatically start and stop the client when an SRP server is detected. There are three categories of Network Data entries indicating presence of SRP sever. They are preferred in the following order: 1) Preferred unicast entries where server address is included in the service data. If there are multiple options, the one with numerically lowest IPv6 address is preferred. 2) Anycast entries each having a seq number. A larger sequence number in the sense specified by Serial Number Arithmetic logic in RFC-1982 is considered more recent and therefore preferred. The largest seq number using serial number arithmetic is preferred if it is well-defined (i.e., the seq number is larger than all other seq numbers). If it is not well-defined, then the numerically largest seq number is preferred. 3) Unicast entries where the server address info is included in server data. If there are multiple options, the one with numerically lowest IPv6 address is preferred. When there is a change in the Network Data entries, client will check that the currently selected server is still present in the Network Data and is still the preferred one. Otherwise the client will switch to the new preferred server or stop if there is none. When the SRP client is explicitly started through a successful call to `otSrpClientStart()`, the given SRP server address in `otSrpClientStart()` will continue to be used regardless of the state of auto-start mode and whether the same SRP server address is discovered or not in the Thread Network Data. In this case, only an explicit `otSrpClientStop()` call will stop the client.
Disables the auto-start mode. This is only available when auto-start feature `OPENTHREAD_CONFIG_SRP_CLIENT_AUTO_START_API_ENABLE` is enabled. Disabling the auto-start mode will not stop the client if it is already running but the client stops monitoring the Thread Network Data to verify that the selected SRP server is still present in it. Note that a call to `otSrpClientStop()` will also disable the auto-start mode.
Indicates the current state of auto-start mode (enabled or disabled). This is only available when auto-start feature `OPENTHREAD_CONFIG_SRP_CLIENT_AUTO_START_API_ENABLE` is enabled.
Gets the TTL value in every record included in SRP update requests. Note that this is the TTL requested by the SRP client. The server may choose to accept a different TTL. By default, the TTL will equal the lease interval. Passing 0 or a value larger than the lease interval via `otSrpClientSetTtl()` will also cause the TTL to equal the lease interval.
Sets the TTL value in every record included in SRP update requests. Changing the TTL does not impact the TTL of already registered services/host-info. It only affects future SRP update messages (i.e., adding new services and/or refreshes of the existing services).
Gets the default lease interval used in SRP update requests. The default interval is used only for `otSrpClientService` instances with `mLease` set to zero. Note that this is the lease duration requested by the SRP client. The server may choose to accept a different lease interval.
Sets the default lease interval used in SRP update requests. The default interval is used only for `otSrpClientService` instances with `mLease` set to zero. Changing the lease interval does not impact the accepted lease interval of already registered services/host-info. It only affects any future SRP update messages (i.e., adding new services and/or refreshes of the existing services).
Gets the default key lease interval used in SRP update requests. The default interval is used only for `otSrpClientService` instances with `mKeyLease` set to zero. Note that this is the lease duration requested by the SRP client. The server may choose to accept a different lease interval.
Sets the default key lease interval used in SRP update requests. The default interval is used only for `otSrpClientService` instances with `mKeyLease` set to zero. Changing the lease interval does not impact the accepted lease interval of already registered services/host-info. It only affects any future SRP update messages (i.e., adding new services and/or refreshes of existing services).
Enables auto host address mode. When enabled host IPv6 addresses are automatically set by SRP client using all the preferred unicast addresses on Thread netif excluding all link-local and mesh-local addresses. If there is no preferred address, then Mesh Local EID address is added. The SRP client will automatically re-register when/if addresses on Thread netif are updated (new addresses are added or existing addresses are removed or marked as non-preferred). The auto host address mode can be enabled before start or during operation of SRP client except when the host info is being removed (client is busy handling a remove request from an call to `otSrpClientRemoveHostAndServices()` and host info still being in either `STATE_TO_REMOVE` or `STATE_REMOVING` states). After auto host address mode is enabled, it can be disabled by a call to `otSrpClientSetHostAddresses()` which then explicitly sets the host addresses.
Adds a service to be registered with server. After a successful call to this function, `otSrpClientCallback` will be called to report the status of the service addition/registration with SRP server. The `otSrpClientService` instance being pointed to by @p aService MUST persist and remain unchanged after returning from this function (with `OT_ERROR_NONE`). OpenThread will save the pointer to the service instance. The `otSrpClientService` instance is not longer tracked by OpenThread and can be reclaimed only when - It is removed explicitly by a call to `otSrpClientRemoveService()` or removed along with other services by a call to `otSrpClientRemoveHostAndServices() and only after the `otSrpClientCallback` is called indicating the service was removed. Or, - A call to `otSrpClientClearHostAndServices()` which removes the host and all related services immediately.
Requests a service to be unregistered with server. After a successful call to this function, `otSrpClientCallback` will be called to report the status of remove request with SRP server. The `otSrpClientService` instance being pointed to by @p aService MUST persist and remain unchanged after returning from this function (with `OT_ERROR_NONE`). OpenThread will keep the service instance during the remove process. Only after the `otSrpClientCallback` is called indicating the service instance is removed from SRP client service list and can be be freed/reused.
Clears a service, immediately removing it from the client service list. Unlike `otSrpClientRemoveService()` which sends an update message to the server to remove the service, this function clears the service from the client's service list without any interaction with the server. On a successful call to this function, the `otSrpClientCallback` will NOT be called and the @p aService entry can be reclaimed and re-used by the caller immediately. Can be used along with a subsequent call to `otSrpClientAddService()` (potentially reusing the same @p aService entry with the same service and instance names) to update some of the parameters in an existing service.
Starts the remove process of the host info and all services. After returning from this function, `otSrpClientCallback` will be called to report the status of remove request with SRP server. If the host info is to be permanently removed from server, @p aRemoveKeyLease should be set to `true` which removes the key lease associated with host on server. Otherwise, the key lease record is kept as before, which ensures that the server holds the host name in reserve for when the client is once again able to provide and register its service(s). The @p aSendUnregToServer determines the behavior when the host info is not yet registered with the server. If @p aSendUnregToServer is set to `false` (which is the default/expected value) then the SRP client will immediately remove the host info and services without sending an update message to server (no need to update the server if nothing is yet registered with it). If @p aSendUnregToServer is set to `true` then the SRP client will send an update message to the server. Note that if the host info is registered then the value of @p aSendUnregToServer does not matter and the SRP client will always send an update message to server requesting removal of all info. One situation where @p aSendUnregToServer can be useful is on a device reset/reboot, caller may want to remove any previously registered services with the server. In this case, caller can `otSrpClientSetHostName()` and then request `otSrpClientRemoveHostAndServices()` with `aSendUnregToServer` as `true`.
Clears all host info and all the services. Unlike `otSrpClientRemoveHostAndServices()` which sends an update message to the server to remove all the info, this function clears all the info immediately without any interaction with the server.
Enables/disables "service key record inclusion" mode. When enabled, SRP client will include KEY record in Service Description Instructions in the SRP update messages that it sends. Is available when `OPENTHREAD_CONFIG_REFERENCE_DEVICE_ENABLE` configuration is enabled.
Indicates whether the "service key record inclusion" mode is enabled or disabled. Is available when `OPENTHREAD_CONFIG_REFERENCE_DEVICE_ENABLE` configuration is enabled.
Gets the maximum number of children currently allowed. @sa otThreadSetMaxAllowedChildren
Sets the maximum number of children currently allowed. This parameter can only be set when Thread protocol operation has been stopped. @sa otThreadGetMaxAllowedChildren
Indicates whether or not the device is router-eligible.
Sets whether or not the device is router-eligible. If @p aEligible is false and the device is currently operating as a router, this call will cause the device to detach and attempt to reattach as a child.
Set the preferred Router Id. Upon becoming a router/leader the node attempts to use this Router Id. If the preferred Router Id is not set or if it can not be used, a randomly generated router id is picked. This property can be set only when the device role is either detached or disabled.
Gets the Thread Leader Weight used when operating in the Leader role. @sa otThreadSetLeaderWeight @sa otThreadSetDeviceProperties
Sets the Thread Leader Weight used when operating in the Leader role. Directly sets the Leader Weight to the new value, replacing its previous value (which may have been determined from the current `otDeviceProperties`). @sa otThreadGetLeaderWeight
Get the preferred Thread Leader Partition Id used when operating in the Leader role.
Set the preferred Thread Leader Partition Id used when operating in the Leader role.
Gets the Joiner UDP Port. @sa otThreadSetJoinerUdpPort
Sets the Joiner UDP Port. @sa otThreadGetJoinerUdpPort
Get the CONTEXT_ID_REUSE_DELAY parameter used in the Leader role. @sa otThreadSetContextIdReuseDelay
Set the CONTEXT_ID_REUSE_DELAY parameter used in the Leader role. @sa otThreadGetContextIdReuseDelay
Get the `NETWORK_ID_TIMEOUT` parameter. @sa otThreadSetNetworkIdTimeout
Set the `NETWORK_ID_TIMEOUT` parameter. @sa otThreadGetNetworkIdTimeout
Get the ROUTER_UPGRADE_THRESHOLD parameter used in the REED role. @sa otThreadSetRouterUpgradeThreshold
Set the ROUTER_UPGRADE_THRESHOLD parameter used in the Leader role. @sa otThreadGetRouterUpgradeThreshold
Get the MLE_CHILD_ROUTER_LINKS parameter used in the REED role. This parameter specifies the max number of neighboring routers with which the device (as an FED) will try to establish link. @sa otThreadSetChildRouterLinks
Set the MLE_CHILD_ROUTER_LINKS parameter used in the REED role. @sa otThreadGetChildRouterLinks
Release a Router ID that has been allocated by the device in the Leader role.
Get the ROUTER_DOWNGRADE_THRESHOLD parameter used in the Router role. @sa otThreadSetRouterDowngradeThreshold
Set the ROUTER_DOWNGRADE_THRESHOLD parameter used in the Leader role. @sa otThreadGetRouterDowngradeThreshold
Get the ROUTER_SELECTION_JITTER parameter used in the REED/Router role. @sa otThreadSetRouterSelectionJitter
Set the ROUTER_SELECTION_JITTER parameter used in the REED/Router role. @sa otThreadGetRouterSelectionJitter
Get the assigned parent priority. @sa otThreadSetParentPriority
Set the parent priority. @sa otThreadGetParentPriority
Gets the maximum number of IP addresses that each MTD child may register with this device as parent. @sa otThreadSetMaxChildIpAddresses
Sets or restores the maximum number of IP addresses that each MTD child may register with this device as parent. Pass `0` to clear the setting and restore the default. Available when `OPENTHREAD_CONFIG_REFERENCE_DEVICE_ENABLE` is enabled. @sa otThreadGetMaxChildIpAddresses
Sets whether the device was commissioned using CCM.
Sets whether the Security Policy TLV version-threshold for routing (VR field) is enabled.
Enables or disables the filter to drop TMF UDP messages from untrusted origin. TMF messages are only trusted when they originate from a trusted source, such as the Thread interface. In special cases, such as when a device uses platform UDP socket to send TMF messages, they will be dropped due to untrusted origin. This filter is enabled by default. When this filter is disabled, UDP messages sent to the TMF port that originate from untrusted origin (such as host, CLI or an external IPv6 node) will be allowed.
Indicates whether the filter that drops TMF UDP messages from untrusted origin is enabled or not. This is intended for testing only and available when `OPENTHREAD_CONFIG_REFERENCE_DEVICE_ENABLE` config is enabled.
Sets the platform diag output callback.
Processes a factory diagnostics command line.
Processes the alarm event.
Gets the Primary Backbone Router information in the Thread Network.
Gets the Backbone Router #otBackboneRouterState. @sa otBackboneRouterSetEnabled @sa otBackboneRouterGetConfig @sa otBackboneRouterSetConfig @sa otBackboneRouterRegister
Gets the local Backbone Router configuration. Available when `OPENTHREAD_CONFIG_BACKBONE_ROUTER_ENABLE` is enabled. @sa otBackboneRouterSetEnabled @sa otBackboneRouterGetState @sa otBackboneRouterSetConfig @sa otBackboneRouterRegister
Sets the local Backbone Router configuration #otBackboneRouterConfig. A Server Data Request message `SRV_DATA.ntf` is initiated automatically if BBR Dataset changes for Primary Backbone Router. Available when `OPENTHREAD_CONFIG_BACKBONE_ROUTER_ENABLE` is enabled. @sa otBackboneRouterSetEnabled @sa otBackboneRouterGetState @sa otBackboneRouterGetConfig @sa otBackboneRouterRegister
Explicitly registers local Backbone Router configuration. A Server Data Request message `SRV_DATA.ntf` is triggered for the attached device. Available when `OPENTHREAD_CONFIG_BACKBONE_ROUTER_ENABLE` is enabled. @sa otBackboneRouterSetEnabled @sa otBackboneRouterGetState @sa otBackboneRouterGetConfig @sa otBackboneRouterSetConfig
Returns the Backbone Router registration jitter value. @sa otBackboneRouterSetRegistrationJitter
Sets the Backbone Router registration jitter value. @sa otBackboneRouterGetRegistrationJitter
Configures response status for next DUA registration. Note: available only when `OPENTHREAD_CONFIG_REFERENCE_DEVICE_ENABLE` is enabled. Only used for test and certification. TODO: (DUA) support coap error code and corresponding process for certification purpose.
Configures the response status for the next Multicast Listener Registration. Available when `OPENTHREAD_CONFIG_BACKBONE_ROUTER_ENABLE`, `OPENTHREAD_CONFIG_BACKBONE_ROUTER_MULTICAST_ROUTING_ENABLE`, and `OPENTHREAD_CONFIG_REFERENCE_DEVICE_ENABLE` are enabled.
Clears the Multicast Listeners. Available when `OPENTHREAD_CONFIG_BACKBONE_ROUTER_ENABLE`, `OPENTHREAD_CONFIG_BACKBONE_ROUTER_MULTICAST_ROUTING_ENABLE`, and `OPENTHREAD_CONFIG_REFERENCE_DEVICE_ENABLE` are enabled. @sa otBackboneRouterMulticastListenerAdd @sa otBackboneRouterMulticastListenerGetNext
Adds a Multicast Listener with a timeout value, in seconds. Pass `0` to use the default MLR timeout. Available when `OPENTHREAD_CONFIG_BACKBONE_ROUTER_ENABLE`, `OPENTHREAD_CONFIG_BACKBONE_ROUTER_MULTICAST_ROUTING_ENABLE`, and `OPENTHREAD_CONFIG_REFERENCE_DEVICE_ENABLE` are enabled. @sa otBackboneRouterMulticastListenerClear @sa otBackboneRouterMulticastListenerGetNext
Gets the Child Supervision interval (in seconds) on a child. Child Supervision feature provides a mechanism for parent to ensure that a message is sent to each sleepy child within the supervision interval. If there is no transmission to the child within the supervision interval, OpenThread enqueues and sends a Child Supervision Message to the child.
Sets the child supervision interval (in seconds) on the child.
Gets the supervision check timeout interval (in seconds) on the child. If the device is a sleepy child and it does not hear from its parent within the specified check timeout, it initiates the re-attach process (MLE Child Update Request/Response exchange with its parent).
Sets the supervision check timeout interval (in seconds) on the child.
Get the vendor name string.
Get the vendor model string.
Get the vendor software version string.
Get the vendor app URL string.
Set the vendor name string. Requires `OPENTHREAD_CONFIG_NET_DIAG_VENDOR_INFO_SET_API_ENABLE`. @p aVendorName should be UTF8 with max length of 32 chars (`MAX_VENDOR_NAME_TLV_LENGTH`). Maximum length does not include the null `\0` character.
Set the vendor model string. Requires `OPENTHREAD_CONFIG_NET_DIAG_VENDOR_INFO_SET_API_ENABLE`. @p aVendorModel should be UTF8 with max length of 32 chars (`MAX_VENDOR_MODEL_TLV_LENGTH`). Maximum length does not include the null `\0` character.
Set the vendor software version string. Requires `OPENTHREAD_CONFIG_NET_DIAG_VENDOR_INFO_SET_API_ENABLE`. @p aVendorSwVersion should be UTF8 with max length of 16 chars(`MAX_VENDOR_SW_VERSION_TLV_LENGTH`). Maximum length does not include the null `\0` character.
Set the vendor app URL string. Requires `OPENTHREAD_CONFIG_NET_DIAG_VENDOR_INFO_SET_API_ENABLE`. @p aVendorAppUrl should be UTF8 with max length of 64 chars (`MAX_VENDOR_APPL_URL_TLV_LENGTH`). Maximum length does not include the null `\0` character.
Adds a resource to the CoAP server.
Removes a resource from the CoAP server.
Connect a UDP/IPv6 socket.
Send a UDP/IPv6 message. If the return value is OT_ERROR_NONE, OpenThread takes ownership of @p aMessage, and the caller should no longer reference @p aMessage. If the return value is not OT_ERROR_NONE, the caller retains ownership of @p aMessage, including freeing @p aMessage if the message buffer is no longer needed.
Sets whether or not ICMPv6 Echo processing is enabled.
Gets the string buffer to use for SRP client host name.
Gets the array of IPv6 address entries to use as SRP client host address list.
Allocates a new service entry from the pool. The returned service entry instance will be initialized as follows: - `mService.mName` will point to an allocated string buffer which can be retrieved using the function `otSrpClientBuffersGetServiceEntryServiceNameString()`. - `mService.mInstanceName` will point to an allocated string buffer which can be retrieved using the function `otSrpClientBuffersGetServiceEntryInstanceNameString()`. - `mService.mSubTypeLabels` points to an array that is returned from `otSrpClientBuffersGetSubTypeLabelsArray()`. - `mService.mTxtEntries` will point to `mTxtEntry`. - `mService.mNumTxtEntries` will be set to one. - Other `mService` fields (port, priority, weight) are set to zero. - `mTxtEntry.mKey` is set to NULL (value is treated as already encoded). - `mTxtEntry.mValue` will point to an allocated buffer which can be retrieved using the function `otSrpClientBuffersGetServiceEntryTxtBuffer()`. - `mTxtEntry.mValueLength` is set to zero. - All related data/string buffers and arrays are cleared to all zero.
Frees all previously allocated service entries.
Initializes the Border Routing Manager on given infrastructure interface. @sa otPlatInfraIfStateChanged. @sa otBorderRoutingSetEnabled.
Gets the current state of Border Routing Manager.
Gets the current preference used when advertising Route Info Options (RIO) in Router Advertisement messages sent over the infrastructure link. The RIO preference is determined as follows: - If explicitly set by user by calling `otBorderRoutingSetRouteInfoOptionPreference()`, the given preference is used. - Otherwise, it is determined based on device's current role: Medium preference when in router/leader role and low preference when in child role.
Explicitly sets the preference to use when advertising Route Info Options (RIO) in Router Advertisement messages sent over the infrastructure link. After a call to this function, BR will use the given preference for all its advertised RIOs. The preference can be cleared by calling `otBorderRoutingClearRouteInfoOptionPreference()`.
Clears a previously set preference value for advertised Route Info Options. After a call to this function, BR will use device's role to determine the RIO preference: Medium preference when in router/leader role and low preference when in child role.
Sets additional options to append at the end of emitted Router Advertisement (RA) messages. The content of @p aOptions is copied internally, so it can be a temporary buffer (e.g., a stack allocated array). Subsequent calls to this function overwrite the previously set value.
Gets the current preference used for published routes in Network Data. The preference is determined as follows: - If explicitly set by user by calling `otBorderRoutingSetRoutePreference()`, the given preference is used. - Otherwise, it is determined automatically by `RoutingManager` based on the device's role and link quality.
Explicitly sets the preference of published routes in Network Data. After a call to this function, BR will use the given preference. The preference can be cleared by calling `otBorderRoutingClearRoutePreference()`.
Clears a previously set preference value for published routes in Network Data. After a call to this function, BR will determine the preference automatically based on the device's role and link quality (to the parent when acting as end-device).
Gets the local Off-Mesh-Routable (OMR) Prefix, for example `fdfc:1ff5:1512:5622::/64`. An OMR Prefix is a randomly generated 64-bit prefix that's published in the Thread network if there isn't already an OMR prefix. This prefix can be reached from the local Wi-Fi or Ethernet network. Note: When DHCPv6 PD is enabled, the border router may publish the prefix from DHCPv6 PD. @sa otBorderRoutingGetPdOmrPrefix
Gets the currently favored Off-Mesh-Routable (OMR) Prefix. The favored OMR prefix can be discovered from Network Data or can be this device's local OMR prefix.
Gets the local On-Link Prefix for the adjacent infrastructure link. The local On-Link Prefix is a 64-bit prefix that's advertised on the infrastructure link if there isn't already a usable on-link prefix being advertised on the link.
Gets the currently favored On-Link Prefix. The favored prefix is either a discovered on-link prefix on the infrastructure link or the local on-link prefix.
Gets the local NAT64 Prefix of the Border Router. NAT64 Prefix might not be advertised in the Thread network. `OPENTHREAD_CONFIG_NAT64_BORDER_ROUTING_ENABLE` must be enabled.
Gets the currently favored NAT64 prefix. The favored NAT64 prefix can be discovered from infrastructure link or can be this device's local NAT64 prefix.
Iterates over the entries in the Border Router's discovered prefix table. Prefix entries associated with the same discovered router on an infrastructure link are guaranteed to be grouped together (retrieved back-to-back).
Iterates over the discovered router entries on the infrastructure link.
Iterates over the peer BRs found in the Network Data. Requires `OPENTHREAD_CONFIG_BORDER_ROUTING_TRACK_PEER_BR_INFO_ENABLE`. Peer BRs are other devices within the Thread mesh that provide external IP connectivity. A device is considered to provide external IP connectivity if at least one of the following conditions is met regarding its Network Data entries: - It has added at least one external route entry. - It has added at least one prefix entry with both the default-route and on-mesh flags set. - It has added at least one domain prefix (with both the domain and on-mesh flags set). The list of peer BRs specifically excludes the current device, even if it is itself acting as a BR.
Returns the number of peer BRs found in the Network Data. Requires `OPENTHREAD_CONFIG_BORDER_ROUTING_TRACK_PEER_BR_INFO_ENABLE`. Peer BRs are other devices within the Thread mesh that provide external IP connectivity. A device is considered to provide external IP connectivity if at least one of the following conditions is met regarding its Network Data entries: - It has added at least one external route entry. - It has added at least one prefix entry with both the default-route and on-mesh flags set. - It has added at least one domain prefix (with both the domain and on-mesh flags set). The list of peer BRs specifically excludes the current device, even if it is itself acting as a BR.
Provides a full or stable copy of the local Thread Network Data.
Gets the next On Mesh Prefix in the local Network Data.
Gets the next external route in the local Network Data.
Immediately register the local network data with the Leader. @sa otBorderRouterAddOnMeshPrefix @sa otBorderRouterRemoveOnMeshPrefix @sa otBorderRouterAddRoute @sa otBorderRouterRemoveRoute
Sets the callback to indicate when Network Data gets full. Requires `OPENTHREAD_CONFIG_BORDER_ROUTER_SIGNAL_NETWORK_DATA_FULL`. The callback is invoked whenever: - The device is acting as a leader and receives a Network Data registration from a Border Router (BR) that it cannot add to Network Data (running out of space). - The device is acting as a BR and new entries cannot be added to its local Network Data. - The device is acting as a BR and tries to register its local Network Data entries with the leader, but determines that its local entries will not fit.
Gets the next service in the local Network Data.
Gets the current default query config used by DNS client. When OpenThread stack starts, the default DNS query config is determined from a set of OT config options such as `OPENTHREAD_CONFIG_DNS_CLIENT_DEFAULT_SERVER_IP6_ADDRESS`, `_DEFAULT_SERVER_PORT`, `_DEFAULT_RESPONSE_TIMEOUT`, etc. (see `config/dns_client.h` for all related config options).
Sets the default query config on DNS client. The @p aConfig can be NULL. In this case the default config will be set to the defaults from OT config options `OPENTHREAD_CONFIG_DNS_CLIENT_DEFAULT_{}`. This resets the default query config back to to the config when the OpenThread stack starts. In a non-NULL @p aConfig, caller can choose to leave some of the fields in `otDnsQueryConfig` instance unspecified (value zero). The unspecified fields are replaced by the corresponding OT config option definitions `OPENTHREAD_CONFIG_DNS_CLIENT_DEFAULT_{}` to form the default query config. When `OPENTHREAD_CONFIG_DNS_CLIENT_DEFAULT_SERVER_ADDRESS_AUTO_SET_ENABLE` is enabled, the server's IPv6 address in the default config is automatically set and updated by DNS client. This is done only when user does not explicitly set or specify it. This behavior requires SRP client and its auto-start feature to be enabled. SRP client will then monitor the Thread Network Data for DNS/SRP Service entries to select an SRP server. The selected SRP server address is also set as the DNS server address in the default config.
Sends an address resolution DNS query for AAAA (IPv6) record(s) for a given host name. The @p aConfig can be NULL. In this case the default config (from `otDnsClientGetDefaultConfig()`) will be used as the config for this query. In a non-NULL @p aConfig, some of the fields can be left unspecified (value zero). The unspecified fields are then replaced by the values from the default config.
Sends an address resolution DNS query for A (IPv4) record(s) for a given host name. Requires and is available when `OPENTHREAD_CONFIG_DNS_CLIENT_NAT64_ENABLE` is enabled. When a successful response is received, the addresses are returned from @p aCallback as NAT64 IPv6 translated versions of the IPv4 addresses from the query response. The @p aConfig can be NULL. In this case the default config (from `otDnsClientGetDefaultConfig()`) will be used as the config for this query. In a non-NULL @p aConfig, some of the fields can be left unspecified (value zero). The unspecified fields are then replaced by the values from the default config.
Sends a DNS browse (service instance enumeration) query for a given service name. Is available when `OPENTHREAD_CONFIG_DNS_CLIENT_SERVICE_DISCOVERY_ENABLE` is enabled. The @p aConfig can be NULL. In this case the default config (from `otDnsClientGetDefaultConfig()`) will be used as the config for this query. In a non-NULL @p aConfig, some of the fields can be left unspecified (value zero). The unspecified fields are then replaced by the values from the default config.
Starts a DNS service instance resolution for a given service instance. Is available when `OPENTHREAD_CONFIG_DNS_CLIENT_SERVICE_DISCOVERY_ENABLE` is enabled. The @p aConfig can be NULL. In this case the default config (from `otDnsClientGetDefaultConfig()`) will be used as the config for this query. In a non-NULL @p aConfig, some of the fields can be left unspecified (value zero). The unspecified fields are then replaced by the values from the default config. The function sends queries for SRV and/or TXT records for the given service instance. The `mServiceMode` field in `otDnsQueryConfig` determines which records to query (SRV only, TXT only, or both SRV and TXT) and how to perform the query (together in the same message, separately in parallel, or in optimized mode where client will try in the same message first and then separately if it fails to get a response). The SRV record provides information about service port, priority, and weight along with the host name associated with the service instance. This function DOES NOT perform address resolution for the host name discovered from SRV record. The server/resolver may provide AAAA/A record(s) for the host name in the Additional Data section of the response to SRV/TXT query and this information can be retrieved using `otDnsServiceResponseGetServiceInfo()` in `otDnsServiceCallback`. Users of this API MUST NOT assume that host address will always be available from `otDnsServiceResponseGetServiceInfo()`.
Starts a DNS service instance resolution for a given service instance, with a potential follow-up address resolution for the host name discovered for the service instance. Is available when `OPENTHREAD_CONFIG_DNS_CLIENT_SERVICE_DISCOVERY_ENABLE` is enabled. The @p aConfig can be NULL. In this case the default config (from `otDnsClientGetDefaultConfig()`) will be used as the config for this query. In a non-NULL @p aConfig, some of the fields can be left unspecified (value zero). The unspecified fields are then replaced by the values from the default config. This function cannot be used with `mServiceMode` in DNS config set to `OT_DNS_SERVICE_MODE_TXT` (i.e., querying for TXT record only) and will return `OT_ERROR_INVALID_ARGS`. Behaves similarly to `otDnsClientResolveService()` sending queries for SRV and TXT records. However, if the server/resolver does not provide AAAA/A records for the host name in the response to SRV query (in the Additional Data section), it will perform host name resolution (sending an AAAA query) for the discovered host name from the SRV record. The callback @p aCallback is invoked when responses for all queries are received (i.e., both service and host address resolutions are finished).
Performs the uart I/O for OpenThread.
Get the link-layer address of the infrastructure interface. OpenThread invokes this method when the address is required, for example: when generating an ND6 message which includes a source link-layer address option.
Performs any initialization for the settings subsystem, if necessary. Also sets the sensitive keys that should be stored in the secure area. Note that the memory pointed by @p aSensitiveKeys MUST not be released before @p aInstance is destroyed.
Performs any de-initialization for the settings subsystem, if necessary.
Fetches the value of a setting. Fetches the value of the setting identified by @p aKey and write it to the memory pointed to by aValue. It then writes the length to the integer pointed to by @p aValueLength. The initial value of @p aValueLength is the maximum number of bytes to be written to @p aValue. Can be used to check for the existence of a key without fetching the value by setting @p aValue and @p aValueLength to NULL. You can also check the length of the setting without fetching it by setting only aValue to NULL. Note that the underlying storage implementation is not required to maintain the order of settings with multiple values. The order of such values MAY change after ANY write operation to the store.
Sets or replaces the value of a setting. Sets or replaces the value of a setting identified by @p aKey. Calling this function successfully may cause unrelated settings with multiple values to be reordered. OpenThread stack guarantees to use `otPlatSettingsSet()` method for a @p aKey that was either previously set using `otPlatSettingsSet()` (i.e., contains a single value) or is empty and/or fully deleted (contains no value). Platform layer can rely and use this fact for optimizing its implementation.
Adds a value to a setting. Adds the value to a setting identified by @p aKey, without replacing any existing values. Note that the underlying implementation is not required to maintain the order of the items associated with a specific key. The added value may be added to the end, the beginning, or even somewhere in the middle. The order of any pre-existing values may also change. Calling this function successfully may cause unrelated settings with multiple values to be reordered. OpenThread stack guarantees to use `otPlatSettingsAdd()` method for a @p aKey that was either previously managed by `otPlatSettingsAdd()` (i.e., contains one or more items) or is empty and/or fully deleted (contains no value). Platform layer can rely and use this fact for optimizing its implementation.
Removes a setting from the setting store. Deletes a specific value from the setting identified by aKey from the settings store. Note that the underlying implementation is not required to maintain the order of the items associated with a specific key.
Removes all settings from the setting store. Deletes all settings from the settings store, resetting it to its initial factory state.
Performs the alarm process and triggers the fired timers for OpenThread. return - ESP_OK on success - ESP_ERROR on other failures
Set the PAN ID for address filtering.
Set the Short Address for address filtering.
Add a short address to the source address match table.
Remove a short address from the source address match table.
Gets the next Multicast Listener info (using an iterator). @sa otBackboneRouterMulticastListenerClear @sa otBackboneRouterMulticastListenerAdd
Check if the steering data includes a Joiner with a given discerner value.
Enables or disables TREL operation. When @p aEnable is true, this function initiates an ongoing DNS-SD browse on the service name "_trel._udp" within the local browsing domain to discover other devices supporting TREL. Device also registers a new service to be advertised using DNS-SD, with the service name is "_trel._udp" indicating its support for TREL. Device is then ready to receive TREL messages from peers. When @p aEnable is false, this function stops the DNS-SD browse on the service name "_trel._udp", stops advertising TREL DNS-SD service, and clears the TREL peer table.
Indicates whether the TREL operation is enabled.
Sets the filter mode (enables/disables filtering). When filter mode is enabled, any rx and tx traffic through TREL interface is silently dropped. This is mainly intended for use during testing. Unlike `otTrel{Enable/Disable}()` which fully starts/stops the TREL operation, when filter mode is enabled the TREL interface continues to be enabled.
Indicates whether or not the filter mode is enabled.
This function performs the netif process.
Gets the instance identifier. The instance identifier is set to a random value when the instance is constructed, and then its value will not change after initialization.
Returns the current instance uptime (in msec). Requires `OPENTHREAD_CONFIG_UPTIME_ENABLE` to be enabled. The uptime is given as number of milliseconds since OpenThread instance was initialized.
Returns the current instance uptime as a human-readable string. Requires `OPENTHREAD_CONFIG_UPTIME_ENABLE` to be enabled. The string follows the format "::." for hours, minutes, seconds and millisecond (if uptime is shorter than one day) or "d.::." (if longer than a day). If the resulting string does not fit in @p aBuffer (within its @p aSize characters), the string will be truncated but the outputted string is always null-terminated.
Removes a callback to indicate when certain configuration or state changes within OpenThread.
Triggers a platform reset. The reset process ensures that all the OpenThread state/info (stored in volatile memory) is erased. Note that the `otPlatformReset` does not erase any persistent state/info saved in non-volatile memory.
Deletes all the settings stored on non-volatile memory, and then triggers a platform reset.
Resets the internal states of the OpenThread radio stack. Callbacks and configurations are preserved. This API is only available under radio builds (`OPENTHREAD_RADIO = 1`).
Erases all the OpenThread persistent info (network settings) stored on non-volatile memory. Erase is successful only if the device is in `disabled` state/role.
Gets the OpenThread radio version string.
Get the Message Buffer information.
Reset the Message Buffer information counter tracking the maximum number buffers in use at the same time. This resets `mMaxUsedBuffers` in `otBufferInfo`.
Gets the external FEM's Rx LNA gain in dBm.
Sets the external FEM's Rx LNA gain in dBm.
Set the Extended Address for address filtering.
Set the max transmit power for a specific channel.
Add an extended address to the source address match table.
Remove an extended address from the source address match table.
Get the bus speed in bits/second between the host and the radio chip.
Get the bus latency in microseconds between the host and the radio chip.
Schedule a radio reception window at a specific time and duration.
Adds a Network Interface Address to the Thread interface. The passed-in instance @p aAddress is copied by the Thread interface. The Thread interface only supports a fixed number of externally added unicast addresses. See `OPENTHREAD_CONFIG_IP6_MAX_EXT_UCAST_ADDRS`.
Perform OpenThread source address selection.
Indicates whether the SLAAC module is enabled or not. `OPENTHREAD_CONFIG_IP6_SLAAC_ENABLE` build-time feature must be enabled.
Enables/disables the SLAAC module. `OPENTHREAD_CONFIG_IP6_SLAAC_ENABLE` build-time feature must be enabled. When SLAAC module is enabled, SLAAC addresses (based on on-mesh prefixes in Network Data) are added to the interface. When SLAAC module is disabled any previously added SLAAC address is removed.
Removes a Network Interface Address from the Thread interface.
Gets the list of IPv6 addresses assigned to the Thread interface.
Indicates whether or not a unicast IPv6 address is assigned to the Thread interface.
Gets the list of IPv6 multicast addresses subscribed to the Thread interface.
Allocate a new message buffer and write the IPv6 datagram to the message buffer for sending an IPv6 message. @sa otMessageFree
Indicates whether or not Thread control traffic is filtered out when delivering IPv6 datagrams via the callback specified in otIp6SetReceiveCallback(). @sa otIp6SetReceiveCallback @sa otIp6SetReceiveFilterEnabled
Removes all ports from the allowed unsecure port list.
Returns a pointer to the unsecure port list.
Sets the SLAAC module filter handler. `OPENTHREAD_CONFIG_IP6_SLAAC_ENABLE` build-time feature must be enabled. The filter handler is called by SLAAC module when it is about to add a SLAAC address based on a prefix to decide whether the address should be added or not. A NULL filter handler disables filtering and allows all SLAAC addresses to be added. If this function is not called, the default filter used by SLAAC module will be NULL (filtering is disabled).
Sets the Mesh Local IID (for test purpose). Requires `OPENTHREAD_CONFIG_REFERENCE_DEVICE_ENABLE`.
Gets the Border Routing counters. `OPENTHREAD_CONFIG_IP6_BR_COUNTERS_ENABLE` build-time feature must be enabled.
Resets the Border Routing counters.
Indicates whether a valid network is present in the Active Operational Dataset or not.
Sets the Pending Operational Dataset. This function consistently returns `OT_ERROR_NONE` and can effectively be treated as having a `void` return type. Previously, other errors (e.g., `OT_ERROR_NOT_IMPLEMENTED`) were allowed for legacy reasons. However, as non-volatile storage is now mandatory for Thread operation, any failure to save the dataset will trigger an assertion. The `otError` return type is retained for backward compatibility.
Starts an IEEE 802.15.4 Active Scan
Indicates whether or not an IEEE 802.15.4 Active Scan is currently in progress.
Starts an IEEE 802.15.4 Energy Scan
Indicates whether or not an IEEE 802.15.4 Energy Scan is currently in progress.
Enqueues an IEEE 802.15.4 Data Request message for transmission.
Indicates whether or not an IEEE 802.15.4 MAC is in the transmit state. MAC module is in the transmit state during CSMA/CA procedure, CCA, Data, Beacon or Data Request frame transmission and receiving an ACK of a transmitted frame. MAC module is not in the transmit state during transmission of an ACK frame or a Beacon Request frame.
Get the supported channel mask of MAC layer.
Set the supported channel mask of MAC layer. Succeeds only when Thread protocols are disabled.
Resets the MAC layer counters.
Registers a callback to provide received raw IEEE 802.15.4 frames.
Indicates whether or not promiscuous mode is enabled at the link layer.
Enables or disables the link layer promiscuous mode.
Returns the current CCA (Clear Channel Assessment) failure rate. The rate is maintained over a window of (roughly) last `OPENTHREAD_CONFIG_CCA_FAILURE_RATE_AVERAGING_WINDOW` frame transmissions.
Instructs the device to send an empty IEEE 802.15.4 data frame. Is only supported on an Rx-Off-When-Idle device to send an empty data frame to its parent. Note: available only when `OPENTHREAD_CONFIG_REFERENCE_DEVICE_ENABLE` is enabled.
Sets the region code. The radio region format is the 2-bytes ascii representation of the ISO 3166 alpha-2 code.
Get the region code. The radio region format is the 2-bytes ascii representation of the ISO 3166 alpha-2 code.
Sets the rx-on-when-idle state.
Converts received signal strength to link quality.
Converts link quality to typical received signal strength.
Get the MAC layer counters.
Sets the Thread Joiner Advertisement when discovering Thread network. Thread Joiner Advertisement is used to allow a Joiner to advertise its own application-specific information (such as Vendor ID, Product ID, Discriminator, etc.) via a newly-proposed Joiner Advertisement TLV, and to make this information available to Commissioners or Commissioner Candidates without human interaction.
Sets the IEEE 802.15.4 Extended PAN ID. @sa otThreadGetExtendedPanId
Returns a pointer to the Leader's RLOC.
Get the MLE Link Mode configuration. @sa otThreadSetLinkMode
Get the Thread Network Key. @sa otThreadSetNetworkKey
Set the Thread Network Key. Succeeds only when Thread protocols are disabled. A successful call to this function invalidates the Active and Pending Operational Datasets in non-volatile memory. @sa otThreadGetNetworkKey
Gets the Thread Routing Locator (RLOC) address.
Gets the Mesh Local EID address.
Sets the Mesh Local Prefix. Succeeds only when Thread protocols are disabled. A successful call to this function invalidates the Active and Pending Operational Datasets in non-volatile memory.
Gets the Thread link-local IPv6 address. The Thread link local address is derived using IEEE802.15.4 Extended Address as Interface Identifier.
Gets the Thread Link-Local All Thread Nodes multicast address. The address is a link-local Unicast Prefix-Based Multicast Address [RFC 3306], with: - flgs set to 3 (P = 1 and T = 1) - scop set to 2 - plen set to 64 - network prefix set to the Mesh Local Prefix - group ID set to 1
Gets the Thread Realm-Local All Thread Nodes multicast address. The address is a realm-local Unicast Prefix-Based Multicast Address [RFC 3306], with: - flgs set to 3 (P = 1 and T = 1) - scop set to 3 - plen set to 64 - network prefix set to the Mesh Local Prefix - group ID set to 1
Retrieves the Service ALOC for given Service ID.
Sets or clears the Interface Identifier manually specified for the Thread Domain Unicast Address. Available when `OPENTHREAD_CONFIG_DUA_ENABLE` is enabled. @sa otThreadGetFixedDuaInterfaceIdentifier
Gets the Interface Identifier manually specified for the Thread Domain Unicast Address. Available when `OPENTHREAD_CONFIG_DUA_ENABLE` is enabled. @sa otThreadSetFixedDuaInterfaceIdentifier
Indicates whether a node is the only router on the network.
Starts a Thread Discovery scan.
Determines if an MLE Thread Discovery is currently in progress.
Sets a callback to receive MLE Discovery Request data.
Sends a Proactive Address Notification (ADDR_NTF.ntf) message. Is only available when `OPENTHREAD_CONFIG_REFERENCE_DEVICE_ENABLE` is enabled.
Sends a Proactive Backbone Notification (PRO_BB.ntf) message on the Backbone link. Is only available when `OPENTHREAD_CONFIG_REFERENCE_DEVICE_ENABLE` is enabled.
Notifies other nodes in the network (if any) and then stops Thread protocol operation. It sends an Address Release if it's a router, or sets its child timeout to 0 if it's a child.
Detach from the Thread network.
Attempt to reattach as a child.
Gets the next neighbor information. It is used to go through the entries of the neighbor table.
Get the Thread Leader Data.
Get the Leader's Router ID.
The function retrieves diagnostic information for a Thread Router as parent.
The function retrieves the average RSSI for the Thread Parent.
The function retrieves the RSSI of the last packet from the Thread Parent.
Starts the process for child to search for a better parent while staying attached to its current parent. Must be used when device is attached as a child.
Resets the IPv6 counters.
Gets the time-in-queue histogram for messages in the TX queue. Requires `OPENTHREAD_CONFIG_TX_QUEUE_STATISTICS_ENABLE`. Histogram of the time-in-queue of messages in the transmit queue is collected. The time-in-queue is tracked for direct transmissions only and is measured as the duration from when a message is added to the transmit queue until it is passed to the MAC layer for transmission or dropped. The histogram is returned as an array of `uint32_t` values with `aNumBins` entries. The first entry in the array (at index 0) represents the number of messages with a time-in-queue less than `aBinInterval`. The second entry represents the number of messages with a time-in-queue greater than or equal to `aBinInterval`, but less than `2 * aBinInterval`. And so on. The last entry represents the number of messages with time-in-queue greater than or equal to `(aNumBins - 1) * aBinInterval`. The collected statistics can be reset by calling `otThreadResetTimeInQueueStat()`. The histogram information is collected since the OpenThread instance was initialized or since the last time statistics collection was reset by calling the `otThreadResetTimeInQueueStat()`. Pointers @p aNumBins and @p aBinInterval MUST NOT be NULL.
Gets the maximum time-in-queue for messages in the TX queue. Requires `OPENTHREAD_CONFIG_TX_QUEUE_STATISTICS_ENABLE`. The time-in-queue is tracked for direct transmissions only and is measured as the duration from when a message is added to the transmit queue until it is passed to the MAC layer for transmission or dropped. The collected statistics can be reset by calling `otThreadResetTimeInQueueStat()`.
Resets the TX queue time-in-queue statistics. Requires `OPENTHREAD_CONFIG_TX_QUEUE_STATISTICS_ENABLE`.
Gets the Thread MLE counters.
Resets the Thread MLE counters.
Get the Network Data Version.
Get the Stable Network Data Version.
Check whether a given Prefix can act as a valid OMR prefix and also the Leader's Network Data contains this prefix.
For FTD only, gets a minimal delay timer.
For FTD only, sets a minimal delay timer.
Performs a software reset on the platform, if supported.
Returns the reason for the last platform reset.
Sets the desired MCU power state. This is only applicable and used for NCP configuration when `OPENTHREAD_CONFIG_NCP_ENABLE_MCU_POWER_STATE_CONTROL` is enabled.
Gets the current desired MCU power state. This is only applicable and used for NCP configuration when `OPENTHREAD_CONFIG_NCP_ENABLE_MCU_POWER_STATE_CONTROL` is enabled. After a reset, the power state MUST return `OT_PLAT_POWER_STATE_ON`. During operation, power state SHOULD only change through an explicit successful call to `otPlatSetMcuPowerState()`.
Gets the state of NAT64 prefix manager. Available when `OPENTHREAD_CONFIG_NAT64_BORDER_ROUTING_ENABLE` is enabled.
Signal diagnostics module that the alarm has fired.
Sets DNS-SD server query callbacks. The DNS-SD server calls @p aSubscribe to subscribe to a service or service instance to resolve a DNS-SD query and @p aUnsubscribe to unsubscribe when the query is resolved or timeout.
Notifies a discovered service instance. The external query resolver (e.g. Discovery Proxy) should call this function to notify OpenThread core of the subscribed services or service instances.
Notifies a discovered host. The external query resolver (e.g. Discovery Proxy) should call this function to notify OpenThread core of the subscribed hosts.
Acquires the next query in the DNS-SD server.
Returns the counters of the DNS-SD server.
Returns the port the SRP server is listening to.
Sets the SRP service updates handler on SRP server.
Reports the result of processing a SRP update to the SRP server. The Service Update Handler should call this function to return the result of its processing of a SRP update.
Returns the response counters of the SRP server.
Indicates whether or not currently the "DNS/SRP Service" entry is added to the Thread Network Data. Requires the feature `OPENTHREAD_CONFIG_TMF_NETDATA_SERVICE_ENABLE` to be enabled.
Sets a callback for notifying when a published "DNS/SRP Service" is actually added to or removed from the Thread Network Data. A subsequent call to this function replaces any previously set callback function. Requires the feature `OPENTHREAD_CONFIG_TMF_NETDATA_SERVICE_ENABLE` to be enabled.
Indicates whether or not currently a published prefix entry (on-mesh or external route) is added to the Thread Network Data. Requires the feature `OPENTHREAD_CONFIG_BORDER_ROUTER_ENABLE` to be enabled.
Sets a callback for notifying when a published prefix entry is actually added to or removed from the Thread Network Data. A subsequent call to this function replaces any previously set callback function. Requires the feature `OPENTHREAD_CONFIG_BORDER_ROUTER_ENABLE` to be enabled.
Get the current device properties. Requires `OPENTHREAD_CONFIG_MLE_DEVICE_PROPERTY_LEADER_WEIGHT_ENABLE`.
Set the device properties which are then used to determine and set the Leader Weight. Requires `OPENTHREAD_CONFIG_MLE_DEVICE_PROPERTY_LEADER_WEIGHT_ENABLE`.
Attempt to become a router.
Become a leader and start a new partition. If the device is not attached, this API will force the device to start as the leader of the network. This use case is only intended for testing and demo purposes, and using the API while the device is detached can make a production application non-compliant with the Thread Specification. If the device is already attached, this API can be used to try to take over as the leader, creating a new partition. For this to work, the local leader weight (`otThreadGetLocalLeaderWeight()`) must be larger than the weight of the current leader (`otThreadGetLeaderWeight()`). If it is not, `OT_ERROR_NOT_CAPABLE` is returned to indicate to the caller that they need to adjust the weight. Taking over the leader role in this way is only allowed when triggered by an explicit user action. Using this API without such user action can make a production application non-compliant with the Thread Specification.
Gets diagnostic information for an attached Child by its Child ID or RLOC16.
The function retains diagnostic information for an attached Child by the internal table index. @sa otGetMaxAllowedChildren
Gets the next IPv6 address (using an iterator) for a given child. @sa otThreadGetChildInfoByIndex
Get the current Router ID Sequence.
The function returns the maximum allowed router ID
The function retains diagnostic information for a given Thread Router.
Gets the next EID cache entry (using an iterator).
Get the Thread PSKc @sa otThreadSetPskc
Set the Thread PSKc Will only succeed when Thread protocols are disabled. A successful call to this function will also invalidate the Active and Pending Operational Datasets in non-volatile memory. @sa otThreadGetPskc
Registers a neighbor table callback function. The provided callback (if non-NULL) will be invoked when there is a change in the neighbor table (e.g., a child or a router neighbor entry is being added/removed or an existing child's mode is changed). Subsequent calls to this method will overwrite the previous callback. Note that this callback in invoked while the neighbor/child table is being updated and always before the `otStateChangedCallback`.
Gets the range of router IDs that are allowed to assign to nodes within the thread network. @sa otThreadSetRouterIdRange
Sets the range of router IDs that are allowed to assign to nodes within the thread network. @sa otThreadGetRouterIdRange
Gets the current Interval Max value used by Advertisement trickle timer. This API requires `OPENTHREAD_CONFIG_REFERENCE_DEVICE_ENABLE`, and is intended for testing only.
Indicates whether or not a Router ID is currently allocated.
Gets the next hop and path cost towards a given RLOC16 destination. Can be used with either @p aNextHopRloc16 or @p aPathCost being NULL indicating caller does not want to get the value.
Processes the received radio frame.
Set the radio raw power setting for diagnostics module.
Get the radio raw power setting for diagnostics module.
Enable/disable the platform layer to use the raw power setting set by `otPlatDiagRadioSetRawPowerSetting()`.
Start/stop the platform layer to transmit continuous carrier wave.
Start/stop the platform layer to transmit stream of characters.
Get the power settings for the given channel.
Sets the diag output callback.
Processes a factory diagnostics command line.
Processes a factory diagnostics command line.
Indicates whether or not the factory diagnostics mode is enabled.
Gets the local Domain Prefix configuration.
Sets the Backbone Router Multicast Listener callback.
Sets the Backbone Router ND Proxy callback.
Gets the Backbone Router ND Proxy info.
Sets the Backbone Router Domain Prefix callback.
Get the value of supervision check timeout failure counter. The counter tracks the number of supervision check failures on the child. It is incremented when the child does not hear from its parent within the specified check timeout interval.
Reset the supervision check timeout failure counter to zero.
Send a Network Diagnostic Get request. Requires `OPENTHREAD_CONFIG_TMF_NETDIAG_CLIENT_ENABLE`.
Send a Network Diagnostic Reset request. Requires `OPENTHREAD_CONFIG_TMF_NETDIAG_CLIENT_ENABLE`.
Starts network topology discovery.
Cancels an ongoing topology discovery if there is one, otherwise no action. When ongoing discovery is cancelled, the callback from `otMeshDiagDiscoverTopology()` will not be called anymore.
Gets the counters of the Thread Border Agent.
Gets the #otBorderAgentState of the Thread Border Agent role.
Gets the UDP port of the Thread Border Agent service.
Gets the randomly generated Border Agent ID. Requires `OPENTHREAD_CONFIG_BORDER_AGENT_ID_ENABLE`. The ID is saved in persistent storage and survives reboots. The typical use case of the ID is to be published in the MeshCoP mDNS service as the `id` TXT value for the client to identify this Border Router/Agent device. @sa otBorderAgentSetId
Sets the Border Agent ID. Requires `OPENTHREAD_CONFIG_BORDER_AGENT_ID_ENABLE`. The Border Agent ID will be saved in persistent storage and survive reboots. It's required to set the ID only once after factory reset. If the ID has never been set by calling this function, a random ID will be generated and returned when `otBorderAgentGetId` is called. @sa otBorderAgentGetId
Sets the ephemeral key for a given timeout duration. Requires `OPENTHREAD_CONFIG_BORDER_AGENT_EPHEMERAL_KEY_ENABLE`. The ephemeral key can be set when the Border Agent is already running and is not currently connected to any external commissioner (i.e., it is in `OT_BORDER_AGENT_STATE_STARTED` state). Otherwise `OT_ERROR_INVALID_STATE` is returned. To terminate active commissioner sessions, use the `otBorderAgentDisconnect()` API. The given @p aKeyString is directly used as the ephemeral PSK (excluding the trailing null `\0` character ). The @p aKeyString length must be between `OT_BORDER_AGENT_MIN_EPHEMERAL_KEY_LENGTH` and `OT_BORDER_AGENT_MAX_EPHEMERAL_KEY_LENGTH`, inclusive. Setting the ephemeral key again before a previously set key has timed out will replace the previously set key and reset the timeout. During the timeout interval, the ephemeral key can be used only once by an external commissioner to establish a connection. After the commissioner disconnects, the ephemeral key is cleared, and the Border Agent reverts to using PSKc. If the timeout expires while a commissioner is still connected, the session will be terminated, and the Border Agent will cease using the ephemeral key and revert to PSKc.
Cancels the ephemeral key that is in use. Requires `OPENTHREAD_CONFIG_BORDER_AGENT_EPHEMERAL_KEY_ENABLE`. Can be used to cancel a previously set ephemeral key before it times out. If the Border Agent is not running or there is no ephemeral key in use, calling this function has no effect. If a commissioner is connected using the ephemeral key and is currently active, calling this function does not change its state. In this case the `otBorderAgentIsEphemeralKeyActive()` will continue to return `TRUE` until the commissioner disconnects, or the ephemeral key timeout expires. To terminate active commissioner sessions, use the `otBorderAgentDisconnect()` API.
Indicates whether or not an ephemeral key is currently active. Requires `OPENTHREAD_CONFIG_BORDER_AGENT_EPHEMERAL_KEY_ENABLE`.
Sets the callback function used by the Border Agent to notify any changes related to use of ephemeral key. Requires `OPENTHREAD_CONFIG_BORDER_AGENT_EPHEMERAL_KEY_ENABLE`. A subsequent call to this function will replace any previously set callback.
Disconnects the Border Agent from any active secure sessions. If Border Agent is connected to a commissioner candidate with ephemeral key, calling this API will cause the ephemeral key to be cleared after the session is disconnected. The Border Agent state may not change immediately upon calling this method. The state will be updated when the connection update is notified with a delay.
Sends a CoAP request block-wise with custom transmission parameters. Is available when OPENTHREAD_CONFIG_COAP_BLOCKWISE_TRANSFER_ENABLE configuration is enabled. If a response for a request is expected, respective function and context information should be provided. If the response is expected to be block-wise, a respective hook function should be provided. If no response is expected, these arguments should be NULL pointers.
Sets the default handler for unhandled CoAP requests.
Sends a CoAP response block-wise from the server with custom transmission parameters. Is available when OPENTHREAD_CONFIG_COAP_BLOCKWISE_TRANSFER_ENABLE configuration is enabled.
Sends a UDP message without socket.
Gets the head of linked list of UDP Sockets.
Determines if the given UDP port is exclusively opened by OpenThread API.
Indicates whether or not ICMPv6 Echo processing is enabled.
Registers a handler to provide received ICMPv6 messages.
Sends an ICMPv6 Echo Request via the Thread interface.
Starts query for child table for a given router.
Sends a query to a parent to retrieve the IPv6 addresses of all its MTD children.
Starts query for router neighbor table for a given router.
Add a border router configuration to the local network data. @sa otBorderRouterRemoveOnMeshPrefix @sa otBorderRouterRegister
Remove a border router configuration from the local network data. @sa otBorderRouterAddOnMeshPrefix @sa otBorderRouterRegister
Add an external route configuration to the local network data. @sa otBorderRouterRemoveRoute @sa otBorderRouterRegister
Remove an external route configuration from the local network data. @sa otBorderRouterAddRoute @sa otBorderRouterRegister
Provides a full or stable copy of the local Thread Network Data.
Add a service configuration to the local network data. @sa otServerRemoveService @sa otServerRegister
Remove a service configuration from the local network data. @sa otServerAddService @sa otServerRegister
Immediately register the local network data with the Leader. @sa otServerAddService @sa otServerRemoveService
Initialize the NCP based on HDLC framing.
Signal diagnostics module that the alarm has fired.
Initialize the CLI module.
Initializes and enables TREL platform layer. Upon this call, the platform layer MUST perform the following: 1) TREL platform layer MUST open a UDP socket to listen for and receive TREL messages from peers. The socket is bound to an ephemeral port number chosen by the platform layer. The port number MUST be returned in @p aUdpPort. The socket is also bound to network interface(s) on which TREL is to be supported. The socket and the chosen port should stay valid while TREL is enabled. 2) Platform layer MUST initiate an ongoing DNS-SD browse on the service name "_trel._udp" within the local browsing domain to discover other devices supporting TREL. The ongoing browse will produce two different types of events: "add" events and "remove" events. When the browse is started, it should produce an "add" event for every TREL peer currently present on the network. Whenever a TREL peer goes offline, a "remove" event should be produced. "remove" events are not guaranteed, however. When a TREL service instance is discovered, a new ongoing DNS-SD query for an AAAA record should be started on the hostname indicated in the SRV record of the discovered instance. If multiple host IPv6 addressees are discovered for a peer, one with highest scope among all addresses MUST be reported (if there are multiple address at same scope, one must be selected randomly). TREL platform MUST signal back the discovered peer info using `otPlatTrelHandleDiscoveredPeerInfo()` callback. This callback MUST be invoked when a new peer is discovered, when there is a change in an existing entry (e.g., new TXT record or new port number or new IPv6 address), or when the peer is removed.
Disables TREL platform layer. After this call, the platform layer MUST stop DNS-SD browse on the service name "_trel._udp", stop advertising the TREL DNS-SD service (from `otPlatTrelRegisterService()`) and MUST close the UDP socket used to receive TREL messages. @pram[in] aInstance The OpenThread instance.
Registers a new service to be advertised using DNS-SD [RFC6763]. The service name is "_trel._udp". The platform should use its own hostname, which when combined with the service name and the local DNS-SD domain name will produce the full service instance name, for example "example-host._trel._udp.local.". The domain under which the service instance name appears will be 'local' for mDNS, and will be whatever domain is used for service registration in the case of a non-mDNS local DNS-SD service. A subsequent call to this function updates the previous service. It is used to update the TXT record data and/or the port number. The @p aTxtData buffer is not persisted after the return from this function. The platform layer MUST NOT keep the pointer and instead copy the content if needed.
Requests a TREL UDP packet to be sent to a given destination.
Gets the pointer to the TREL counters in the platform layer.
Resets the TREL counters in the platform layer.
Initializes a peer table iterator.
Iterates over the peer table entries and get the next entry from the table
Returns the number of TREL peers.
Resets the TREL counters.
Gets the UDP port of the TREL interface.
The infra interface driver calls this method to notify OpenThread that an ICMPv6 Neighbor Discovery message is received. See RFC 4861: https://tools.ietf.org/html/rfc4861.
The infra interface driver calls this method to notify OpenThread of the interface state changes. It is fine for the platform to call to method even when the running state of the interface hasn't changed. In this case, the Routing Manager state is not affected.
The infra interface driver calls this method to notify OpenThread that the discovery of NAT64 prefix is done. Is expected to be invoked after calling otPlatInfraIfDiscoverNat64Prefix. If no NAT64 prefix is discovered, @p aIp6Prefix shall point to an empty prefix with zero length.
Handles ICMP6 RA messages received on the Thread interface on the platform. The `aMessage` should point to a buffer of a valid ICMPv6 message (without IP headers) with router advertisement as the value of type field of the message. When DHCPv6 PD is disabled, the message will be dropped silently. Note: RA messages will not be forwarded into Thread networks, while for many platforms, RA messages is the way of distributing a prefix and other infomations to the downstream network. The typical usecase of this function is to handle the router advertisement messages sent by the platform as a result of DHCPv6 Prefix Delegation. Requires `OPENTHREAD_CONFIG_BORDER_ROUTING_DHCP6_PD_ENABLE`.
Process a prefix received from the DHCPv6 PD Server. The prefix is received on the DHCPv6 PD client callback and provided to the Routing Manager via this API. The prefix lifetime can be updated by calling the function again with updated time values. If the preferred lifetime of the prefix is set to 0, the prefix becomes deprecated. When this function is called multiple times, the smallest prefix is preferred as this rule allows choosing a GUA instead of a ULA. Requires `OPENTHREAD_CONFIG_BORDER_ROUTING_DHCP6_PD_ENABLE`.
Enables/disables the raw link-layer.
Indicates whether or not the raw link-layer is enabled.
Gets the status of promiscuous mode.
Enables or disables promiscuous mode.
Set the Short Address for address filtering.
Transition the radio from Receive to Sleep. Turn off the radio.
Transitioning the radio from Sleep to Receive. Turn on the radio.
The radio transitions from Transmit to Receive. Returns a pointer to the transmit buffer. The caller forms the IEEE 802.15.4 frame in this buffer then calls otLinkRawTransmit() to request transmission.
Begins the transmit sequence on the radio. The caller must form the IEEE 802.15.4 frame in the buffer provided by otLinkRawGetTransmitBuffer() before requesting transmission. The channel and transmit power are also included in the otRadioFrame structure. The transmit sequence consists of: 1. Transitioning the radio to Transmit from Receive. 2. Transmits the PSDU on the given channel and at the given transmit power.
Get the most recent RSSI measurement.
Get the radio capabilities.
Begins the energy scan sequence on the radio.
Enable/Disable source match for frame pending.
Adding short address to the source match table.
Adding extended address to the source match table.
Removing short address to the source match table.
Removing extended address to the source match table of the radio.
Removing all the short addresses from the source match table.
Removing all the extended addresses from the source match table.
Update MAC keys and key index.
Sets the current MAC frame counter value. Always sets the MAC counter to the new given value @p aMacFrameCounter independent of the current value.
Sets the current MAC frame counter value only if the new value is larger than the current one.
Get current platform time (64bits width) of the radio chip.
Get the IID corresponding to the given OpenThread instance pointer.
The platform completed the interface switching procedure. Should be invoked immediately after processing #otPlatMultipanSetActiveInstance if no delay is needed, or if some longer radio operations need to complete first, after the switch in interfaces is fully complete.
Get instance currently in control of the radio. If radio does not operate in parallel on all interfaces, this function returns an instance object with granted radio access.
Set `aInstance` as the current active instance controlling radio. This function allows selecting the currently active instance on platforms that do not support parallel communication on multiple interfaces. In other words, if more than one instance is in a receive state, calling #otPlatMultipanSetActiveInstance guarantees that specified instance will be the one receiving. This function returns if the request was received properly. After interface switching is complete, the platform should call #otPlatMultipanSwitchoverDone. Switching interfaces may take longer if `aCompletePending` is set true.
Initialize the NCP based on HDLC framing.
Triggers a platform reset to bootloader mode, if supported. Requires `OPENTHREAD_CONFIG_PLATFORM_BOOTLOADER_MODE_ENABLE`.
Enable the radio coex. Is used when feature OPENTHREAD_CONFIG_PLATFORM_RADIO_COEX_ENABLE is enabled.
Check whether radio coex is enabled or not. Is used when feature OPENTHREAD_CONFIG_PLATFORM_RADIO_COEX_ENABLE is enabled.
Get the radio coexistence metrics. Is used when feature OPENTHREAD_CONFIG_PLATFORM_RADIO_COEX_ENABLE is enabled.
Enable or disable CSL receiver.
Reset CSL receiver in the platform.
Update CSL sample time in radio driver. Sample time is stored in radio driver as a copy to calculate phase when sending ACK with CSL IE. The CSL sample (window) of the CSL receiver extends before and after the sample time. The CSL sample time marks a timestamp in the CSL sample window when a frame should be received in "ideal conditions" if there would be no inaccuracy/clock-drift.
Enable/disable or update Enhanced-ACK Based Probing in radio for a specific Initiator. After Enhanced-ACK Based Probing is configured by a specific Probing Initiator, the Enhanced-ACK sent to that node should include Vendor-Specific IE containing Link Metrics data. This method informs the radio to start/stop to collect Link Metrics data and include Vendor-Specific IE that containing the data in Enhanced-ACK sent to that Probing Initiator.
Add a calibrated power of the specified channel to the power calibration table. The @p aActualPower is the actual measured output power when the parameters of the radio hardware modules are set to the @p aRawPowerSetting. The raw power setting is an opaque byte array. OpenThread doesn't define the format of the raw power setting. Its format is radio hardware related and it should be defined by the developers in the platform radio driver. For example, if the radio hardware contains both the radio chip and the FEM chip, the raw power setting can be a combination of the radio power register and the FEM gain value.
Clear all calibrated powers from the power calibration table.
Set the target power for the given channel. The radio driver should set the actual output power to be less than or equal to the @p aTargetPower and as close as possible to the @p aTargetPower. If the @p aTargetPower is lower than the minimum output power supported by the platform, the output power should be set to the minimum output power supported by the platform. If the @p aTargetPower is higher than the maximum output power supported by the platform, the output power should be set to the maximum output power supported by the platform. If the @p aTargetPower is set to `INT16_MAX`, the corresponding channel is disabled.
Get the raw power setting for the given channel. Platform radio layer should parse the raw power setting based on the radio layer defined format and set the parameters of each radio hardware module.
Registers Multicast Listeners to Primary Backbone Router. `OPENTHREAD_CONFIG_TMF_PROXY_MLR_ENABLE` and `OPENTHREAD_CONFIG_COMMISSIONER_ENABLE` must be enabled. @sa otIp6RegisterMulticastListenersCallback
Enables the Thread Joiner role.
Disables the Thread Joiner role.
Gets the Joiner ID. If a Joiner Discerner is not set, Joiner ID is the first 64 bits of the result of computing SHA-256 over factory-assigned IEEE EUI-64. Otherwise the Joiner ID is calculated from the Joiner Discerner value. The Joiner ID is also used as the device's IEEE 802.15.4 Extended Address during the commissioning process.
Sets the Joiner Discerner. The Joiner Discerner is used to calculate the Joiner ID during the Thread Commissioning process. For more information, refer to #otJoinerGetId.
Gets the Joiner Discerner. For more information, refer to #otJoinerSetDiscerner.
Sends a PAN ID Query message.
Sends MGMT_COMMISSIONER_GET.
Sends MGMT_COMMISSIONER_SET.
Returns the Commissioner Session ID.
Returns the Commissioner State.
Get joiner info at aIterator position.
Gets the Provisioning URL.
Sets the Provisioning URL.
Sends an Announce Begin message.
Sends an Energy Scan Query message.
Enables the Thread Commissioner role.
Disables the Thread Commissioner role.
Returns the Commissioner Id.
Sets the Commissioner Id.
Adds a Joiner entry with a given Joiner Discerner value.
Gets the CSL period in microseconds
Sets the CSL period in microseconds. Disable CSL by setting this parameter to `0`. The CSL period MUST be a multiple of `OT_LINK_CSL_PERIOD_TEN_SYMBOLS_UNIT_IN_USEC`, otherwise `OT_ERROR_INVALID_ARGS` is returned.
Sets the CSL timeout in seconds.
Indicates whether or not CSL is enabled.
Indicates whether the device is connected to a parent which supports CSL.
Gets the Wake-up channel. Requires `OPENTHREAD_CONFIG_WAKEUP_COORDINATOR_ENABLE` or `OPENTHREAD_CONFIG_WAKEUP_END_DEVICE_ENABLE`.
Sets the Wake-up channel. Requires `OPENTHREAD_CONFIG_WAKEUP_COORDINATOR_ENABLE` or `OPENTHREAD_CONFIG_WAKEUP_END_DEVICE_ENABLE`.
Enables or disables listening for wake-up frames. Requires `OPENTHREAD_CONFIG_WAKEUP_END_DEVICE_ENABLE`.
Returns whether listening for wake-up frames is enabled. Requires `OPENTHREAD_CONFIG_WAKEUP_END_DEVICE_ENABLE`.
Get the wake-up listen parameters. Requires `OPENTHREAD_CONFIG_WAKEUP_END_DEVICE_ENABLE`.
Set the wake-up listen parameters. The listen interval must be greater than the listen duration. The listen duration must be greater or equal than the minimum supported. Requires `OPENTHREAD_CONFIG_WAKEUP_END_DEVICE_ENABLE`.
Gets the address mode of MAC filter. Is available when `OPENTHREAD_CONFIG_MAC_FILTER_ENABLE` configuration is enabled.
Sets the address mode of MAC filter. Is available when `OPENTHREAD_CONFIG_MAC_FILTER_ENABLE` configuration is enabled.
Adds an Extended Address to MAC filter. Is available when `OPENTHREAD_CONFIG_MAC_FILTER_ENABLE` configuration is enabled.
Removes an Extended Address from MAC filter. Is available when `OPENTHREAD_CONFIG_MAC_FILTER_ENABLE` configuration is enabled. No action is performed if there is no existing entry in Filter matching the given Extended Address.
Clears all the Extended Addresses from MAC filter. Is available when `OPENTHREAD_CONFIG_MAC_FILTER_ENABLE` configuration is enabled.
Gets an in-use address filter entry. Is available when `OPENTHREAD_CONFIG_MAC_FILTER_ENABLE` configuration is enabled.
Adds the specified Extended Address to the `RssIn` list (or modifies an existing address in the `RssIn` list) and sets the received signal strength (in dBm) entry for messages from that address. The Extended Address does not necessarily have to be in the `address allowlist/denylist` filter to set the `rss`. Is available when `OPENTHREAD_CONFIG_MAC_FILTER_ENABLE` configuration is enabled.
Removes the specified Extended Address from the `RssIn` list. Once removed from the `RssIn` list, this MAC address will instead use the default `rss` and `lqi` settings, assuming defaults have been set. (If no defaults have been set, the over-air signal is used.) Is available when `OPENTHREAD_CONFIG_MAC_FILTER_ENABLE` configuration is enabled. No action is performed if there is no existing entry in the `RssIn` list matching the specified Extended Address.
Sets the default received signal strength (in dBm) on MAC Filter. Is available when `OPENTHREAD_CONFIG_MAC_FILTER_ENABLE` configuration is enabled. The default RSS value is used for all received frames from addresses for which there is no explicit RSS-IN entry in the Filter list (added using `otLinkFilterAddRssIn()`).
Clears any previously set default received signal strength (in dBm) on MAC Filter. Is available when `OPENTHREAD_CONFIG_MAC_FILTER_ENABLE` configuration is enabled.
Clears all the received signal strength (`rss`) and link quality indicator (`lqi`) entries (including defaults) from the `RssIn` list. Performing this action means that all Extended Addresses will use the on-air signal. Is available when `OPENTHREAD_CONFIG_MAC_FILTER_ENABLE` configuration is enabled.
Gets an in-use RssIn filter entry. Is available when `OPENTHREAD_CONFIG_MAC_FILTER_ENABLE` configuration is enabled.
Enables/disables IEEE 802.15.4 radio filter mode. Is available when `OPENTHREAD_CONFIG_MAC_FILTER_ENABLE` configuration is enabled. The radio filter is mainly intended for testing. It can be used to temporarily block all tx/rx on the 802.15.4 radio. When radio filter is enabled, radio is put to sleep instead of receive (to ensure device does not receive any frame and/or potentially send ack). Also the frame transmission requests return immediately without sending the frame over the air (return "no ack" error if ack is requested, otherwise return success).
Indicates whether the IEEE 802.15.4 radio filter is enabled or not. Is available when `OPENTHREAD_CONFIG_MAC_FILTER_ENABLE` configuration is enabled.
Gets histogram of retries for a single direct packet until success. Is valid when OPENTHREAD_CONFIG_MAC_RETRY_SUCCESS_HISTOGRAM_ENABLE configuration is enabled.
Gets histogram of retries for a single indirect packet until success. Is valid when OPENTHREAD_CONFIG_MAC_RETRY_SUCCESS_HISTOGRAM_ENABLE configuration is enabled.
Clears histogram statistics for direct and indirect transmissions. Is valid when OPENTHREAD_CONFIG_MAC_RETRY_SUCCESS_HISTOGRAM_ENABLE configuration is enabled.
Get the `otNetworkKeyRef` for Thread Network Key. Requires the build-time feature `OPENTHREAD_CONFIG_PLATFORM_KEY_REFERENCES_ENABLE` to be enabled. @sa otThreadSetNetworkKeyRef
Set the Thread Network Key as a `otNetworkKeyRef`. Succeeds only when Thread protocols are disabled. A successful call to this function invalidates the Active and Pending Operational Datasets in non-volatile memory. Requires the build-time feature `OPENTHREAD_CONFIG_PLATFORM_KEY_REFERENCES_ENABLE` to be enabled. @sa otThreadGetNetworkKeyRef
Requests the closest destination of a given anycast address to be located. Is only available when `OPENTHREAD_CONFIG_TMF_ANYCAST_LOCATOR_ENABLE` is enabled. If a previous request is ongoing, a subsequent call to this function will cancel and replace the earlier request.
Indicates whether an anycast locate request is currently in progress. Is only available when `OPENTHREAD_CONFIG_TMF_ANYCAST_LOCATOR_ENABLE` is enabled.
Sets the store frame counter ahead. Requires `OPENTHREAD_CONFIG_DYNAMIC_STORE_FRAME_AHEAD_COUNTER_ENABLE` to be enabled. The OpenThread stack stores the MLE and MAC security frame counter values in non-volatile storage, ensuring they persist across device resets. These saved values are set to be ahead of their current values by the "frame counter ahead" value.
Gets the store frame counter ahead. Requires `OPENTHREAD_CONFIG_DYNAMIC_STORE_FRAME_AHEAD_COUNTER_ENABLE` to be enabled.
Registers a callback to receive MLE Parent Response data. Requires `OPENTHREAD_CONFIG_MLE_PARENT_RESPONSE_CALLBACK_API_ENABLE`.
Sends a CoAP request block-wise. Is available when OPENTHREAD_CONFIG_COAP_BLOCKWISE_TRANSFER_ENABLE configuration is enabled. If a response for a request is expected, respective function and context information should be provided. If the response is expected to be block-wise, a respective hook function should be provided. If no response is expected, these arguments should be NULL pointers.
Sends a CoAP request. If a response for a request is expected, respective function and context information should be provided. If no response is expected, these arguments should be NULL pointers.
Sends a CoAP response block-wise from the server. Is available when OPENTHREAD_CONFIG_COAP_BLOCKWISE_TRANSFER_ENABLE configuration is enabled.
Sends a CoAP response from the server.
Performs a hardware reset on the platform to launch bootloader mode, if supported. Used when `OPENTHREAD_CONFIG_PLATFORM_BOOTLOADER_MODE_ENABLE` is enabled.
Gets NAT64 translator counters. The counter is counted since the instance initialized. Available when `OPENTHREAD_CONFIG_NAT64_TRANSLATOR_ENABLE` is enabled.
Gets the NAT64 translator error counters. The counters are initialized to zero when the OpenThread instance is initialized.
Initializes an `otNat64AddressMappingIterator`. An iterator MUST be initialized before it is used. An iterator can be initialized again to restart from the beginning of the mapping info.
Gets the next AddressMapping info (using an iterator). Available when `OPENTHREAD_CONFIG_NAT64_TRANSLATOR_ENABLE` is enabled.
Gets the state of NAT64 translator. Available when `OPENTHREAD_CONFIG_NAT64_TRANSLATOR_ENABLE` is enabled.
Allocate a new message buffer for sending an IPv4 message to the NAT64 translator. Message buffers allocated by this function will have 20 bytes (difference between the size of IPv6 headers and IPv4 header sizes) reserved. Available when `OPENTHREAD_CONFIG_NAT64_TRANSLATOR_ENABLE` is enabled. @sa otNat64Send
Sets the CIDR used when setting the source address of the outgoing translated IPv4 packets. Is available only when OPENTHREAD_CONFIG_NAT64_TRANSLATOR_ENABLE is enabled. @sa otBorderRouterSend @sa otBorderRouterSetReceiveCallback
Translates an IPv4 datagram to an IPv6 datagram and sends via the Thread interface. The caller transfers ownership of @p aMessage when making this call. OpenThread will free @p aMessage when processing is complete, including when a value other than `OT_ERROR_NONE` is returned.
Registers a callback to provide received IPv4 datagrams.
Gets the IPv4 CIDR configured in the NAT64 translator. Available when `OPENTHREAD_CONFIG_NAT64_TRANSLATOR_ENABLE` is enabled.
Initialize the platform implemented message pool. Is used when `OPENTHREAD_CONFIG_PLATFORM_MESSAGE_MANAGEMENT` is enabled.
Allocate a buffer from the platform managed buffer pool. Is used when `OPENTHREAD_CONFIG_PLATFORM_MESSAGE_MANAGEMENT` is enabled. The returned buffer instance MUST have at least `aBufferSize` bytes (as specified in `otPlatMessagePoolInit()`).
Is used to free a buffer back to the platform managed buffer pool. Is used when `OPENTHREAD_CONFIG_PLATFORM_MESSAGE_MANAGEMENT` is enabled.
Get the number of free buffers. Is used when `OPENTHREAD_CONFIG_PLATFORM_MESSAGE_MANAGEMENT` is enabled.
Enable or disable forwarding DNS queries to platform DNS upstream API. Available when `OPENTHREAD_CONFIG_DNS_UPSTREAM_QUERY_ENABLE` is enabled. @sa otPlatDnsStartUpstreamQuery @sa otPlatDnsCancelUpstreamQuery @sa otPlatDnsUpstreamQueryDone
Returns whether the DNSSD server will forward DNS queries to the platform DNS upstream API. Available when `OPENTHREAD_CONFIG_DNS_UPSTREAM_QUERY_ENABLE` is enabled. @sa otDnssdUpstreamQuerySetEnabled
Starts an upstream query transaction. - In success case (and errors represented by DNS protocol messages), the platform is expected to call `otPlatDnsUpstreamQueryDone`. - The OpenThread core may cancel a (possibly timeout) query transaction by calling `otPlatDnsCancelUpstreamQuery`, the platform must not call `otPlatDnsUpstreamQueryDone` on a cancelled transaction.
Cancels a transaction of upstream query. The platform must call `otPlatDnsUpstreamQueryDone` to release the resources.
The platform calls this function to finish DNS query. The transaction will be released, so the platform must not call on the same transaction twice. This function passes the ownership of `aResponse` to OpenThread stack. Platform can pass a nullptr to close a transaction without a response.
Gets the domain name being used by SRP client. Requires `OPENTHREAD_CONFIG_SRP_CLIENT_DOMAIN_NAME_API_ENABLE` to be enabled. If domain name is not set, "default.service.arpa" will be used.
Sets the domain name to be used by SRP client. Requires `OPENTHREAD_CONFIG_SRP_CLIENT_DOMAIN_NAME_API_ENABLE` to be enabled. If not set "default.service.arpa" will be used. The name string buffer pointed to by @p aName MUST persist and stay unchanged after returning from this function. OpenThread will keep the pointer to the string. The domain name can be set before client is started or after start but before host info is registered with server (host info should be in either `STATE_TO_ADD` or `STATE_TO_REMOVE`).
Set Steering data out of band. Configuration option `OPENTHREAD_CONFIG_MLE_STEERING_DATA_SET_OOB_ENABLE` should be set to enable setting of steering data out of band.
Get Key Reference to Thread PSKc stored Requires the build-time feature `OPENTHREAD_CONFIG_PLATFORM_KEY_REFERENCES_ENABLE` to be enabled. @sa otThreadSetPskcRef
Set the Key Reference to the Thread PSKc Requires the build-time feature `OPENTHREAD_CONFIG_PLATFORM_KEY_REFERENCES_ENABLE` to be enabled. Will only succeed when Thread protocols are disabled. Upon success, this will also invalidate the Active and Pending Operational Datasets in non-volatile memory. @sa otThreadGetPskcRef
Gets the radio statistics. The radio statistics include the time when the radio is in TX/RX/Sleep state. These times are in units of microseconds. All times are calculated from the last reset of radio statistics.
Resets the radio statistics. All times are reset to 0.
Adds a block-wise resource to the CoAP server.
Removes a block-wise resource from the CoAP server.
Set UDP forward callback to deliver UDP packets to host.
Handle a UDP packet received from host. @warning No matter the call success or fail, the message is freed.
Initializes a TCP endpoint. Calling this function causes OpenThread to keep track of the TCP endpoint and store and retrieve TCP data inside the @p aEndpoint. The application should refrain from directly accessing or modifying the fields in @p aEndpoint. If the application needs to reclaim the memory backing @p aEndpoint, it should call otTcpEndpointDeinitialize().
Starts the CoAP Secure service.
Starts the CoAP secure service and sets the maximum number of allowed connection attempts before stopping the agent automatically.
Stops the CoAP Secure server.
Sets the Pre-Shared Key (PSK) and cipher suite DTLS_PSK_WITH_AES_128_CCM_8.
Returns the peer x509 certificate base64 encoded.
Sets the authentication mode for the coap secure connection. Disable or enable the verification of peer certificate. Must be called before start.
Sets the local device's X509 certificate with corresponding private key for DTLS session with DTLS_ECDHE_ECDSA_WITH_AES_128_CCM_8.
Sets the trusted top level CAs. It is needed for validating the certificate of the peer. DTLS mode "ECDHE ECDSA with AES 128 CCM 8" for Application CoAPS.
Initializes DTLS session with a peer.
Stops the DTLS connection.
Indicates whether or not the DTLS session is connected.
Indicates whether or not the DTLS session is active.
Indicates whether or not the DTLS session is closed.
Sends a CoAP request block-wise over secure DTLS connection. Is available when OPENTHREAD_CONFIG_COAP_BLOCKWISE_TRANSFER_ENABLE configuration is enabled. If a response for a request is expected, respective function and context information should be provided. If no response is expected, these arguments should be NULL pointers. If Message Id was not set in the header (equal to 0), this function will assign unique Message Id to the message.
Sends a CoAP request over secure DTLS connection. If a response for a request is expected, respective function and context information should be provided. If no response is expected, these arguments should be NULL pointers. If Message Id was not set in the header (equal to 0), this function will assign unique Message Id to the message.
Adds a resource to the CoAP Secure server.
Removes a resource from the CoAP Secure server.
Adds a block-wise resource to the CoAP Secure server.
Removes a block-wise resource from the CoAP Secure server.
Sets the default handler for unhandled CoAP Secure requests.
Sets the connect event callback to indicate when a Client connection to the CoAP Secure server has changed.
Sends a CoAP response block-wise from the CoAP Secure server. Is available when OPENTHREAD_CONFIG_COAP_BLOCKWISE_TRANSFER_ENABLE configuration is enabled.
Sends a CoAP response from the CoAP Secure server.
Gets the DHCPv6 Prefix Delegation (PD) provided off-mesh-routable (OMR) prefix. Only mPrefix, mValidLifetime and mPreferredLifetime fields are used in the returned prefix info. `OPENTHREAD_CONFIG_BORDER_ROUTING_DHCP6_PD_ENABLE` must be enabled. @sa otBorderRoutingGetOmrPrefix @sa otPlatBorderRoutingProcessIcmp6Ra
Gets the data of platform generated RA message processed.. `OPENTHREAD_CONFIG_BORDER_ROUTING_DHCP6_PD_ENABLE` must be enabled.
Enables / Disables DHCPv6 Prefix Delegation. `OPENTHREAD_CONFIG_BORDER_ROUTING_DHCP6_PD_ENABLE` must be enabled.
Gets the current state of DHCPv6 Prefix Delegation. Requires `OPENTHREAD_CONFIG_BORDER_ROUTING_DHCP6_PD_ENABLE` to be enabled.
Sets the callback whenever the DHCPv6 PD state changes on the Thread interface. Subsequent calls to this function replace the previously set callback.
Sets the local on-link prefix. Requires `OPENTHREAD_CONFIG_BORDER_ROUTING_TESTING_API_ENABLE`. This is intended for testing only and using it will make the BR non-compliant with the Thread Specification.
The infra interface driver calls this method to notify OpenThread that an ICMPv6 Neighbor Discovery message is received. See RFC 4861: https://tools.ietf.org/html/rfc4861.
The infra interface driver calls this method to notify OpenThread of the interface state changes. It is fine for the platform to call to method even when the running state of the interface hasn't changed. In this case, the Routing Manager state is not affected.
The infra interface driver calls this method to notify OpenThread that the discovery of NAT64 prefix is done. Is expected to be invoked after calling otPlatInfraIfDiscoverNat64Prefix. If no NAT64 prefix is discovered, @p aIp6Prefix shall point to an empty prefix with zero length.
Initializes a TCP listener. Calling this function causes OpenThread to keep track of the TCP listener and store and retrieve TCP data inside @p aListener. The application should refrain from directly accessing or modifying the fields in @p aListener. If the application needs to reclaim the memory backing @p aListener, it should call otTcpListenerDeinitialize().
Initialize the NCP based on HDLC framing.
Initialize the NCP based on SPI framing.
Sends an MLE Data Request to query Link Metrics. It could be either Single Probe or Forward Tracking Series.
Sends an MLE Link Metrics Management Request to configure or clear a Forward Tracking Series.
Sends an MLE Link Metrics Management Request to configure/clear an Enhanced-ACK Based Probing. This functionality requires OT_LINK_METRICS_INITIATOR feature enabled.
Sends an MLE Link Probe message.
If Link Metrics Manager is enabled.
Enable or disable Link Metrics Manager.
Get Link Metrics data of a neighbor by its extended address.
Performs all platform-specific processing for OpenThread's example applications.
Sends a SNTP query. Is available only if feature `OPENTHREAD_CONFIG_SNTP_CLIENT_ENABLE` is enabled.
Sets the unix era number. The default value of unix era is set to 0. The subsequent eras start after year 2106.
Stops an SRV record resolver. No action is performed if no matching resolver with the same service and callback is currently active. The @p aResolver and all its contained information (strings) are only valid during this call. The platform MUST save a copy of the information if it wants to retain the information after returning from this function.
Starts a TXT record resolver. Initiates a continuous TXT record resolver for the specified service in @p aResolver. Discovered information should be reported through the `mCallback` function in @p aResolver. When the TXT record is removed it is reported with a TTL value of zero. In this case, `mTxtData` may be NULL, and other result fields (such as `mTxtDataLength`) will be ignored by the OpenThread stack. The callback may be invoked immediately with cached information (if available) and potentially before this function returns. When cached result is used, the reported TTL value should reflect the original TTL from the last received response. Multiple resolvers can be started for the same service, provided they use different callback functions. The @p aResolver and all its contained information (strings) are only valid during this call. The platform MUST save a copy of the information if it wants to retain the information after returning from this function.
Stops a TXT record resolver. No action is performed if no matching resolver with the same service and callback is currently active. The @p aResolver and all its contained information (strings) are only valid during this call. The platform MUST save a copy of the information if it wants to retain the information after returning from this function.
Starts an IPv6 address resolver. Initiates a continuous IPv6 address resolver for the specified host name in @p aResolver. Discovered addresses should be reported through the `mCallback` function in @p aResolver. The callback should be invoked whenever addresses are added or removed, providing an updated list. If all addresses are removed, the callback should be invoked with an empty list (`mAddressesLength` set to zero). The callback may be invoked immediately with cached information (if available) and potentially before this function returns. When cached result is used, the reported TTL values should reflect the original TTL from the last received response. Multiple resolvers can be started for the same host name, provided they use different callback functions. The @p aResolver and all its contained information (strings) are only valid during this call. The platform MUST save a copy of the information if it wants to retain the information after returning from this function.
Stops an IPv6 address resolver. No action is performed if no matching resolver with the same host name and callback is currently active. The @p aResolver and all its contained information (strings) are only valid during this call. The platform MUST save a copy of the information if it wants to retain the information after returning from this function.
Starts an IPv4 address resolver. Initiates a continuous IPv4 address resolver for the specified host name in @p aResolver. Discovered addresses should be reported through the `mCallback` function in @p aResolver. The IPv4 addresses are represented using the IPv4-mapped IPv6 address format in `mAddresses` array. The callback should be invoked whenever addresses are added or removed, providing an updated list. If all addresses are removed, the callback should be invoked with an empty list (`mAddressesLength` set to zero). The callback may be invoked immediately with cached information (if available) and potentially before this function returns. When cached result is used, the reported TTL values will reflect the original TTL from the last received response. Multiple resolvers can be started for the same host name, provided they use different callback functions. The @p aResolver and all its contained information (strings) are only valid during this call. The platform MUST save a copy of the information if it wants to retain the information after returning from this function.
Stops an IPv4 address resolver. No action is performed if no matching resolver with the same host name and callback is currently active. The @p aResolver and all its contained information (strings) are only valid during this call. The platform MUST save a copy of the information if it wants to retain the information after returning from this function.
Enables or disables the mDNS module. The mDNS module should be enabled before registration any host, service, or key entries. Disabling mDNS will immediately stop all operations and any communication (multicast or unicast tx) and remove any previously registered entries without sending any "goodbye" announcements or invoking their callback. Once disabled, all currently active browsers and resolvers are stopped.
Indicates whether the mDNS module is enabled.
Sets whether the mDNS module is allowed to send questions requesting unicast responses referred to as "QU" questions. The "QU" questions request unicast responses, in contrast to "QM" questions which request multicast responses. When allowed, the first probe will be sent as a "QU" question. This API can be used to address platform limitation where platform socket cannot accept unicast response received on mDNS port (due to it being already bound).
Indicates whether mDNS module is allowed to send "QU" questions requesting unicast response.
Sets the post-registration conflict callback. If a conflict is detected while registering an entry, it is reported through the provided `otMdnsRegisterCallback`. The `otMdnsConflictCallback` is used only when a name conflict is detected after an entry has been successfully registered. @p aCallback can be set to `NULL` if not needed. Subsequent calls will replace any previously set callback.
Registers or updates a host on mDNS. The fields in @p aHost follow these rules: - The `mHostName` field specifies the host name to register (e.g., "myhost"). MUST NOT contain the domain name. - The `mAddresses` is array of IPv6 addresses to register with the host. `mAddressesLength` provides the number of entries in `mAddresses` array. - The `mAddresses` array can be empty with zero `mAddressesLength`. In this case, mDNS will treat it as if host is unregistered and stops advertising any addresses for this the host name. - The `mTtl` specifies the TTL if non-zero. If zero, the mDNS core will choose the default TTL of 120 seconds. - Other fields in @p aHost structure are ignored in an `otMdnsRegisterHost()` call. This function can be called again for the same `mHostName` to update a previously registered host entry, for example, to change the list of addresses of the host. In this case, the mDNS module will send "goodbye" announcements for any previously registered and now removed addresses and announce any newly added addresses. The outcome of the registration request is reported back by invoking the provided @p aCallback with @p aRequestId as its input and one of the following `aError` inputs: - `OT_ERROR_NONE` indicates registration was successful. - `OT_ERROR_DULICATED` indicates a name conflict while probing, i.e., name is claimed by another mDNS responder. For caller convenience, the OpenThread mDNS module guarantees that the callback will be invoked after this function returns, even in cases of immediate registration success. The @p aCallback can be `NULL` if caller does not want to be notified of the outcome.
Unregisters a host on mDNS. The fields in @p aHost follow these rules: - The `mHostName` field specifies the host name to unregister (e.g., "myhost"). MUST NOT contain the domain name. - Other fields in @p aHost structure are ignored in an `otMdnsUnregisterHost()` call. If there is no previously registered host with the same name, no action is performed. If there is a previously registered host with the same name, the mDNS module will send "goodbye" announcement for all previously advertised address records.
Registers or updates a service on mDNS. The fields in @p aService follow these rules: - The `mServiceInstance` specifies the service instance label. It is treated as a single DNS name label. It may contain dot `.` character which is allowed in a service instance label. - The `mServiceType` specifies the service type (e.g., "_tst._udp"). It is treated as multiple dot `.` separated labels. It MUST NOT contain the domain name. - The `mHostName` field specifies the host name of the service. MUST NOT contain the domain name. - The `mSubTypeLabels` is an array of strings representing sub-types associated with the service. Each array entry is a sub-type label. The `mSubTypeLabels can be NULL if there is no sub-type. Otherwise, the array length is specified by `mSubTypeLabelsLength`. - The `mTxtData` and `mTxtDataLength` specify the encoded TXT data. The `mTxtData` can be NULL or `mTxtDataLength` can be zero to specify an empty TXT data. In this case mDNS module will use a single zero byte `[ 0 ]` as the TXT data. - The `mPort`, `mWeight`, and `mPriority` specify the service's parameters as specified in DNS SRV record. - The `mTtl` specifies the TTL if non-zero. If zero, the mDNS module will use the default TTL of 120 seconds. - Other fields in @p aService structure are ignored in an `otMdnsRegisterService()` call. This function can be called again for the same `mServiceInstance` and `mServiceType` to update a previously registered service entry, for example, to change the sub-types list, or update any parameter such as port, weight, priority, TTL, or host name. The mDNS module will send announcements for any changed info, e.g., will send "goodbye" announcements for any removed sub-types and announce any newly added sub-types. Regarding the invocation of the @p aCallback, this function behaves in the same way as described in `otMdnsRegisterHost()`.
Unregisters a service on mDNS module. The fields in @p aService follow these rules: - The `mServiceInstance` specifies the service instance label. It is treated as a single DNS name label. It may contain dot `.` character which is allowed in a service instance label. - The `mServiceType` specifies the service type (e.g., "_tst._udp"). It is treated as multiple dot `.` separated labels. It MUST NOT contain the domain name. - Other fields in @p aService structure are ignored in an `otMdnsUnregisterService()` call. If there is no previously registered service with the same name, no action is performed. If there is a previously registered service with the same name, the mDNS module will send "goodbye" announcements for all related records.
Registers or updates a key record on mDNS module. The fields in @p aKey follow these rules: - If the key is associated with a host entry, the `mName` field specifies the host name and the `mServiceType` MUST be NULL. - If the key is associated with a service entry, the `mName` filed specifies the service instance label (always treated as a single label) and the `mServiceType` filed specifies the service type (e.g., "_tst._udp"). In this case the DNS name for key record is `.`. - The `mKeyData` field contains the key record's data with `mKeyDataLength` as its length in byes. - The `mTtl` specifies the TTL if non-zero. If zero, the mDNS module will use the default TTL of 120 seconds. - Other fields in @p aKey structure are ignored in an `otMdnsRegisterKey()` call. This function can be called again for the same name to updated a previously registered key entry, for example, to change the key data or TTL. Regarding the invocation of the @p aCallback, this function behaves in the same way as described in `otMdnsRegisterHost()`.
Unregisters a key record on mDNS. The fields in @p aKey follow these rules: - If the key is associated with a host entry, the `mName` field specifies the host name and the `mServiceType` MUST be NULL. - If the key is associated with a service entry, the `mName` filed specifies the service instance label (always treated as a single label) and the `mServiceType` filed specifies the service type (e.g., "_tst._udp"). In this case the DNS name for key record is `.`. - Other fields in @p aKey structure are ignored in an `otMdnsUnregisterKey()` call. If there is no previously registered key with the same name, no action is performed. If there is a previously registered key with the same name, the mDNS module will send "goodbye" announcements for the key record.
Allocates a new iterator. Requires `OPENTHREAD_CONFIG_MULTICAST_DNS_ENTRY_ITERATION_API_ENABLE`. An allocated iterator must be freed by the caller using `otMdnsFreeIterator()`.
Iterates over the entries in the network info history list.
Iterates over the entries in the unicast address history list.
Iterates over the entries in the multicast address history list.
Iterates over the entries in the RX message history list.
Iterates over the entries in the TX message history list.
Iterates over the entries in the neighbor history list.
Iterates over the entries in the router history list.
Iterates over the entries in the Network Data on mesh prefix entry history list.
Iterates over the entries in the Network Data external route entry history list.
Registers or updates a service on the infrastructure network's DNS-SD module. The @p aService and all its contained information (strings and buffers) are only valid during this call. The platform MUST save a copy of the information if it wants to retain the information after returning from this function. The fields in @p aService follow these rules: - The `mServiceInstance` and `mServiceType` fields specify the service instance label and service type name, respectively. They are never NULL. - The `mHostName` field specifies the host name of the service if it is not NULL. Otherwise, if it is NULL, it indicates that this service is for the device itself and leaves the host name selection to DNS-SD platform. - The `mSubTypeLabels` is an array of strings representing sub-types associated with the service. It can be NULL if there are no sub-types. Otherwise, the array length is specified by `mSubTypeLabelsLength`. - The `mTxtData` and `mTxtDataLength` fields specify the encoded TXT data. - The `mPort`, `mWeight`, and `mPriority` fields specify the service's parameters (as specified in DNS SRV record). - The `mTtl` field specifies the TTL if non-zero. If zero, the platform can choose the TTL to use. - The `mInfraIfIndex` field, if non-zero, specifies the infrastructure network interface index to use for this request. If zero, the platform implementation can decided the interface. When the `mHostName` field in @p aService is not NULL (indicating that this registration is on behalf of another host), the OpenThread stack will ensure that `otPlatDnssdRegisterHost()` is also called for the same host before any service registration requests for the same host. Once the registration request is finished, either successfully or failed, the platform reports the outcome by invoking the @p aCallback and passing the same @p aRequestId in the callback. The @p aCallback function pointer can be NULL, which indicates that the OpenThread stack does not need to be notified of the outcome of the request. If the outcome is determined, the platform implementation may invoke the @p aCallback before returning from this function. The OpenThread stack will ensure to handle such a situation. On success, the @p aCallback MUST be called (if non-NULL) with `OT_ERROR_NONE` as the `aError` input parameter. If the registration causes a name conflict on DNS-SD domain (the service instance name is already claimed by another host), the `OT_ERROR_DUPLICATED` error MUST be used. The platform implementation can use other `OT_ERROR` types for other types of errors. The platform implementation MUST not assume that the @p aRequestId used in subsequent requests will be different. OpenThread may reuse the same request ID again for a different request. The OpenThread stack will not register the same service (with no changes) that was registered successfully earlier. Therefore, the platform implementation does not need to check for duplicate/same service and can assume that calls to this function are either registering a new entry or changing some parameter in a previously registered item. As a result, these changes always need to be synced on the infrastructure DNS-SD module. The OpenThread stack does not require the platform implementation to always invoke the @p aCallback function. The OpenThread stack has its own mechanism to time out an aged request with no response. This relaxes the requirement for platform implementations.
Unregisters a service on the infrastructure network's DNS-SD module. The @p aService and all its contained information (strings and buffers) are only valid during this call. The platform MUST save a copy of the information if it wants to retain the information after returning from this function. The fields in @p aService follow these rules: - The `mServiceInstance` and `mServiceType` fields specify the service instance label and service type name, respectively. They are never NULL. - The `mHostName` field specifies the host name of the service if it is not NULL. Otherwise, if it is NULL, it indicates that this service is for the device itself and leaves the host name selection to DNS-SD platform. - The `mInfraIfIndex` field, if non-zero, specifies the infrastructure network interface index to use for this request. If zero, the platform implementation can decided the interface. - The rest of the fields in @p aService structure MUST be ignored in `otPlatDnssdUnregisterService()` call and may be set to zero by the OpenThread stack. Regarding the invocation of the @p aCallback and the reuse of the @p aRequestId, this function follows the same rules as described in `otPlatDnssdRegisterService()`. The OpenThread stack may request the unregistration of a service that was not previously registered, and the platform implementation MUST handle this case. In such a case, the platform can use either `OT_ERROR_NOT_FOUND` to indicate that there was no such registration, or `OT_ERROR_NONE` when invoking the @p aCallback function. The OpenThread stack will handle either case correctly.
Registers or updates a host on the infrastructure network's DNS-SD module. The @p aHost and all its contained information (strings and arrays) are only valid during this call. The platform MUST save a copy of the information if it wants to retain the information after returning from this function. The fields in @p aHost follow these rules: - The `mHostName` field specifies the host name to register. It is never NULL. - The `mAddresses` field is an array of IPv6 addresses to register with the host. `mAddressesLength` field provides the number of entries in `mAddresses` array. The platform implementation MUST not filter or remove any of addresses in the list. The OpenThread stack will already ensure that the given addresses are externally reachable. For example, when registering host from an SRP registration, link-local or mesh-local addresses associated with the host which are intended for use within Thread mesh are not included in `mAddresses` array passed to this API. The `mAddresses` array can be empty with zero `mAddressesLength`. In such a case, the platform MUST stop advertising any addresses for this host name on the infrastructure DNS-SD. - The `mTtl` field specifies the TTL if non-zero. If zero, the platform can choose the TTL to use. - The `mInfraIfIndex` field, if non-zero, specifies the infrastructure network interface index to use for this request. If zero, the platform implementation can decided the interface. Regarding the invocation of the @p aCallback and the reuse of the @p aRequestId, this function follows the same rules as described in `otPlatDnssdRegisterService()`. The OpenThread stack will not register the same host (with no changes) that was registered successfully earlier. Therefore, the platform implementation does not need to check for duplicate/same host and can assume that calls to this function are either registering a new entry or changing some parameter in a previously registered item. As a result, these changes always need to be synced on the infrastructure DNS-SD module.
Unregisters a host on the infrastructure network's DNS-SD module. The @p aHost and all its contained information (strings and arrays) are only valid during this call. The platform MUST save a copy of the information if it wants to retain the information after returning from this function. The fields in @p aHost follow these rules: - The `mHostName` field specifies the host name to unregister. It is never NULL. - The `mInfraIfIndex` field, if non-zero, specifies the infrastructure network interface index to use for this request. If zero, the platform implementation can decided the interface. - The rest of the fields in @p aHost structure MUST be ignored in `otPlatDnssdUnregisterHost()` call and may be set to zero by the OpenThread stack. Regarding the invocation of the @p aCallback and the reuse of the @p aRequestId, this function follows the same rules as described in `otPlatDnssdRegisterService()`. The OpenThread stack may request the unregistration of a host that was not previously registered, and the platform implementation MUST handle this case. In such a case, the platform can use either `OT_ERROR_NOT_FOUND` to indicate that there was no such registration, or `OT_ERROR_NONE` when invoking the @p aCallback function. OpenThread stack will handle either case correctly. When unregistering a host, the OpenThread stack will also unregister any previously registered services associated with the same host (by calling `otPlatDnssdUnregisterService()`). However, the platform implementation MAY assume that unregistering a host also unregisters all its associated services.
Registers or updates a key record on the infrastructure network's DNS-SD module. The @p aKey and all its contained information (strings and arrays) are only valid during this call. The platform MUST save a copy of the information if it wants to retain the information after returning from this function. The fields in @p aKey follow these rules: - If the key is associated with a host, `mName` field specifies the host name and `mServiceType` will be NULL. - If the key is associated with a service, `mName` field specifies the service instance label and `mServiceType` field specifies the service type. In this case the DNS name for key record is `{mName}.{mServiceTye}`. - The `mKeyData` field contains the key record's data with `mKeyDataLength` as its length in byes. It is never NULL. - The `mClass` fields specifies the resource record class to use when registering key record. - The `mTtl` field specifies the TTL if non-zero. If zero, the platform can choose the TTL to use. - The `mInfraIfIndex` field, if non-zero, specifies the infrastructure network interface index to use for this request. If zero, the platform implementation can decided the interface. Regarding the invocation of the @p aCallback and the reuse of the @p aRequestId, this function follows the same rules as described in `otPlatDnssdRegisterService()`. The OpenThread stack will not register the same key (with no changes) that was registered successfully earlier. Therefore, the platform implementation does not need to check for duplicate/same name and can assume that calls to this function are either registering a new key or changing the key data in a previously registered one. As a result, these changes always need to be synced on the infrastructure DNS-SD module.
Unregisters a key record on the infrastructure network's DNS-SD module. The @p aKey and all its contained information (strings and arrays) are only valid during this call. The platform MUST save a copy of the information if it wants to retain the information after returning from this function. The fields in @p aKey follow these rules: - If the key is associated with a host, `mName` field specifies the host name and `mServiceType` will be NULL. - If the key is associated with a service, `mName` field specifies the service instance label and `mServiceType` field specifies the service type. In this case the DNS name for key record is `{mName}.{mServiceTye}`. - The `mInfraIfIndex` field, if non-zero, specifies the infrastructure network interface index to use for this request. If zero, the platform implementation can decided the interface. - The rest of the fields in @p aKey structure MUST be ignored in `otPlatDnssdUnregisterKey()` call and may be set to zero by the OpenThread stack. Regarding the invocation of the @p aCallback and the reuse of the @p aRequestId, this function follows the same rules as described in `otPlatDnssdRegisterService()`. The OpenThread stack may request the unregistration of a key that was not previously registered, and the platform implementation MUST handle this case. In such a case, the platform can use either `OT_ERROR_NOT_FOUND` to indicate that there was no such registration, or `OT_ERROR_NONE` when invoking the @p aCallback function. the OpenThread stack will handle either case correctly.
Callback to notify state changes of the DNS-SD platform. The OpenThread stack will call `otPlatDnssdGetState()` (from this callback or later) to get the new state. The platform MUST therefore ensure that the returned state from `otPlatDnssdGetState()` is updated before calling this. When the platform signals a state change to `OT_PLAT_DNSSD_STOPPED` using this callback, all active browsers and resolvers are considered to be stopped, and any previously registered host, service, key entries as removed.
Gets the current state of the DNS-SD module. The platform MUST notify the OpenThread stack whenever its state gets changed by invoking `otPlatDnssdStateHandleStateChange()`.
Requests a Thread network channel change. The network switches to the given channel after a specified delay (see #otChannelManagerSetDelay()). The channel change is performed by updating the Pending Operational Dataset. A subsequent call will cancel an ongoing previously requested channel change.
Gets the channel from the last successful call to `otChannelManagerRequestChannelChange()`
Gets the delay (in seconds) used by Channel Manager for a network channel change. Only available on FTDs.
Sets the delay (in seconds) used for a network channel change. Only available on FTDs. The delay should preferably be longer than the maximum data poll interval used by all Sleepy End Devices within the Thread network.
Requests that `ChannelManager` checks and selects a new channel and starts a channel change. Unlike the `otChannelManagerRequestChannelChange()` where the channel must be given as a parameter, this function asks the `ChannelManager` to select a channel by itself (based on collected channel quality info). Once called, the Channel Manager will perform the following 3 steps: 1) `ChannelManager` decides if the channel change would be helpful. This check can be skipped if `aSkipQualityCheck` is set to true (forcing a channel selection to happen and skipping the quality check). This step uses the collected link quality metrics on the device (such as CCA failure rate, frame and message error rates per neighbor, etc.) to determine if the current channel quality is at the level that justifies a channel change. 2) If the first step passes, then `ChannelManager` selects a potentially better channel. It uses the collected channel quality data by `ChannelMonitor` module. The supported and favored channels are used at this step. (see `otChannelManagerSetSupportedChannels()` and `otChannelManagerSetFavoredChannels()`). 3) If the newly selected channel is different from the current channel, `ChannelManager` requests/starts the channel change process (internally invoking a `RequestChannelChange()`).
Requests that `ChannelManager` checks and selects a new CSL channel and starts a CSL channel change. Only available with `OPENTHREAD_CONFIG_MAC_CSL_RECEIVER_ENABLE && OPENTHREAD_CONFIG_CHANNEL_MANAGER_CSL_CHANNEL_SELECT_ENABLE`. This function asks the `ChannelManager` to select a channel by itself (based on collected channel quality info). Once called, the Channel Manager will perform the following 3 steps: 1) `ChannelManager` decides if the CSL channel change would be helpful. This check can be skipped if `aSkipQualityCheck` is set to true (forcing a CSL channel selection to happen and skipping the quality check). This step uses the collected link quality metrics on the device (such as CCA failure rate, frame and message error rates per neighbor, etc.) to determine if the current channel quality is at the level that justifies a CSL channel change. 2) If the first step passes, then `ChannelManager` selects a potentially better CSL channel. It uses the collected channel quality data by `ChannelMonitor` module. The supported and favored channels are used at this step. (see `otChannelManagerSetSupportedChannels()` and `otChannelManagerSetFavoredChannels()`). 3) If the newly selected CSL channel is different from the current CSL channel, `ChannelManager` starts the CSL channel change process.
Enables or disables the auto-channel-selection functionality for network channel. When enabled, `ChannelManager` will periodically invoke a `RequestChannelSelect(false)`. The period interval can be set by `otChannelManagerSetAutoChannelSelectionInterval()`.
Indicates whether the auto-channel-selection functionality for a network channel is enabled or not.
Enables or disables the auto-channel-selection functionality for a CSL channel. Only available with `OPENTHREAD_CONFIG_MAC_CSL_RECEIVER_ENABLE && OPENTHREAD_CONFIG_CHANNEL_MANAGER_CSL_CHANNEL_SELECT_ENABLE`. When enabled, `ChannelManager` will periodically invoke a `otChannelManagerRequestCslChannelSelect()`. The period interval can be set by `otChannelManagerSetAutoChannelSelectionInterval()`.
Indicates whether the auto-csl-channel-selection functionality is enabled or not. Only available with `OPENTHREAD_CONFIG_MAC_CSL_RECEIVER_ENABLE && OPENTHREAD_CONFIG_CHANNEL_MANAGER_CSL_CHANNEL_SELECT_ENABLE`.
Sets the period interval (in seconds) used by auto-channel-selection functionality.
Gets the period interval (in seconds) used by auto-channel-selection functionality.
Gets the supported channel mask.
Sets the supported channel mask.
Gets the favored channel mask.
Sets the favored channel mask.
Gets the CCA failure rate threshold.
Sets the CCA failure rate threshold.
Enables or disables the Channel Monitoring operation. Once operation starts, any previously collected data is cleared. However, after operation is disabled, the previous collected data is still valid and can be read.
Indicates whether the Channel Monitoring operation is enabled and running.
Get channel monitoring sample interval in milliseconds.
Get channel monitoring RSSI threshold in dBm.
Get channel monitoring averaging sample window length (number of samples).
Get channel monitoring total number of RSSI samples (per channel). The count indicates total number samples per channel by channel monitoring module since its start (since Thread network interface was enabled).
Gets the current channel occupancy for a given channel. The channel occupancy value represents the average rate/percentage of RSSI samples that were above RSSI threshold ("bad" RSSI samples). For the first "sample window" samples, the average is maintained as the actual percentage (i.e., ratio of number of "bad" samples by total number of samples). After "window" samples, the averager uses an exponentially weighted moving average. Practically, this means the average is representative of up to `3 * window` last samples with highest weight given to the latest `kSampleWindow` samples. Max value of `0xffff` indicates all RSSI samples were above RSSI threshold (i.e. 100% of samples were "bad").
Get the Thread network time.
Set the time synchronization period. Can only be called while Thread protocols are disabled.
Get the time synchronization period.
Set the time synchronization XTAL accuracy threshold for Router-Capable device. Can only be called while Thread protocols are disabled.
Get the time synchronization XTAL accuracy threshold for Router.
Set a callback to be called when a network time sync or status change occurs This callback shall be called only when the network time offset jumps by OPENTHREAD_CONFIG_TIME_SYNC_JUMP_NOTIF_MIN_US or when the status changes.
Iterates over TXT resolvers. Requires `OPENTHREAD_CONFIG_MULTICAST_DNS_ENTRY_ITERATION_API_ENABLE`. On success, @p aResolver is populated with information about the next resolver. The `mCallback` field is always set to `NULL` as there may be multiple active resolvers with different callbacks. Other pointers within the `otMdnsTxtResolver` structure remain valid until the next call to any OpenThread stack's public or platform API/callback.
Iterates over IPv6 address resolvers. Requires `OPENTHREAD_CONFIG_MULTICAST_DNS_ENTRY_ITERATION_API_ENABLE`. On success, @p aResolver is populated with information about the next resolver. The `mCallback` field is always set to `NULL` as there may be multiple active resolvers with different callbacks. Other pointers within the `otMdnsAddressResolver` structure remain valid until the next call to any OpenThread stack's public or platform API/callback.
Iterates over IPv4 address resolvers. Requires `OPENTHREAD_CONFIG_MULTICAST_DNS_ENTRY_ITERATION_API_ENABLE`. On success, @p aResolver is populated with information about the next resolver. The `mCallback` field is always set to `NULL` as there may be multiple active resolvers with different callbacks. Other pointers within the `otMdnsAddressResolver` structure remain valid until the next call to any OpenThread stack's public or platform API/callback.
Frees a previously allocated iterator. Requires `OPENTHREAD_CONFIG_MULTICAST_DNS_ENTRY_ITERATION_API_ENABLE`.
Iterates over registered host entries. Requires `OPENTHREAD_CONFIG_MULTICAST_DNS_ENTRY_ITERATION_API_ENABLE`. On success, @p aHost is populated with information about the next host. Pointers within the `otMdnsHost` structure (like `mName`) remain valid until the next call to any OpenThread stack's public or platform API/callback.
Iterates over registered service entries. Requires `OPENTHREAD_CONFIG_MULTICAST_DNS_ENTRY_ITERATION_API_ENABLE`. On success, @p aService is populated with information about the next service . Pointers within the `otMdnsService` structure (like `mServiceType`, `mSubTypeLabels`) remain valid until the next call to any OpenThread stack's public or platform API/callback.
Iterates over registered key entries. Requires `OPENTHREAD_CONFIG_MULTICAST_DNS_ENTRY_ITERATION_API_ENABLE`. On success, @p aKey is populated with information about the next key. Pointers within the `otMdnsKey` structure (like `mName`) remain valid until the next call to any OpenThread stack's public or platform API/callback.
Starts a service browser. Initiates a continuous search for the specified `mServiceType` in @p aBrowser. For sub-type services, use `mSubTypeLabel` to define the sub-type, for base services, set `mSubTypeLabel` to NULL. Discovered services are reported through the `mCallback` function in @p aBrowser. Services that have been removed are reported with a TTL value of zero. The callback may be invoked immediately with cached information (if available) and potentially before this function returns. When cached results are used, the reported TTL value will reflect the original TTL from the last received response. Multiple browsers can be started for the same service, provided they use different callback functions.
Stops a service browser. No action is performed if no matching browser with the same service and callback is currently active.
Starts an SRV record resolver. Initiates a continuous SRV record resolver for the specified service in @p aResolver. Discovered information is reported through the `mCallback` function in @p aResolver. When the service is removed it is reported with a TTL value of zero. In this case, `mHostName` may be NULL and other result fields (such as `mPort`) should be ignored. The callback may be invoked immediately with cached information (if available) and potentially before this function returns. When cached result is used, the reported TTL value will reflect the original TTL from the last received response. Multiple resolvers can be started for the same service, provided they use different callback functions.
Stops an SRV record resolver. No action is performed if no matching resolver with the same service and callback is currently active.
Starts a TXT record resolver. Initiates a continuous TXT record resolver for the specified service in @p aResolver. Discovered information is reported through the `mCallback` function in @p aResolver. When the TXT record is removed it is reported with a TTL value of zero. In this case, `mTxtData` may be NULL, and other result fields (such as `mTxtDataLength`) should be ignored. The callback may be invoked immediately with cached information (if available) and potentially before this function returns. When cached result is used, the reported TTL value will reflect the original TTL from the last received response. Multiple resolvers can be started for the same service, provided they use different callback functions.
Stops a TXT record resolver. No action is performed if no matching resolver with the same service and callback is currently active.
Starts an IPv6 address resolver. Initiates a continuous IPv6 address resolver for the specified host name in @p aResolver. Discovered addresses are reported through the `mCallback` function in @p aResolver. The callback is invoked whenever addresses are added or removed, providing an updated list. If all addresses are removed, the callback is invoked with an empty list (`mAddresses` will be NULL, and `mAddressesLength` will be zero). The callback may be invoked immediately with cached information (if available) and potentially before this function returns. When cached result is used, the reported TTL values will reflect the original TTL from the last received response. Multiple resolvers can be started for the same host name, provided they use different callback functions.
Stops an IPv6 address resolver. No action is performed if no matching resolver with the same host name and callback is currently active.
Starts an IPv4 address resolver. Initiates a continuous IPv4 address resolver for the specified host name in @p aResolver. Discovered addresses are reported through the `mCallback` function in @p aResolver. The IPv4 addresses are represented using the IPv4-mapped IPv6 address format in `mAddresses` array. The callback is invoked whenever addresses are added or removed, providing an updated list. If all addresses are removed, the callback is invoked with an empty list (`mAddresses` will be NULL, and `mAddressesLength` will be zero). The callback may be invoked immediately with cached information (if available) and potentially before this function returns. When cached result is used, the reported TTL values will reflect the original TTL from the last received response. Multiple resolvers can be started for the same host name, provided they use different callback functions.
Stops an IPv4 address resolver. No action is performed if no matching resolver with the same host name and callback is currently active.
Iterates over browsers. Requires `OPENTHREAD_CONFIG_MULTICAST_DNS_ENTRY_ITERATION_API_ENABLE`. On success, @p aBrowser is populated with information about the next browser. The `mCallback` field is always set to `NULL` as there may be multiple active browsers with different callbacks. Other pointers within the `otMdnsBrowser` structure remain valid until the next call to any OpenThread stack's public or platform API/callback.
Iterates over SRV resolvers. Requires `OPENTHREAD_CONFIG_MULTICAST_DNS_ENTRY_ITERATION_API_ENABLE`. On success, @p aResolver is populated with information about the next resolver. The `mCallback` field is always set to `NULL` as there may be multiple active resolvers with different callbacks. Other pointers within the `otMdnsSrvResolver` structure remain valid until the next call to any OpenThread stack's public or platform API/callback.
Starts a service browser. Initiates a continuous search for the specified `mServiceType` in @p aBrowser. For sub-type services, `mSubTypeLabel` specifies the sub-type, for base services, `mSubTypeLabel` is set to NULL. Discovered services should be reported through the `mCallback` function in @p aBrowser. Services that have been removed are reported with a TTL value of zero. The callback may be invoked immediately with cached information (if available) and potentially before this function returns. When cached results are used, the reported TTL value should reflect the original TTL from the last received response. Multiple browsers can be started for the same service, provided they use different callback functions. The @p aBrowser and all its contained information (strings) are only valid during this call. The platform MUST save a copy of the information if it wants to retain the information after returning from this function.
Stops a service browser. No action is performed if no matching browser with the same service and callback is currently active. The @p aBrowser and all its contained information (strings) are only valid during this call. The platform MUST save a copy of the information if it wants to retain the information after returning from this function.
Starts an SRV record resolver. Initiates a continuous SRV record resolver for the specified service in @p aResolver. Discovered information should be reported through the `mCallback` function in @p aResolver. When the service is removed it is reported with a TTL value of zero. In this case, `mHostName` may be NULL and other result fields (such as `mPort`) will be ignored by the OpenThread stack. The callback may be invoked immediately with cached information (if available) and potentially before this function returns. When cached result is used, the reported TTL value should reflect the original TTL from the last received response. Multiple resolvers can be started for the same service, provided they use different callback functions. The @p aResolver and all its contained information (strings) are only valid during this call. The platform MUST save a copy of the information if it wants to retain the information after returning from this function.
Requests an update to Operational Dataset. Available when `OPENTHREAD_CONFIG_DATASET_UPDATER_ENABLE` is enabled. @p aDataset should contain the fields to be updated and their new value. It must not contain Active or Pending Timestamp fields. The Delay field is optional, if not provided a default value (1000 ms) would be used.
Cancels an ongoing (if any) Operational Dataset update request. Available when `OPENTHREAD_CONFIG_DATASET_UPDATER_ENABLE` is enabled.
Indicates whether there is an ongoing Operation Dataset update request. Available when `OPENTHREAD_CONFIG_DATASET_UPDATER_ENABLE` is enabled.
Starts the BLE Secure service. When TLV mode is active, the function @p aReceiveHandler will be called once a complete TLV was received and the message offset points to the TLV value.
Enables the TCAT protocol over BLE Secure.
Stops the BLE Secure server.
@section Bluetooth Low Energy management. Enable the Bluetooth Low Energy radio.
Disable the Bluetooth Low Energy radio. When disabled, the BLE stack will flush event queues and not generate new events. The BLE peripheral is turned off or put into a low power sleep state. Any dynamic memory used by the stack should be released, but static memory may remain reserved.
@section Bluetooth Low Energy GAP. Gets BLE Advertising buffer.
Sets BLE Advertising data.
Starts BLE Advertising procedure. The BLE device shall use undirected advertising with no filter applied. A single BLE Advertising packet must be sent on all advertising channels (37, 38 and 39).
Stops BLE Advertising procedure.
The BLE driver calls this method to notify OpenThread that a BLE Central Device has been connected.
The BLE driver calls this method to notify OpenThread that the BLE Central Device has been disconnected.
Disconnects BLE connection. The BLE device shall use the Remote User Terminated Connection (0x13) reason code when disconnecting from the peer BLE device..
@section Bluetooth Low Energy GATT Common. Reads currently use value of ATT_MTU.
The BLE driver calls this method to notify OpenThread that ATT_MTU has been updated.
@section Bluetooth Low Energy GATT Server. Sends ATT Handle Value Indication.
The BLE driver calls this method to notify OpenThread that an ATT Write Request packet has been received.
Function to retrieve from platform BLE link capabilities.
Indicates whether or not the TLS session is active (connected or connecting).
Indicates whether or not the TLS session is connected.
Indicates whether or not the TCAT agent is enabled.
Indicates whether or not a TCAT command class is authorized.
Sends a secure BLE message. If the return value is OT_ERROR_NONE, OpenThread takes ownership of @p aMessage, and the caller should no longer reference @p aMessage. If the return value is not OT_ERROR_NONE, the caller retains ownership of @p aMessage, including freeing @p aMessage if the message buffer is no longer needed.
Sends a secure BLE data packet.
Sends a secure BLE data packet containing a TCAT Send Application Data TLV.
Gets the Install Code Verify Status during the current session.
Sets the Pre-Shared Key (PSK) and cipher suite TLS_PSK_WITH_AES_128_CCM_8.
Returns the peer x509 certificate base64 encoded.
Returns an attribute value identified by its OID from the subject of the peer x509 certificate. The peer OID is provided in binary format. The attribute length is set if the attribute was successfully read or zero if unsuccessful. The ASN.1 type as is set as defineded in the ITU-T X.690 standard if the attribute was successfully read.
Returns an attribute value for the OID 1.3.6.1.4.1.44970.x from the v3 extensions of the peer x509 certificate, where the last digit x is set to aThreadOidDescriptor. The attribute length is set if the attribute was successfully read or zero if unsuccessful. Requires a connection to be active.
Returns an attribute value for the OID 1.3.6.1.4.1.44970.x from the v3 extensions of the own x509 certificate, where the last digit x is set to aThreadOidDescriptor. The attribute length is set if the attribute was successfully read or zero if unsuccessful. Requires a connection to be active.
Sets the authentication mode for the BLE secure connection. Disable or enable the verification of peer certificate. Must be called before start.
Sets the local device's X509 certificate with corresponding private key for TLS session with TLS_ECDHE_ECDSA_WITH_AES_128_CCM_8.
Sets the trusted top level CAs. It is needed for validating the certificate of the peer. TLS mode "ECDHE ECDSA with AES 128 CCM 8" for secure BLE.
Initializes TLS session with a peer using an already open BLE connection.
Stops the BLE and TLS connection.
Function to retrieve from platform multiradio support of BLE and IEEE.