blob: af2da634deb6b06332a509c79c75b757951586d6 [file] [log] [blame] [view]
<link rel="stylesheet" href="../style.css" />
[TOC]
# fuchsia.lowpan.thread
<div class="fidl-version-div"><span class="fidl-attribute fidl-version">Added: 7</span></div>
## **PROTOCOLS**
## Dataset {#Dataset}
*Defined in [fuchsia.lowpan.thread/dataset.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.lowpan.thread/dataset.fidl;l=51)*
<p>Thread Operational Dataset Protocol.</p>
<p>This protocol can expose PII.</p>
<p>This protocol provides methods related to the management of the
Thread operational dataset in raw TLV form.</p>
### AttachAllNodesTo {#Dataset.AttachAllNodesTo}
<p>Requests that all nodes on the current network attach to the thread
network described by given dataset. Returns the number of milliseconds
until the change takes effect.</p>
<p>Functionally equivalent to <code>ot-br-posix</code>'s <a class='link' href='#AttachAllNodesTo'>AttachAllNodesTo</a><a href="https://github.com/openthread/ot-br-posix/blob/f68c07702bef50f1cc4a153a59b5a3a8331ff43b/src/dbus/server/introspect.xml#L60-L72">4</a>.</p>
<p>If this device is not currently provisioned, then calling this method
is equivalent to calling <a class='link' href='#SetActiveTlvs()'>SetActiveTlvs()</a>.</p>
<p>The transition of all nodes to the new network may take as long as
five minutes. The exact amount of time until the network is
transitioned is returned by this method.</p>
<p>This method returns once the transition has been scheduled successfully.
Any error that prevents the scheduling of this operation from
completing successfully (such as being provided with an incomplete
dataset) will result in the protocol being closed.</p>
<div class="fidl-version-div"><span class="fidl-attribute fidl-version">Added: 8</span></div>
#### Request {#Dataset.AttachAllNodesTo_Request}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>dataset</code></td>
<td>
<code><a class='link' href='#OperationalDatasetTlvs'>OperationalDatasetTlvs</a></code>
</td>
</tr>
</table>
#### Response {#Dataset.AttachAllNodesTo_Response}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>delay_ms</code></td>
<td>
<code>int64</code>
</td>
</tr>
</table>
### GetActiveTlvs {#Dataset.GetActiveTlvs}
<p>Fetches and returns the active Thread operational dataset in raw
TLV form. Functionally equivalent to <a class='link' href='#otDatasetGetActiveTlvs()'>otDatasetGetActiveTlvs()</a><a href="https://openthread.io/reference/group/api-operational-dataset#otdatasetgetactivetlvs">2</a>.</p>
<p>This method returns the active dataset, or nothing in the case that
there is no active operational dataset.</p>
<p>Any error that prevents the operation from completing successfully
will result in the protocol being closed.</p>
#### Request {#Dataset.GetActiveTlvs_Request}
&lt;EMPTY&gt;
#### Response {#Dataset.GetActiveTlvs_Response}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>dataset</code></td>
<td>
<code><a class='link' href='#OperationalDatasetTlvs'>OperationalDatasetTlvs</a></code>
</td>
</tr>
</table>
### SetActiveTlvs {#Dataset.SetActiveTlvs}
<p>Sets the active Thread Operational Dataset in raw TLV form.
Functionally equivalent to <a class='link' href='#otDatasetSetActiveTlvs()'>otDatasetSetActiveTlvs()</a><a href="https://openthread.io/reference/group/api-operational-dataset#otdatasetsetactivetlvs">3</a>.</p>
<p>This method returns once the operation has completed successfully.</p>
<p>Any error that prevents the operation from completing successfully
will result in the protocol being closed.</p>
#### Request {#Dataset.SetActiveTlvs_Request}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>dataset</code></td>
<td>
<code><a class='link' href='#OperationalDatasetTlvs'>OperationalDatasetTlvs</a></code>
</td>
</tr>
</table>
#### Response {#Dataset.SetActiveTlvs_Response}
&lt;EMPTY&gt;
## DatasetConnector {#DatasetConnector}
*Defined in [fuchsia.lowpan.thread/dataset.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.lowpan.thread/dataset.fidl;l=22)*
<p>Protocol for connecting to <a class='link' href='#Dataset'>Dataset</a> on a LoWPAN device.</p>
### Connect {#DatasetConnector.Connect}
<p>Connects to the <a class='link' href='#Dataset'>Dataset</a> protocol on the
named LoWPAN device.</p>
<p>The name of the interface can be learned by calling
<a class='link' href='../fuchsia.lowpan/'>fuchsia.lowpan</a>/<a class='link' href='../fuchsia.lowpan/#Lookup.GetDevices'>Lookup.GetDevices</a>.</p>
<p>If there is an error in processing this request
the given channel is closed and an epitaph code used
to describe the reason for the failure:</p>
<ul>
<li><code>ZX_ERR_INVALID_ARGUMENT</code>: The given interface name
was not formatted correctly or otherwise invalid.</li>
<li><code>ZX_ERR_NOT_FOUND</code>: No interface was found with the
given name.</li>
<li><code>ZX_ERR_NOT_SUPPORTED</code>: The interface exists but
does not support this protocol.</li>
</ul>
#### Request {#DatasetConnector.Connect_Request}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>name</code></td>
<td>
<code><a class='link' href='../fuchsia.lowpan/'>fuchsia.lowpan</a>/<a class='link' href='../fuchsia.lowpan/#InterfaceName'>InterfaceName</a></code>
</td>
</tr>
<tr>
<td><code>server_end</code></td>
<td>
<code>server_end&lt;<a class='link' href='#Dataset'>Dataset</a>&gt;</code>
</td>
</tr>
</table>
## Meshcop {#Meshcop}
*Defined in [fuchsia.lowpan.thread/meshcop.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.lowpan.thread/meshcop.fidl;l=34)*
<p>Methods associated with the Mesh Commissioning Protocol (Meshcop).</p>
### UpdateTxtEntries {#Meshcop.UpdateTxtEntries}
<p>Updates the TXT record information associated with the Meshcop border
agent DNS-SD entry. This allows additional information about the
device to be discoverable on the local network when acting as a
border agent.</p>
<p>Functionally equivalent to <code>ot-br-posix</code>'s
<a class='link' href='#UpdateVendorMeshCopTxtEntries'>UpdateVendorMeshCopTxtEntries</a><a href="https://github.com/openthread/ot-br-posix/blob/0b5c6e1ecb8152ef6cea57c09b8a37a020fc4d6f/src/dbus/server/introspect.xml#L196-L210">1</a>.</p>
<p>Typically, the following keys are updated:</p>
<ul>
<li><code>vn</code>: Vendor Name</li>
<li><code>mn</code>: Model Name</li>
<li><code>vo</code>: Vendor OUI</li>
<li><code>vd</code>/<code>vcd</code>: Vendor-specific Data</li>
</ul>
<p>See table 8-4 in section 8.4.1.1.2 of the Thread 1.2 specification for
a detailed explanation of all the keys and their values.</p>
<p>Any error that prevents the operation from completing successfully
(such as being provided with invalid keys) will result in the
protocol being closed.</p>
#### Request {#Meshcop.UpdateTxtEntries_Request}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>txt_entries</code></td>
<td>
<code>vector&lt;<a class='link' href='#TxtEntries'>TxtEntries</a>&gt;[32]</code>
</td>
</tr>
</table>
#### Response {#Meshcop.UpdateTxtEntries_Response}
&lt;EMPTY&gt;
## MeshcopConnector {#MeshcopConnector}
*Defined in [fuchsia.lowpan.thread/meshcop.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.lowpan.thread/meshcop.fidl;l=10)*
<p>Protocol for connecting to <a class='link' href='#Meshcop'>Meshcop</a> on a LoWPAN device.</p>
### Connect {#MeshcopConnector.Connect}
<p>Connects to the <a class='link' href='#Meshcop'>Meshcop</a> protocol on the
named LoWPAN interface.</p>
<p>The name of the interface can be learned by calling
<a class='link' href='../fuchsia.lowpan/'>fuchsia.lowpan</a>/<a class='link' href='../fuchsia.lowpan/#Lookup.GetDevices'>Lookup.GetDevices</a>.</p>
<p>If there is an error in processing this request
the given channel is closed and an epitaph code used
to describe the reason for the failure:</p>
<ul>
<li><code>ZX_ERR_INVALID_ARGUMENT</code>: The given interface name
was not formatted correctly or otherwise invalid.</li>
<li><code>ZX_ERR_NOT_FOUND</code>: No interface was found with the
given name.</li>
<li><code>ZX_ERR_NOT_SUPPORTED</code>: The interface exists but
does not support this protocol.</li>
</ul>
#### Request {#MeshcopConnector.Connect_Request}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>name</code></td>
<td>
<code><a class='link' href='../fuchsia.lowpan/'>fuchsia.lowpan</a>/<a class='link' href='../fuchsia.lowpan/#InterfaceName'>InterfaceName</a></code>
</td>
</tr>
<tr>
<td><code>server_end</code></td>
<td>
<code>server_end&lt;<a class='link' href='#Meshcop'>Meshcop</a>&gt;</code>
</td>
</tr>
</table>
## **STRUCTS**
### TxtEntries {#TxtEntries data-text="TxtEntries"}
*Defined in [fuchsia.lowpan.thread/meshcop.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.lowpan.thread/meshcop.fidl;l=59)*
<table>
<tr><th>Field</th><th>Type</th><th>Description</th><th>Default</th></tr>
<tr id="TxtEntries.key">
<td><code>key</code></td>
<td>
<code>string[254]</code>
</td>
<td><p>The key string for this TXT entry.</p>
<p>Must not contain the character <code>=</code>.
Maximum theoretical length is 254 bytes.</p>
</td>
<td>No default</td>
</tr>
<tr id="TxtEntries.value">
<td><code>value</code></td>
<td>
<code>vector&lt;uint8&gt;[253]</code>
</td>
<td><p>The binary value associated with this key.</p>
<p>Maximum theoretical length is 253 bytes, which is two bytes less
than the TXT record maximum length to account for a single-byte
key and key/value separator byte.</p>
</td>
<td>No default</td>
</tr>
</table>
## **CONSTANTS**
<table>
<tr><th>Name</th><th>Value</th><th>Type</th><th>Description</th></tr>
<tr id="MAX_DATASET_TLV_LEN">
<td><a href="https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.lowpan.thread/dataset.fidl;l=9">MAX_DATASET_TLV_LEN</a></td>
<td>
<code>254</code>
</td>
<td><code>uint8</code></td>
<td></td>
</tr>
</table>
## **TYPE ALIASES**
<table>
<tr><th>Name</th><th>Value</th><th>Description</th></tr>
<tr id="OperationalDatasetTlvs">
<td><a href="https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.lowpan.thread/dataset.fidl;l=18">OperationalDatasetTlvs</a></td>
<td>
<code>vector</code>[<code><a class='link' href='#MAX_DATASET_TLV_LEN'>MAX_DATASET_TLV_LEN</a></code>]</td>
<td><p>Datatype for containing a Thread dataset in raw TLV form.
Functionally equivalent to type <a class='link' href='#otOperationalDatasetTlvs'>otOperationalDatasetTlvs</a><a href="https://openthread.io/reference/struct/ot-operational-dataset-tlvs#structot_operational_dataset_tlvs">1</a>.</p>
<p>The details of the Thread TLV format are documented in the
<a href="https://www.threadgroup.org/ThreadSpec">Thread Specification</a>.</p>
</td>
</tr>
</table>