blob: 9d14b2a9e0c859feeac257c938c1c647390a102a [file] [log] [blame] [view]
<link rel="stylesheet" href="../style.css" />
[TOC]
# fuchsia.lowpan.device
<p><b>Added:7</b></p>
## **PROTOCOLS**
## Counters {#Counters}
*Defined in [fuchsia.lowpan.device/counters.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.lowpan.device/counters.fidl;l=34)*
### Get {#Counters.Get}
<p>Returns a snapshot of the counters without resetting the counters.</p>
#### Request {#Counters.Get_Request}
&lt;EMPTY&gt;
#### Response {#Counters.Get_Response}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>counters</code></td>
<td>
<code><a class='link' href='#AllCounters'>AllCounters</a></code>
</td>
</tr>
</table>
### Reset {#Counters.Reset}
<p>Resets all of the counters to zero returning the counter values
immediately prior.</p>
#### Request {#Counters.Reset_Request}
&lt;EMPTY&gt;
#### Response {#Counters.Reset_Response}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>counters</code></td>
<td>
<code><a class='link' href='#AllCounters'>AllCounters</a></code>
</td>
</tr>
</table>
## CountersConnector {#CountersConnector}
*Defined in [fuchsia.lowpan.device/counters.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.lowpan.device/counters.fidl;l=11)*
<p>Protocol for connecting to <a class='link' href='#Counters'>Counters</a> on a LoWPAN
interface.</p>
### Connect {#CountersConnector.Connect}
<p>Connects to the <a class='link' href='#DeviceCounters'>DeviceCounters</a> protocol on the
named LoWPAN interface.</p>
<p>The name of the interface can be learned by calling
[`fuchsia.lowpan/Lookup.GetDevices].</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 {#CountersConnector.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>request&lt;<a class='link' href='#Counters'>Counters</a>&gt;</code>
</td>
</tr>
</table>
## Device {#Device}
*Defined in [fuchsia.lowpan.device/device.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.lowpan.device/device.fidl;l=293)*
<p>LoWPAN Device Protocol.</p>
<p>This protocol provides clients with a way to control and
monitor the device.</p>
<p>Note that aspects of the device that deal with PII must
be monitored and controlled via the <a class='link' href='#DeviceExtra'>DeviceExtra</a> protocol.</p>
### GetSupportedNetworkTypes {#Device.GetSupportedNetworkTypes}
<p>Returns the types of networks supported by this interface.</p>
<p>LoWPAN devices typically only support a single network type,
but some devices may support more than one. Up to <code>MAX_NETWORK_TYPES</code>
network types may be returned.</p>
#### Request {#Device.GetSupportedNetworkTypes_Request}
&lt;EMPTY&gt;
#### Response {#Device.GetSupportedNetworkTypes_Response}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>network_types</code></td>
<td>
<code>vector&lt;string&gt;[16]</code>
</td>
</tr>
</table>
### LeaveNetwork {#Device.LeaveNetwork}
<p>Bring down the network interface and forget
all non-volatile details about the current network.</p>
<p>Upon completion, all non-volatile and transient state
about the current network is cleared and the interface
will be offline.</p>
<p>Specifically, calling this method will cause the following
observable effects:</p>
<ul>
<li><code>DeviceState.connectivity_state</code> will transition
to <code>State::OFFLINE</code>, assuming it wasn't in that state already.</li>
<li><code>DeviceExtra::WatchIdentity</code> will emit an empty <code>Identity</code>,
assuming it wasn't already empty.</li>
</ul>
<p>If the interface was not previously provisioned,
calling this method does nothing.</p>
#### Request {#Device.LeaveNetwork_Request}
&lt;EMPTY&gt;
#### Response {#Device.LeaveNetwork_Response}
&lt;EMPTY&gt;
### ProvisionNetwork {#Device.ProvisionNetwork}
<p>Provision the interface for the network described by identity
and credential. This is similar to <code>JoinNetwork</code>, except that
(assuming the identity and credential are valid) it will (assuming
all preconditions are met) always succeed, even if there are no
peers nearby.</p>
<p>The following fields of <code>ProvisioningParams</code> MUST
be specified:</p>
<ul>
<li><code>identity.raw_name</code></li>
<li><code>identity.xpanid</code></li>
<li><code>identity.panid</code></li>
<li><code>identity.channel_index</code></li>
<li><code>credential</code></li>
</ul>
<p>If any of the required fields are unspecified, the
channel will be closed with the epitaph <code>ZX_ERR_INVALID_ARGUMENT</code>.</p>
<p>Additionally, if the <code>identity.net_type</code> field is present
and does not match a network type supported by this device,
the channel will also be closed with the epitaph <code>ZX_ERR_NOT_SUPPORTED</code>.</p>
<p>This method returns once the device has been reconfigured successfully.
The resulting change in state can be monitored via <code>WatchDeviceState()</code>.
Any error that prevents the operation from completing successfully
will result in the protocol being closed.</p>
#### Request {#Device.ProvisionNetwork_Request}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>params</code></td>
<td>
<code><a class='link' href='#ProvisioningParams'>ProvisioningParams</a></code>
</td>
</tr>
</table>
#### Response {#Device.ProvisionNetwork_Response}
&lt;EMPTY&gt;
### SetActive {#Device.SetActive}
<p>Activate (&quot;bring-up&quot;) or deactivate (&quot;shut-down&quot;) the
network interface.</p>
<p>Note that simply setting this to <code>true</code> does not mean that
the network interface will necessarily become online and usable,
see the <code>connectivity_state</code> field of the <a class='link' href='#DeviceState'>DeviceState</a> table for
more information.</p>
<p>This method returns once the operation has completed successfully.
The resulting change in state can be monitored via <code>WatchDeviceState()</code>.
Any error that prevents the operation from completing successfully
will result in the protocol being closed.</p>
#### Request {#Device.SetActive_Request}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>active</code></td>
<td>
<code>bool</code>
</td>
</tr>
</table>
#### Response {#Device.SetActive_Response}
&lt;EMPTY&gt;
### WatchDeviceState {#Device.WatchDeviceState}
<p>Observes changes to the <a class='link' href='#DeviceState'>DeviceState</a>.</p>
<p>First call always returns a snapshot of the current state.
Subsequent calls will block until the state has changed
and returns the delta against the device's internal state.</p>
<p>Changes are not queued. The returned value always represents
the latest and most accurate state values, even if several changes
had happened in-between calls.</p>
#### Request {#Device.WatchDeviceState_Request}
&lt;EMPTY&gt;
#### Response {#Device.WatchDeviceState_Response}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>device_combined_state</code></td>
<td>
<code><a class='link' href='#DeviceState'>DeviceState</a></code>
</td>
</tr>
</table>
## DeviceConnector {#DeviceConnector}
*Defined in [fuchsia.lowpan.device/device.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.lowpan.device/device.fidl;l=263)*
<p>Protocol for connecting to <a class='link' href='#Device'>Device</a> on a LoWPAN
interface.</p>
### Connect {#DeviceConnector.Connect}
<p>Connects to the <a class='link' href='#Device'>Device</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 {#DeviceConnector.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>request&lt;<a class='link' href='#Device'>Device</a>&gt;</code>
</td>
</tr>
</table>
## DeviceExtra {#DeviceExtra}
*Defined in [fuchsia.lowpan.device/device.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.lowpan.device/device.fidl;l=413)*
<p>LoWPAN Device &quot;Extra&quot; Protocol.</p>
<p>This protocol provides clients with a way to control and
monitor aspects of the LoWPAN device that can, either
directly or indirectly, leak PII or cryptographic keys.</p>
### GetCredential {#DeviceExtra.GetCredential}
<p>Fetches the current credential.</p>
<p>The returned credential will have originated from a previous call
to <code>ProvisionNetwork</code>, <code>JoinNetwork</code>, or <code>FormNetwork</code>. If the
device is not provisioned (for example, by calling <code>LeaveNetwork()</code>)
then this method returns nothing.</p>
#### Request {#DeviceExtra.GetCredential_Request}
&lt;EMPTY&gt;
#### Response {#DeviceExtra.GetCredential_Response}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>credential</code></td>
<td>
<code><a class='link' href='#Credential'>Credential</a>?</code>
</td>
</tr>
</table>
### WatchIdentity {#DeviceExtra.WatchIdentity}
<p>Observes changes to the current network identity.</p>
<p>First call always returns a snapshot of the current identity.
Subsequent calls will block until the identity has changed,
upon which the entire updated identity is returned.</p>
<p>If there is no identity currently associated with the
device, then the returned identity will be empty.</p>
<p>Changes are not queued. The returned identity always represents
the latest and most accurate value, even if several changes
had happened in-between calls.</p>
<p>Note that the changes are NOT incremental: whenever there
is a change, the entire current LoWPAN identity is returned.</p>
<p>The value of the identity can be changed by any of the
following calls:</p>
<ul>
<li><code>Device.ProvisionNetwork()</code></li>
<li><code>Device.LeaveNetwork()</code></li>
<li><code>DeviceExtra.JoinNetwork()</code></li>
<li><code>DeviceExtra.FormNetwork()</code></li>
</ul>
#### Request {#DeviceExtra.WatchIdentity_Request}
&lt;EMPTY&gt;
#### Response {#DeviceExtra.WatchIdentity_Response}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>identity</code></td>
<td>
<code><a class='link' href='#Identity'>Identity</a></code>
</td>
</tr>
</table>
## DeviceExtraConnector {#DeviceExtraConnector}
*Defined in [fuchsia.lowpan.device/device.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.lowpan.device/device.fidl;l=385)*
<p>Protocol for connecting to <a class='link' href='#DeviceExtra'>DeviceExtra</a> on a LoWPAN
interface.</p>
### Connect {#DeviceExtraConnector.Connect}
<p>Connects to the <a class='link' href='#DeviceExtra'>DeviceExtra</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 {#DeviceExtraConnector.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>request&lt;<a class='link' href='#DeviceExtra'>DeviceExtra</a>&gt;</code>
</td>
</tr>
</table>
## EnergyScan {#EnergyScan}
*Defined in [fuchsia.lowpan.device/energy_scanner.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.lowpan.device/energy_scanner.fidl;l=86)*
### StartEnergyScan {#EnergyScan.StartEnergyScan}
<p>Starts an energy scan operation.</p>
<p>This can be used for surveying the spectrum to identify channels
that should be avoided.</p>
<p>The scan operation may be cancelled by closing the stream protocol.</p>
<p>If a scan is started while another scan is in progress,
the previous scan is allowed to complete before
the new scan executes and starts returning results.</p>
<p>All scans should be expected to completely occupy the
LoWPAN device while it is in progress, preventing other operations
from completing until the scan has completed. Additionally, all
network packets should be expected to be dropped while a scan is
in progress.</p>
<p>Performing energy scans could be used to profile the spectrum
energy for a location and thus be used to determine or refine coarse
location information.</p>
#### Request {#EnergyScan.StartEnergyScan_Request}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>params</code></td>
<td>
<code><a class='link' href='#EnergyScanParameters'>EnergyScanParameters</a></code>
</td>
</tr>
<tr>
<td><code>stream</code></td>
<td>
<code>request&lt;<a class='link' href='#EnergyScanResultStream'>EnergyScanResultStream</a>&gt;</code>
</td>
</tr>
</table>
## EnergyScanConnector {#EnergyScanConnector}
*Defined in [fuchsia.lowpan.device/energy_scanner.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.lowpan.device/energy_scanner.fidl;l=63)*
<p>Protocol for connecting to <a class='link' href='#EnergyScan'>EnergyScan</a> on a LoWPAN
interface.</p>
### Connect {#EnergyScanConnector.Connect}
<p>Connects to the <a class='link' href='#EnergyScan'>EnergyScan</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 {#EnergyScanConnector.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>request&lt;<a class='link' href='#EnergyScan'>EnergyScan</a>&gt;</code>
</td>
</tr>
</table>
## EnergyScanResultStream {#EnergyScanResultStream}
*Defined in [fuchsia.lowpan.device/energy_scanner.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.lowpan.device/energy_scanner.fidl;l=51)*
<p>Protocol for returning the results of an energy scan operation.</p>
<p>Closing the protocol will cancel the associated scan operation.</p>
### Next {#EnergyScanResultStream.Next}
<p>Called to fetch the next set of energy scan results.</p>
<p>The last set will have zero items and the protocol will be closed.</p>
#### Request {#EnergyScanResultStream.Next_Request}
&lt;EMPTY&gt;
#### Response {#EnergyScanResultStream.Next_Response}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>results</code></td>
<td>
<code>vector&lt;<a class='link' href='#EnergyScanResult'>EnergyScanResult</a>&gt;[32]</code>
</td>
</tr>
</table>
## **STRUCTS**
### ProvisioningParams {#ProvisioningParams data-text="ProvisioningParams"}
*Defined in [fuchsia.lowpan.device/provisioning_params.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.lowpan.device/provisioning_params.fidl;l=6)*
<table>
<tr><th>Field</th><th>Type</th><th>Description</th><th>Default</th></tr>
<tr id="ProvisioningParams.identity">
<td><code>identity</code></td>
<td>
<code><a class='link' href='#Identity'>Identity</a></code>
</td>
<td><p>The identity of the network.</p>
</td>
<td>No default</td>
</tr>
<tr id="ProvisioningParams.credential">
<td><code>credential</code></td>
<td>
<code><a class='link' href='#Credential'>Credential</a>?</code>
</td>
<td><p>The credential used to authenticate to
the network.</p>
</td>
<td>No default</td>
</tr>
</table>
## **ENUMS**
### ConnectivityState [flexible](/fuchsia-src/reference/fidl/language/language.md#strict-vs-flexible){:.fidl-attribute} {#ConnectivityState data-text="ConnectivityState"}
Type: <code>int32</code>
*Defined in [fuchsia.lowpan.device/device.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.lowpan.device/device.fidl;l=123)*
<p>LoWPAN Connectivity State</p>
<p>This enum describes the level of connectivity being provided
by a device.</p>
<table>
<tr><th>Name</th><th>Value</th><th>Description</th></tr>
<tr id="ConnectivityState.INACTIVE">
<td><h3 id="ConnectivityState.INACTIVE" class="add-link hide-from-toc">INACTIVE</h3></td>
<td><code>1</code></td>
<td><p>Inactive state.</p>
<p>In this state the device is unprovisioned and administratively
disabled (inactive).</p>
<p>This state can always be explicitly entered by calling <code>Leave</code>
followed by <code>SetActive(false)</code>.</p>
</td>
</tr>
<tr id="ConnectivityState.READY">
<td><h3 id="ConnectivityState.READY" class="add-link hide-from-toc">READY</h3></td>
<td><code>2</code></td>
<td><p>Ready state.</p>
<p>In this state the device is provisioned for a network, but is
administratively disabled (inactive).</p>
<p>This state can be directly entered with the following actions
based on the current connectivity state:</p>
<ul>
<li><code>INACTIVE</code>: by calling <code>ProvisionNetwork(...)</code>.</li>
<li><code>ATTACHING</code>, <code>ATTACHED</code>, <code>ISOLATED</code>, <code>COMMISSIONING</code>: by calling <code>SetActive(false)</code>.</li>
</ul>
</td>
</tr>
<tr id="ConnectivityState.OFFLINE">
<td><h3 id="ConnectivityState.OFFLINE" class="add-link hide-from-toc">OFFLINE</h3></td>
<td><code>3</code></td>
<td><p>Offline state.</p>
<p>In this state the device is administratively enabled (active)
but is not provisioned and thus has no network to attach to.</p>
<p>This state can be directly entered with the following actions
based on the current connectivity state:</p>
<ul>
<li><code>INACTIVE</code>: by calling <code>SetActive(true)</code>.</li>
<li><code>ATTACHING</code>, <code>ATTACHED</code>, <code>ISOLATED</code>, <code>COMMISSIONING</code>: by calling <code>Leave()</code>.</li>
</ul>
</td>
</tr>
<tr id="ConnectivityState.ATTACHING">
<td><h3 id="ConnectivityState.ATTACHING" class="add-link hide-from-toc">ATTACHING</h3></td>
<td><code>4</code></td>
<td><p>Attaching state.</p>
<p>In this state the device is administratively enabled
(active) and either provisioned for a network or shortly
about to become provisioned for a network.</p>
<p>The interface enters this state when it starts the process
of trying to find other nodes so that it can attach to any
pre-existing network fragment, or when it is in the process
of calculating the optimal values for unspecified parameters
when forming a new network.</p>
<p>This state can be directly entered with the following actions
based on the current connectivity state:</p>
<ul>
<li><code>READY</code>: by calling <code>SetActive(true)</code></li>
<li><code>OFFLINE</code>, <code>ATTACHING</code>, <code>ATTACHED</code>, <code>ISOLATED</code>, <code>COMMISSIONING</code>:
by calling <code>ProvisionNetwork(...)</code>, <code>FormNetwork(...)</code>, or <code>JoinNetwork(...)</code></li>
</ul>
</td>
</tr>
<tr id="ConnectivityState.ATTACHED">
<td><h3 id="ConnectivityState.ATTACHED" class="add-link hide-from-toc">ATTACHED</h3></td>
<td><code>5</code></td>
<td><p>Attached state.</p>
<p>In this state the device is both administratively enabled
(active) and provisioned for a network. The device is an
active participant on the network and can communicate with
peers.</p>
<p>This state usually implies that peers are available, but that
may not actually be the case due to current network conditions
or privacy-protecting measures.</p>
<p>This state cannot generally be entered directly, rather
the device will enter this state automatically from the
<code>ATTACHING</code> or <code>ISOLATED</code> states once connectivity has been
(re)established.</p>
</td>
</tr>
<tr id="ConnectivityState.ISOLATED">
<td><h3 id="ConnectivityState.ISOLATED" class="add-link hide-from-toc">ISOLATED</h3></td>
<td><code>6</code></td>
<td><p>Isolated state.</p>
<p>In this state the device is both administratively enabled
(active) and provisioned for a network. However, the device
has no connectivity because there are no peers in range on
the provisioned network.</p>
<p>Once peer devices on the same network come into range
the connectivity state will eventually switch back to
<code>ATTACHED</code>, indicating restored connectivity with at least
one peer.</p>
<p>This state cannot generally be entered directly, rather
the device may enter this state automatically from the
<code>ATTACHING</code> or <code>ATTACHED</code> states.</p>
</td>
</tr>
<tr id="ConnectivityState.COMMISSIONING">
<td><h3 id="ConnectivityState.COMMISSIONING" class="add-link hide-from-toc">COMMISSIONING</h3></td>
<td><code>7</code></td>
<td><p>Commissioning state.</p>
<p>Currently unused, but will later be used to
support in-band commissioning. It is usually appropriate
to consider this as a synonym for the <code>ATTACHING</code> state
except that the device remains unprovisioned.</p>
</td>
</tr>
</table>
### Role [flexible](/fuchsia-src/reference/fidl/language/language.md#strict-vs-flexible){:.fidl-attribute} {#Role data-text="Role"}
Type: <code>int32</code>
*Defined in [fuchsia.lowpan.device/device.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.lowpan.device/device.fidl;l=59)*
<p>LoWPAN Role Type.</p>
<p>This type describes the role a device can assume on a network.</p>
<table>
<tr><th>Name</th><th>Value</th><th>Description</th></tr>
<tr id="Role.DETACHED">
<td><h3 id="Role.DETACHED" class="add-link hide-from-toc">DETACHED</h3></td>
<td><code>1</code></td>
<td><p>Detached role. The interface is not
currently participating on the network,
either because it cannot find a parent</p>
</td>
</tr>
<tr id="Role.END_DEVICE">
<td><h3 id="Role.END_DEVICE" class="add-link hide-from-toc">END_DEVICE</h3></td>
<td><code>2</code></td>
<td><p>End-device role. End devices do not route
traffic on behalf of other nodes.</p>
</td>
</tr>
<tr id="Role.ROUTER">
<td><h3 id="Role.ROUTER" class="add-link hide-from-toc">ROUTER</h3></td>
<td><code>3</code></td>
<td><p>Router role. Routers help route traffic
around the mesh network.</p>
<p>Note that this role is independent of the
device being a &quot;border router&quot;.</p>
<p>Not all network types support this role.</p>
</td>
</tr>
<tr id="Role.SLEEPY_END_DEVICE">
<td><h3 id="Role.SLEEPY_END_DEVICE" class="add-link hide-from-toc">SLEEPY_END_DEVICE</h3></td>
<td><code>4</code></td>
<td><p>Sleepy End-Device role.</p>
<p>End devices with this role are nominally asleep,
waking up periodically to check in with their
parent to see if there are packets destined for
them. Such devices are capable of extraordinarily
low power consumption, but packet latency can be
on the order of dozens of seconds(depending on how
the node is configured). Not all network types
support this role.</p>
<p>Not all network types support this role.</p>
</td>
</tr>
<tr id="Role.SLEEPY_ROUTER">
<td><h3 id="Role.SLEEPY_ROUTER" class="add-link hide-from-toc">SLEEPY_ROUTER</h3></td>
<td><code>5</code></td>
<td><p>Sleepy-router role.</p>
<p>Routers with this role are nominally asleep,
waking up periodically to check in with
other routers and their children.</p>
<p>Not all network types support this role.</p>
</td>
</tr>
<tr id="Role.LEADER">
<td><h3 id="Role.LEADER" class="add-link hide-from-toc">LEADER</h3></td>
<td><code>6</code></td>
<td><p>Leader role.</p>
<p>On Thread networks, for each partition/fragment
one router is designated as the &quot;leader&quot;, which
means that it is considered authoritative for
all network data. In most cases this role can be
considered as a synonym to Role::ROUTER.</p>
<p>Not all network types support this role.</p>
</td>
</tr>
<tr id="Role.COORDINATOR">
<td><h3 id="Role.COORDINATOR" class="add-link hide-from-toc">COORDINATOR</h3></td>
<td><code>7</code></td>
<td><p>Coordinator role.</p>
<p>Not all network types support this role.</p>
</td>
</tr>
</table>
## **TABLES**
### AllCounters {#AllCounters data-text="AllCounters"}
*Defined in [fuchsia.lowpan.device/counters.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.lowpan.device/counters.fidl;l=50)*
<p>Describes all counters.</p>
<p>May be empty if no counters are supported.</p>
<table>
<tr><th>Ordinal</th><th>Field</th><th>Type</th><th>Description</th></tr>
<tr id="AllCounters.mac_tx">
<td><h3 id="AllCounters.mac_tx" class="add-link hide-from-toc">1</h3></td>
<td><code>mac_tx</code></td>
<td>
<code><a class='link' href='#MacCounters'>MacCounters</a></code>
</td>
<td><p>MAC Counters for TX</p>
</td>
</tr>
<tr id="AllCounters.mac_rx">
<td><h3 id="AllCounters.mac_rx" class="add-link hide-from-toc">2</h3></td>
<td><code>mac_rx</code></td>
<td>
<code><a class='link' href='#MacCounters'>MacCounters</a></code>
</td>
<td><p>MAC Counters for RX</p>
</td>
</tr>
<tr id="AllCounters.coex_tx">
<td><h3 id="AllCounters.coex_tx" class="add-link hide-from-toc">3</h3></td>
<td><code>coex_tx</code></td>
<td>
<code><a class='link' href='#CoexCounters'>CoexCounters</a></code>
</td>
<td><p>Coex Counters for TX</p>
</td>
</tr>
<tr id="AllCounters.coex_rx">
<td><h3 id="AllCounters.coex_rx" class="add-link hide-from-toc">4</h3></td>
<td><code>coex_rx</code></td>
<td>
<code><a class='link' href='#CoexCounters'>CoexCounters</a></code>
</td>
<td><p>Coex Counters for RX</p>
</td>
</tr>
<tr id="AllCounters.coex_saturated">
<td><h3 id="AllCounters.coex_saturated" class="add-link hide-from-toc">5</h3></td>
<td><code>coex_saturated</code></td>
<td>
<code>bool</code>
</td>
<td><p>Coex stats may be incorrect due to internal counter overflow.</p>
<p>Reset the counters to clear this flag.</p>
</td>
</tr>
</table>
### CoexCounters {#CoexCounters data-text="CoexCounters"}
*Defined in [fuchsia.lowpan.device/counters.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.lowpan.device/counters.fidl;l=171)*
<p>Counters associated with RF Coexistance.</p>
<p>Some counters are only valid for RX or TX. See <a href="https://github.com/openthread/wpantund/blob/4ae4619/third_party/openthread/src/ncp/spinel.h#L1738-L1775">this</a> for more info.</p>
<table>
<tr><th>Ordinal</th><th>Field</th><th>Type</th><th>Description</th></tr>
<tr id="CoexCounters.requests">
<td><h3 id="CoexCounters.requests" class="add-link hide-from-toc">1</h3></td>
<td><code>requests</code></td>
<td>
<code>uint64</code>
</td>
<td><p>The number of requests</p>
</td>
</tr>
<tr id="CoexCounters.grant_immediate">
<td><h3 id="CoexCounters.grant_immediate" class="add-link hide-from-toc">2</h3></td>
<td><code>grant_immediate</code></td>
<td>
<code>uint64</code>
</td>
<td><p>The number of requests while grant was active</p>
</td>
</tr>
<tr id="CoexCounters.grant_wait">
<td><h3 id="CoexCounters.grant_wait" class="add-link hide-from-toc">3</h3></td>
<td><code>grant_wait</code></td>
<td>
<code>uint64</code>
</td>
<td><p>The number of requests while grant was inactive</p>
</td>
</tr>
<tr id="CoexCounters.grant_wait_activated">
<td><h3 id="CoexCounters.grant_wait_activated" class="add-link hide-from-toc">4</h3></td>
<td><code>grant_wait_activated</code></td>
<td>
<code>uint64</code>
</td>
<td><p>The number of requests while grant was inactive that were
ultimately granted</p>
</td>
</tr>
<tr id="CoexCounters.grant_wait_timeout">
<td><h3 id="CoexCounters.grant_wait_timeout" class="add-link hide-from-toc">5</h3></td>
<td><code>grant_wait_timeout</code></td>
<td>
<code>uint64</code>
</td>
<td><p>The number of requests while grant was inactive that timed out</p>
</td>
</tr>
<tr id="CoexCounters.grant_deactivated_during_request">
<td><h3 id="CoexCounters.grant_deactivated_during_request" class="add-link hide-from-toc">6</h3></td>
<td><code>grant_deactivated_during_request</code></td>
<td>
<code>uint64</code>
</td>
<td><p>The number of requests that were in progress when grant was
deactivated</p>
</td>
</tr>
<tr id="CoexCounters.delayed_grant">
<td><h3 id="CoexCounters.delayed_grant" class="add-link hide-from-toc">7</h3></td>
<td><code>delayed_grant</code></td>
<td>
<code>uint64</code>
</td>
<td><p>The number of requests that were not granted within 50µs</p>
</td>
</tr>
<tr id="CoexCounters.avg_delay_request_to_grant_usec">
<td><h3 id="CoexCounters.avg_delay_request_to_grant_usec" class="add-link hide-from-toc">8</h3></td>
<td><code>avg_delay_request_to_grant_usec</code></td>
<td>
<code>uint32</code>
</td>
<td><p>The average time in µsec from request to grant</p>
</td>
</tr>
<tr id="CoexCounters.grant_none">
<td><h3 id="CoexCounters.grant_none" class="add-link hide-from-toc">9</h3></td>
<td><code>grant_none</code></td>
<td>
<code>uint64</code>
</td>
<td><p>The number of requests that completed without receiving grant.</p>
<p>Receive only.</p>
</td>
</tr>
</table>
### DeviceState {#DeviceState data-text="DeviceState"}
*Defined in [fuchsia.lowpan.device/device.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.lowpan.device/device.fidl;l=246)*
<p>Combined State for LoWPAN Devices</p>
<p>Contains the various properties of a LoWPAN device
that define its current operational state.</p>
<p>You will get a snapshot of the current state upon the first
invocation of <code>WatchDeviceState()</code>, after which future
invocations of that method will return deltas.</p>
<table>
<tr><th>Ordinal</th><th>Field</th><th>Type</th><th>Description</th></tr>
<tr id="DeviceState.connectivity_state">
<td><h3 id="DeviceState.connectivity_state" class="add-link hide-from-toc">1</h3></td>
<td><code>connectivity_state</code></td>
<td>
<code><a class='link' href='#ConnectivityState'>ConnectivityState</a></code>
</td>
<td><p>LoWPAN Connectivity State</p>
<p>This field describes the current level of connectivity being
provided by this device.</p>
</td>
</tr>
<tr id="DeviceState.role">
<td><h3 id="DeviceState.role" class="add-link hide-from-toc">2</h3></td>
<td><code>role</code></td>
<td>
<code><a class='link' href='#Role'>Role</a></code>
</td>
<td><p>LoWPAN Role</p>
<p>This field describes the current role this device is taking
on the current network.</p>
</td>
</tr>
</table>
### EnergyScanParameters {#EnergyScanParameters data-text="EnergyScanParameters"}
*Defined in [fuchsia.lowpan.device/energy_scanner.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.lowpan.device/energy_scanner.fidl;l=21)*
<p>Describes the parameters of an energy scan.</p>
<table>
<tr><th>Ordinal</th><th>Field</th><th>Type</th><th>Description</th></tr>
<tr id="EnergyScanParameters.channels">
<td><h3 id="EnergyScanParameters.channels" class="add-link hide-from-toc">1</h3></td>
<td><code>channels</code></td>
<td>
<code>vector&lt;uint16&gt;[200]</code>
</td>
<td><p>Subset of channels to scan.</p>
<p>If unspecified, all channels will be scanned.</p>
</td>
</tr>
<tr id="EnergyScanParameters.dwell_time_ms">
<td><h3 id="EnergyScanParameters.dwell_time_ms" class="add-link hide-from-toc">2</h3></td>
<td><code>dwell_time_ms</code></td>
<td>
<code>uint32</code>
</td>
<td><p>Desired dwell time per-channel for the energy scan,
measured in milliseconds.</p>
<p>Note that firmware limitations may prevent the
exact dwell time from being used. In such cases
an approximation will be used.</p>
<p>Implementations must be able to support dwell times of at least
5000ms (5 seconds). The exact supported dwell-time range is
device/driver dependent.</p>
<p>Setting a value outside of the supported range of
values for this device will result in the value being
clamped to the closest valid value, so setting a value of zero
will always request the smallest energy scan duration the
device is capable of.</p>
<p>If unspecified, a dwell time of approximately 500ms will be used.</p>
</td>
</tr>
</table>
### EnergyScanResult {#EnergyScanResult data-text="EnergyScanResult"}
*Defined in [fuchsia.lowpan.device/energy_scanner.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.lowpan.device/energy_scanner.fidl;l=9)*
<p>Describes the result from one channel of an energy scan.</p>
<table>
<tr><th>Ordinal</th><th>Field</th><th>Type</th><th>Description</th></tr>
<tr id="EnergyScanResult.channel_index">
<td><h3 id="EnergyScanResult.channel_index" class="add-link hide-from-toc">1</h3></td>
<td><code>channel_index</code></td>
<td>
<code><a class='link' href='../fuchsia.lowpan/'>fuchsia.lowpan</a>/<a class='link' href='../fuchsia.lowpan/#ChannelIndex'>ChannelIndex</a></code>
</td>
<td><p>The channel index for this energy scan result.</p>
</td>
</tr>
<tr id="EnergyScanResult.max_rssi">
<td><h3 id="EnergyScanResult.max_rssi" class="add-link hide-from-toc">2</h3></td>
<td><code>max_rssi</code></td>
<td>
<code>int32</code>
</td>
<td><p>The maximum RSSI detected on this channel.</p>
</td>
</tr>
<tr id="EnergyScanResult.min_rssi">
<td><h3 id="EnergyScanResult.min_rssi" class="add-link hide-from-toc">3</h3></td>
<td><code>min_rssi</code></td>
<td>
<code>int32</code>
</td>
<td><p>The minimum RSSI detected on this channel.</p>
</td>
</tr>
</table>
### Identity {#Identity data-text="Identity"}
*Defined in [fuchsia.lowpan.device/device.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.lowpan.device/device.fidl;l=9)*
<table>
<tr><th>Ordinal</th><th>Field</th><th>Type</th><th>Description</th></tr>
<tr id="Identity.raw_name">
<td><h3 id="Identity.raw_name" class="add-link hide-from-toc">1</h3></td>
<td><code>raw_name</code></td>
<td>
<code>vector&lt;uint8&gt;[63]</code>
</td>
<td><p>The raw bytes for the network name.
This is typically a <a href="https://tools.ietf.org/html/rfc3454">StringPrep'd</a> UTF8 encoding.</p>
<p>Note that extra care must be taken when displaying
this value to users, since there are many ways
to make visually similar UTF8 strings that
have differing bytecode representations.</p>
</td>
</tr>
<tr id="Identity.xpanid">
<td><h3 id="Identity.xpanid" class="add-link hide-from-toc">2</h3></td>
<td><code>xpanid</code></td>
<td>
<code>vector&lt;uint8&gt;[8]</code>
</td>
<td><p>Extended PANID.</p>
</td>
</tr>
<tr id="Identity.net_type">
<td><h3 id="Identity.net_type" class="add-link hide-from-toc">3</h3></td>
<td><code>net_type</code></td>
<td>
<code><a class='link' href='#NetworkType'>NetworkType</a></code>
</td>
<td><p>String identifying the type of network.</p>
<p>Well-known protocol ids are associated with
specific string values (like &quot;org.threadgroup.std.thread&quot;
or &quot;org.zigbee.std.zigbee-ip&quot;). For unknown protocol ids,
the string will map to something like
<code>fuchsia.lowpan.net_type.802.15.4.pid.XX</code>, where <code>XX</code> is
the value of the protocol id from a 802.14.5 beacon.
This field is optional when joining, forming, or provisioning.</p>
</td>
</tr>
<tr id="Identity.channel">
<td><h3 id="Identity.channel" class="add-link hide-from-toc">4</h3></td>
<td><code>channel</code></td>
<td>
<code><a class='link' href='../fuchsia.lowpan/'>fuchsia.lowpan</a>/<a class='link' href='../fuchsia.lowpan/#ChannelIndex'>ChannelIndex</a></code>
</td>
<td><p>Channel Index.</p>
</td>
</tr>
<tr id="Identity.panid">
<td><h3 id="Identity.panid" class="add-link hide-from-toc">5</h3></td>
<td><code>panid</code></td>
<td>
<code>uint16</code>
</td>
<td><p>PANID for 802.14.5-based networks (or the equivalent).</p>
</td>
</tr>
<tr id="Identity.mesh_local_prefix">
<td><h3 id="Identity.mesh_local_prefix" class="add-link hide-from-toc">6</h3></td>
<td><code>mesh_local_prefix</code></td>
<td>
<code><a class='link' href='../fuchsia.net/'>fuchsia.net</a>/<a class='link' href='../fuchsia.net/#Ipv6AddressWithPrefix'>Ipv6AddressWithPrefix</a></code>
</td>
<td><p>IPv6 Mesh-local prefix.</p>
<p>This parameter allows you to determine the mesh-local
IPv6 prefix for the current network, or to specify one
when provisioning the interface for a network or forming
a new network.</p>
<p>The prefix length is always 64 bits, so only the upper
64 bits of the value are used: the least significant bits
must be ignored when read and zero when set.</p>
<p>This field is ignored when supplied to <code>JoinNetwork()</code>.</p>
</td>
</tr>
</table>
### MacCounters {#MacCounters data-text="MacCounters"}
*Defined in [fuchsia.lowpan.device/counters.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.lowpan.device/counters.fidl;l=72)*
<p>Counters associated with the MAC layer.</p>
<p>Some counters are only valid for RX or TX.</p>
<table>
<tr><th>Ordinal</th><th>Field</th><th>Type</th><th>Description</th></tr>
<tr id="MacCounters.total">
<td><h3 id="MacCounters.total" class="add-link hide-from-toc">1</h3></td>
<td><code>total</code></td>
<td>
<code>uint32</code>
</td>
<td><p>The total number of frames</p>
</td>
</tr>
<tr id="MacCounters.unicast">
<td><h3 id="MacCounters.unicast" class="add-link hide-from-toc">2</h3></td>
<td><code>unicast</code></td>
<td>
<code>uint32</code>
</td>
<td><p>The total number of unicast frames</p>
</td>
</tr>
<tr id="MacCounters.broadcast">
<td><h3 id="MacCounters.broadcast" class="add-link hide-from-toc">3</h3></td>
<td><code>broadcast</code></td>
<td>
<code>uint32</code>
</td>
<td><p>The total number of broadcast frames</p>
</td>
</tr>
<tr id="MacCounters.ack_requested">
<td><h3 id="MacCounters.ack_requested" class="add-link hide-from-toc">4</h3></td>
<td><code>ack_requested</code></td>
<td>
<code>uint32</code>
</td>
<td><p>The number of frames with ack request</p>
</td>
</tr>
<tr id="MacCounters.acked">
<td><h3 id="MacCounters.acked" class="add-link hide-from-toc">5</h3></td>
<td><code>acked</code></td>
<td>
<code>uint32</code>
</td>
<td><p>The number of frames that were acked</p>
</td>
</tr>
<tr id="MacCounters.no_ack_requested">
<td><h3 id="MacCounters.no_ack_requested" class="add-link hide-from-toc">6</h3></td>
<td><code>no_ack_requested</code></td>
<td>
<code>uint32</code>
</td>
<td><p>The number of frames without ack request</p>
</td>
</tr>
<tr id="MacCounters.data">
<td><h3 id="MacCounters.data" class="add-link hide-from-toc">7</h3></td>
<td><code>data</code></td>
<td>
<code>uint32</code>
</td>
<td><p>The number of data frames</p>
</td>
</tr>
<tr id="MacCounters.data_poll">
<td><h3 id="MacCounters.data_poll" class="add-link hide-from-toc">8</h3></td>
<td><code>data_poll</code></td>
<td>
<code>uint32</code>
</td>
<td><p>The number of data poll frames</p>
</td>
</tr>
<tr id="MacCounters.beacon">
<td><h3 id="MacCounters.beacon" class="add-link hide-from-toc">9</h3></td>
<td><code>beacon</code></td>
<td>
<code>uint32</code>
</td>
<td><p>The number of beacon frames</p>
</td>
</tr>
<tr id="MacCounters.beacon_request">
<td><h3 id="MacCounters.beacon_request" class="add-link hide-from-toc">10</h3></td>
<td><code>beacon_request</code></td>
<td>
<code>uint32</code>
</td>
<td><p>The number of beacon request frames</p>
</td>
</tr>
<tr id="MacCounters.other">
<td><h3 id="MacCounters.other" class="add-link hide-from-toc">11</h3></td>
<td><code>other</code></td>
<td>
<code>uint32</code>
</td>
<td><p>The number of other types of frames</p>
</td>
</tr>
<tr id="MacCounters.address_filtered">
<td><h3 id="MacCounters.address_filtered" class="add-link hide-from-toc">12</h3></td>
<td><code>address_filtered</code></td>
<td>
<code>uint32</code>
</td>
<td><p>The number of frames filtered by address filter (allowlist
or denylist).</p>
</td>
</tr>
<tr id="MacCounters.retries">
<td><h3 id="MacCounters.retries" class="add-link hide-from-toc">13</h3></td>
<td><code>retries</code></td>
<td>
<code>uint32</code>
</td>
<td><p>The number of retransmission attempts.
TX only.</p>
</td>
</tr>
<tr id="MacCounters.direct_max_retry_expiry">
<td><h3 id="MacCounters.direct_max_retry_expiry" class="add-link hide-from-toc">14</h3></td>
<td><code>direct_max_retry_expiry</code></td>
<td>
<code>uint32</code>
</td>
<td><p>The number of expired retransmission retries for direct message.
TX only.</p>
</td>
</tr>
<tr id="MacCounters.indirect_max_retry_expiry">
<td><h3 id="MacCounters.indirect_max_retry_expiry" class="add-link hide-from-toc">15</h3></td>
<td><code>indirect_max_retry_expiry</code></td>
<td>
<code>uint32</code>
</td>
<td><p>The number of expired retransmission retries for indirect message
TX only.</p>
</td>
</tr>
<tr id="MacCounters.dest_addr_filtered">
<td><h3 id="MacCounters.dest_addr_filtered" class="add-link hide-from-toc">16</h3></td>
<td><code>dest_addr_filtered</code></td>
<td>
<code>uint32</code>
</td>
<td><p>The number of received frames filtered by destination check.
RX only.</p>
</td>
</tr>
<tr id="MacCounters.duplicated">
<td><h3 id="MacCounters.duplicated" class="add-link hide-from-toc">17</h3></td>
<td><code>duplicated</code></td>
<td>
<code>uint32</code>
</td>
<td><p>The number of received duplicated frames.
RX only.</p>
</td>
</tr>
<tr id="MacCounters.err_no_frame">
<td><h3 id="MacCounters.err_no_frame" class="add-link hide-from-toc">18</h3></td>
<td><code>err_no_frame</code></td>
<td>
<code>uint32</code>
</td>
<td><p>The number of received frames with no or malformed content.
RX only.</p>
</td>
</tr>
<tr id="MacCounters.err_unknown_neighbor">
<td><h3 id="MacCounters.err_unknown_neighbor" class="add-link hide-from-toc">19</h3></td>
<td><code>err_unknown_neighbor</code></td>
<td>
<code>uint32</code>
</td>
<td><p>The number of received frames from unknown neighbor.
RX only.</p>
</td>
</tr>
<tr id="MacCounters.err_invalid_src_addr">
<td><h3 id="MacCounters.err_invalid_src_addr" class="add-link hide-from-toc">20</h3></td>
<td><code>err_invalid_src_addr</code></td>
<td>
<code>uint32</code>
</td>
<td><p>The number of received frames whose source address is invalid.
RX only.</p>
</td>
</tr>
<tr id="MacCounters.err_sec">
<td><h3 id="MacCounters.err_sec" class="add-link hide-from-toc">21</h3></td>
<td><code>err_sec</code></td>
<td>
<code>uint32</code>
</td>
<td><p>The number of received frames with security error.
RX only.</p>
</td>
</tr>
<tr id="MacCounters.err_fcs">
<td><h3 id="MacCounters.err_fcs" class="add-link hide-from-toc">22</h3></td>
<td><code>err_fcs</code></td>
<td>
<code>uint32</code>
</td>
<td><p>The number of received frames with FCS error.
RX only.</p>
</td>
</tr>
<tr id="MacCounters.err_cca">
<td><h3 id="MacCounters.err_cca" class="add-link hide-from-toc">23</h3></td>
<td><code>err_cca</code></td>
<td>
<code>uint32</code>
</td>
<td><p>The number of CCA failures.
TX only.</p>
</td>
</tr>
<tr id="MacCounters.err_abort">
<td><h3 id="MacCounters.err_abort" class="add-link hide-from-toc">24</h3></td>
<td><code>err_abort</code></td>
<td>
<code>uint32</code>
</td>
<td><p>The number of frame transmission failures due to abort error.
TX only.</p>
</td>
</tr>
<tr id="MacCounters.err_busy_channel">
<td><h3 id="MacCounters.err_busy_channel" class="add-link hide-from-toc">25</h3></td>
<td><code>err_busy_channel</code></td>
<td>
<code>uint32</code>
</td>
<td><p>The number of frames that were dropped due to a busy channel.
TX only.</p>
</td>
</tr>
<tr id="MacCounters.err_other">
<td><h3 id="MacCounters.err_other" class="add-link hide-from-toc">26</h3></td>
<td><code>err_other</code></td>
<td>
<code>uint32</code>
</td>
<td><p>The number of frames that encountered some other error.</p>
</td>
</tr>
</table>
## **UNIONS**
### Credential [flexible](/fuchsia-src/reference/fidl/language/language.md#strict-vs-flexible){:.fidl-attribute} {#Credential data-text="Credential"}
*Defined in [fuchsia.lowpan.device/device.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.lowpan.device/device.fidl;l=227)*
<p>Describes a LoWPAN credential.</p>
<p>Currently only supports a symmetric network key,
but may be extended in the future to support other
types of credentials, such as passwords, PAKE
secrets, or a reference to a certificate/private-key
pair.</p>
<table>
<tr><th>Ordinal</th><th>Variant</th><th>Type</th><th>Description</th></tr>
<tr id="Credential.network_key">
<td><h3 id="Credential.network_key" class="add-link hide-from-toc">1</h3></td>
<td><code>network_key</code></td>
<td>
<code>vector&lt;uint8&gt;[32]</code>
</td>
<td><p>Describes a symmetric key credential.</p>
<p>The size of the symmetric key is defined by the
underlying network technology. For Thread this
is a 16-byte value.</p>
<p>Note that this value is not a password.</p>
</td>
</tr>
</table>
## **CONSTANTS**
<table>
<tr><th>Name</th><th>Value</th><th>Type</th><th>Description</th></tr>
<tr id="MAX_CHANNELS">
<td><a href="https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.lowpan.device/misc.fidl;l=38">MAX_CHANNELS</a></td>
<td>
<code>200</code>
</td>
<td><code>uint16</code></td>
<td><p>Maximum number of channels that can be returned by
<a class='link' href='#Device.GetSupportedChannels'>Device.GetSupportedChannels</a>.</p>
<p>Value was chosen arbitrarily to be large enough to accommodate any
reasonable future use case.</p>
</td>
</tr>
<tr id="MAX_NETWORK_TYPES">
<td><a href="https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.lowpan.device/misc.fidl;l=31">MAX_NETWORK_TYPES</a></td>
<td>
<code>16</code>
</td>
<td><code>uint16</code></td>
<td><p>Maximum number of distinct network types that a LoWPAN
device can support.</p>
<p>The choice of 16 is an arbitrary upper bound. Most devices will only support one,
and maybe one day a device might support two. Sixteen was chosen because it's
large enough to account for any failure of imagination, yet small enough to not
cause system stability issues.</p>
</td>
</tr>
<tr id="MAX_NET_TYPE_LEN">
<td><a href="https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.lowpan.device/misc.fidl;l=10">MAX_NET_TYPE_LEN</a></td>
<td>
<code>64</code>
</td>
<td><code>uint16</code></td>
<td><p>Maximum length of a network type string.</p>
<p>Chosen arbitrarily to be large enough to accommodate any reasonable future
net types.</p>
</td>
</tr>
<tr id="MAX_STREAM_SET_SIZE">
<td><a href="https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.lowpan.device/misc.fidl;l=22">MAX_STREAM_SET_SIZE</a></td>
<td>
<code>32</code>
</td>
<td><code>uint16</code></td>
<td><p>The maximum number of items that can be returned at one
time by a scan stream.</p>
</td>
</tr>
<tr id="NET_TYPE_RAW_6LOWPAN">
<td><a href="https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.lowpan.device/misc.fidl;l=18">NET_TYPE_RAW_6LOWPAN</a></td>
<td><code>fuchsia.lowpan.net_type.6lowpan</code></td>
<td><code>String</code></td>
<td></td>
</tr>
<tr id="NET_TYPE_THREAD_1_X">
<td><a href="https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.lowpan.device/misc.fidl;l=15">NET_TYPE_THREAD_1_X</a></td>
<td><code>org.threadgroup.std.thread.1</code></td>
<td><code>String</code></td>
<td></td>
</tr>
<tr id="NET_TYPE_UNKNOWN_802_15_4_PID">
<td><a href="https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.lowpan.device/misc.fidl;l=17">NET_TYPE_UNKNOWN_802_15_4_PID</a></td>
<td><code>fuchsia.lowpan.net_type.802.15.4.pid</code></td>
<td><code>String</code></td>
<td></td>
</tr>
<tr id="NET_TYPE_ZIGBEE_IP_1_X">
<td><a href="https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.lowpan.device/misc.fidl;l=16">NET_TYPE_ZIGBEE_IP_1_X</a></td>
<td><code>org.zigbee.std.zigbee-ip.1</code></td>
<td><code>String</code></td>
<td></td>
</tr>
</table>
## **TYPE ALIASES**
<table>
<tr><th>Name</th><th>Value</th><th>Description</th></tr>
<tr id="NetworkType">
<td><a href="https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.lowpan.device/misc.fidl;l=13">NetworkType</a></td>
<td>
<code>string</code>[<code><a class='link' href='#MAX_NET_TYPE_LEN'>MAX_NET_TYPE_LEN</a></code>]</td>
<td><p>String describing a network type.</p>
</td>
</tr>
</table>