blob: 1c4d49a6e791692283ceaa303a6a36de05889f24 [file] [log] [blame]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html lang="en" xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head profile="http://www.w3.org/2006/03/hcard http://dublincore.org/documents/2008/08/04/dc-html/">
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii" />
<title>Spinel Host-Controller Protocol</title>
<style type="text/css" title="Xml2Rfc (sans serif)">
/*<![CDATA[*/
a {
text-decoration: none;
}
/* info code from SantaKlauss at http://www.madaboutstyle.com/tooltip2.html */
a.info {
/* This is the key. */
position: relative;
z-index: 24;
text-decoration: none;
}
a.info:hover {
z-index: 25;
color: #FFF; background-color: #900;
}
a.info span { display: none; }
a.info:hover span.info {
/* The span will display just on :hover state. */
display: block;
position: absolute;
font-size: smaller;
top: 2em; left: -5em; width: 15em;
padding: 2px; border: 1px solid #333;
color: #900; background-color: #EEE;
text-align: left;
}
a.smpl {
color: black;
}
a:hover {
text-decoration: underline;
}
a:active {
text-decoration: underline;
}
address {
margin-top: 1em;
margin-left: 2em;
font-style: normal;
}
body {
color: black;
font-family: verdana, helvetica, arial, sans-serif;
font-size: 10pt;
max-width: 55em;
}
cite {
font-style: normal;
}
dd {
margin-right: 2em;
}
dl {
margin-left: 2em;
}
ul.empty {
list-style-type: none;
}
ul.empty li {
margin-top: .5em;
}
dl p {
margin-left: 0em;
}
dt {
margin-top: .5em;
}
h1 {
font-size: 14pt;
line-height: 21pt;
page-break-after: avoid;
}
h1.np {
page-break-before: always;
}
h1 a {
color: #333333;
}
h2 {
font-size: 12pt;
line-height: 15pt;
page-break-after: avoid;
}
h3, h4, h5, h6 {
font-size: 10pt;
page-break-after: avoid;
}
h2 a, h3 a, h4 a, h5 a, h6 a {
color: black;
}
img {
margin-left: 3em;
}
li {
margin-left: 2em;
margin-right: 2em;
}
ol {
margin-left: 2em;
margin-right: 2em;
}
ol p {
margin-left: 0em;
}
p {
margin-left: 2em;
margin-right: 2em;
}
pre {
margin-left: 3em;
background-color: lightyellow;
padding: .25em;
}
pre.text2 {
border-style: dotted;
border-width: 1px;
background-color: #f0f0f0;
width: 69em;
}
pre.inline {
background-color: white;
padding: 0em;
}
pre.text {
border-style: dotted;
border-width: 1px;
background-color: #f8f8f8;
width: 69em;
}
pre.drawing {
border-style: solid;
border-width: 1px;
background-color: #f8f8f8;
padding: 2em;
}
table {
margin-left: 2em;
}
table.tt {
vertical-align: top;
}
table.full {
border-style: outset;
border-width: 1px;
}
table.headers {
border-style: outset;
border-width: 1px;
}
table.tt td {
vertical-align: top;
}
table.full td {
border-style: inset;
border-width: 1px;
}
table.tt th {
vertical-align: top;
}
table.full th {
border-style: inset;
border-width: 1px;
}
table.headers th {
border-style: none none inset none;
border-width: 1px;
}
table.left {
margin-right: auto;
}
table.right {
margin-left: auto;
}
table.center {
margin-left: auto;
margin-right: auto;
}
caption {
caption-side: bottom;
font-weight: bold;
font-size: 9pt;
margin-top: .5em;
}
table.header {
border-spacing: 1px;
width: 95%;
font-size: 10pt;
color: white;
}
td.top {
vertical-align: top;
}
td.topnowrap {
vertical-align: top;
white-space: nowrap;
}
table.header td {
background-color: gray;
width: 50%;
}
table.header a {
color: white;
}
td.reference {
vertical-align: top;
white-space: nowrap;
padding-right: 1em;
}
thead {
display:table-header-group;
}
ul.toc, ul.toc ul {
list-style: none;
margin-left: 1.5em;
margin-right: 0em;
padding-left: 0em;
}
ul.toc li {
line-height: 150%;
font-weight: bold;
font-size: 10pt;
margin-left: 0em;
margin-right: 0em;
}
ul.toc li li {
line-height: normal;
font-weight: normal;
font-size: 9pt;
margin-left: 0em;
margin-right: 0em;
}
li.excluded {
font-size: 0pt;
}
ul p {
margin-left: 0em;
}
.comment {
background-color: yellow;
}
.center {
text-align: center;
}
.error {
color: red;
font-style: italic;
font-weight: bold;
}
.figure {
font-weight: bold;
text-align: center;
font-size: 9pt;
}
.filename {
color: #333333;
font-weight: bold;
font-size: 12pt;
line-height: 21pt;
text-align: center;
}
.fn {
font-weight: bold;
}
.hidden {
display: none;
}
.left {
text-align: left;
}
.right {
text-align: right;
}
.title {
color: #990000;
font-size: 18pt;
line-height: 18pt;
font-weight: bold;
text-align: center;
margin-top: 36pt;
}
.vcardline {
display: block;
}
.warning {
font-size: 14pt;
background-color: yellow;
}
@media print {
.noprint {
display: none;
}
a {
color: black;
text-decoration: none;
}
table.header {
width: 90%;
}
td.header {
width: 50%;
color: black;
background-color: white;
vertical-align: top;
font-size: 12pt;
}
ul.toc a::after {
content: leader('.') target-counter(attr(href), page);
}
ul.ind li li a {
content: target-counter(attr(href), page);
}
.print2col {
column-count: 2;
-moz-column-count: 2;
column-fill: auto;
}
}
@page {
@top-left {
content: "Internet-Draft";
}
@top-right {
content: "December 2010";
}
@top-center {
content: "Abbreviated Title";
}
@bottom-left {
content: "Doe";
}
@bottom-center {
content: "Expires June 2011";
}
@bottom-right {
content: "[Page " counter(page) "]";
}
}
@page:first {
@top-left {
content: normal;
}
@top-right {
content: normal;
}
@top-center {
content: normal;
}
}
/*]]>*/
</style>
<link href="#rfc.toc" rel="Contents"/>
<link href="#rfc.section.1" rel="Chapter" title="1 Introduction"/>
<link href="#rfc.section.1.1" rel="Chapter" title="1.1 About this Draft"/>
<link href="#rfc.section.1.1.1" rel="Chapter" title="1.1.1 Scope"/>
<link href="#rfc.section.1.1.2" rel="Chapter" title="1.1.2 Renumbering"/>
<link href="#rfc.section.2" rel="Chapter" title="2 Frame Format"/>
<link href="#rfc.section.2.1" rel="Chapter" title="2.1 Header Format"/>
<link href="#rfc.section.2.1.1" rel="Chapter" title="2.1.1 FLG: Flag"/>
<link href="#rfc.section.2.1.2" rel="Chapter" title="2.1.2 NLI: Network Link Identifier"/>
<link href="#rfc.section.2.1.3" rel="Chapter" title="2.1.3 TID: Transaction Identifier"/>
<link href="#rfc.section.2.1.4" rel="Chapter" title="2.1.4 Command Identifier (CMD)"/>
<link href="#rfc.section.2.1.5" rel="Chapter" title="2.1.5 Command Payload (Optional)"/>
<link href="#rfc.section.3" rel="Chapter" title="3 Data Packing"/>
<link href="#rfc.section.3.1" rel="Chapter" title="3.1 Primitive Types"/>
<link href="#rfc.section.3.2" rel="Chapter" title="3.2 Packed Unsigned Integer"/>
<link href="#rfc.section.3.3" rel="Chapter" title="3.3 Data Blobs"/>
<link href="#rfc.section.3.4" rel="Chapter" title="3.4 Structured Data"/>
<link href="#rfc.section.3.5" rel="Chapter" title="3.5 Arrays"/>
<link href="#rfc.section.4" rel="Chapter" title="4 Commands"/>
<link href="#rfc.section.4.1" rel="Chapter" title="4.1 CMD 0: (Host-&gt;NCP) CMD_NOOP"/>
<link href="#rfc.section.4.2" rel="Chapter" title="4.2 CMD 1: (Host-&gt;NCP) CMD_RESET"/>
<link href="#rfc.section.4.3" rel="Chapter" title="4.3 CMD 2: (Host-&gt;NCP) CMD_PROP_VALUE_GET"/>
<link href="#rfc.section.4.4" rel="Chapter" title="4.4 CMD 3: (Host-&gt;NCP) CMD_PROP_VALUE_SET"/>
<link href="#rfc.section.4.5" rel="Chapter" title="4.5 CMD 4: (Host-&gt;NCP) CMD_PROP_VALUE_INSERT"/>
<link href="#rfc.section.4.6" rel="Chapter" title="4.6 CMD 5: (Host-&gt;NCP) CMD_PROP_VALUE_REMOVE"/>
<link href="#rfc.section.4.7" rel="Chapter" title="4.7 CMD 6: (NCP-&gt;Host) CMD_PROP_VALUE_IS"/>
<link href="#rfc.section.4.8" rel="Chapter" title="4.8 CMD 7: (NCP-&gt;Host) CMD_PROP_VALUE_INSERTED"/>
<link href="#rfc.section.4.9" rel="Chapter" title="4.9 CMD 8: (NCP-&gt;Host) CMD_PROP_VALUE_REMOVED"/>
<link href="#rfc.section.4.10" rel="Chapter" title="4.10 CMD 18: (Host-&gt;NCP) CMD_PEEK"/>
<link href="#rfc.section.4.11" rel="Chapter" title="4.11 CMD 19: (NCP-&gt;Host) CMD_PEEK_RET"/>
<link href="#rfc.section.4.12" rel="Chapter" title="4.12 CMD 20: (Host-&gt;NCP) CMD_POKE"/>
<link href="#rfc.section.4.13" rel="Chapter" title="4.13 CMD 21: (Host-&gt;NCP) CMD_PROP_VALUE_MULTI_GET"/>
<link href="#rfc.section.4.14" rel="Chapter" title="4.14 CMD 22: (Host-&gt;NCP) CMD_PROP_VALUE_MULTI_SET"/>
<link href="#rfc.section.4.15" rel="Chapter" title="4.15 CMD 23: (NCP-&gt;Host) CMD_PROP_VALUES_ARE"/>
<link href="#rfc.section.5" rel="Chapter" title="5 Properties"/>
<link href="#rfc.section.5.1" rel="Chapter" title="5.1 Property Methods"/>
<link href="#rfc.section.5.2" rel="Chapter" title="5.2 Property Types"/>
<link href="#rfc.section.5.2.1" rel="Chapter" title="5.2.1 Single-Value Properties"/>
<link href="#rfc.section.5.2.2" rel="Chapter" title="5.2.2 Multiple-Value Properties"/>
<link href="#rfc.section.5.2.3" rel="Chapter" title="5.2.3 Stream Properties"/>
<link href="#rfc.section.5.3" rel="Chapter" title="5.3 Property Numbering"/>
<link href="#rfc.section.5.4" rel="Chapter" title="5.4 Property Sections"/>
<link href="#rfc.section.5.5" rel="Chapter" title="5.5 Core Properties"/>
<link href="#rfc.section.5.5.1" rel="Chapter" title="5.5.1 PROP 0: PROP_LAST_STATUS"/>
<link href="#rfc.section.5.5.2" rel="Chapter" title="5.5.2 PROP 1: PROP_PROTOCOL_VERSION"/>
<link href="#rfc.section.5.5.3" rel="Chapter" title="5.5.3 PROP 2: PROP_NCP_VERSION"/>
<link href="#rfc.section.5.5.4" rel="Chapter" title="5.5.4 PROP 3: PROP_INTERFACE_TYPE"/>
<link href="#rfc.section.5.5.5" rel="Chapter" title="5.5.5 PROP 4: PROP_INTERFACE_VENDOR_ID"/>
<link href="#rfc.section.5.5.6" rel="Chapter" title="5.5.6 PROP 5: PROP_CAPS"/>
<link href="#rfc.section.5.5.7" rel="Chapter" title="5.5.7 PROP 6: PROP_INTERFACE_COUNT"/>
<link href="#rfc.section.5.5.8" rel="Chapter" title="5.5.8 PROP 7: PROP_POWER_STATE"/>
<link href="#rfc.section.5.5.9" rel="Chapter" title="5.5.9 PROP 8: PROP_HWADDR"/>
<link href="#rfc.section.5.5.10" rel="Chapter" title="5.5.10 PROP 9: PROP_LOCK"/>
<link href="#rfc.section.5.5.11" rel="Chapter" title="5.5.11 PROP 10: PROP_HOST_POWER_STATE"/>
<link href="#rfc.section.5.5.12" rel="Chapter" title="5.5.12 PROP 4104: PROP_UNSOL_UPDATE_FILTER"/>
<link href="#rfc.section.5.5.13" rel="Chapter" title="5.5.13 PROP 4105: PROP_UNSOL_UPDATE_LIST"/>
<link href="#rfc.section.5.6" rel="Chapter" title="5.6 Stream Properties"/>
<link href="#rfc.section.5.6.1" rel="Chapter" title="5.6.1 PROP 112: PROP_STREAM_DEBUG"/>
<link href="#rfc.section.5.6.2" rel="Chapter" title="5.6.2 PROP 113: PROP_STREAM_RAW"/>
<link href="#rfc.section.5.6.3" rel="Chapter" title="5.6.3 PROP 114: PROP_STREAM_NET"/>
<link href="#rfc.section.5.6.4" rel="Chapter" title="5.6.4 PROP 115: PROP_STREAM_NET_INSECURE"/>
<link href="#rfc.section.5.7" rel="Chapter" title="5.7 PHY Properties"/>
<link href="#rfc.section.5.7.1" rel="Chapter" title="5.7.1 PROP 32: PROP_PHY_ENABLED"/>
<link href="#rfc.section.5.7.2" rel="Chapter" title="5.7.2 PROP 33: PROP_PHY_CHAN"/>
<link href="#rfc.section.5.7.3" rel="Chapter" title="5.7.3 PROP 34: PROP_PHY_CHAN_SUPPORTED"/>
<link href="#rfc.section.5.7.4" rel="Chapter" title="5.7.4 PROP 35: PROP_PHY_FREQ"/>
<link href="#rfc.section.5.7.5" rel="Chapter" title="5.7.5 PROP 36: PROP_PHY_CCA_THRESHOLD"/>
<link href="#rfc.section.5.7.6" rel="Chapter" title="5.7.6 PROP 37: PROP_PHY_TX_POWER"/>
<link href="#rfc.section.5.7.7" rel="Chapter" title="5.7.7 PROP 38: PROP_PHY_RSSI"/>
<link href="#rfc.section.5.7.8" rel="Chapter" title="5.7.8 PROP 39: PROP_PHY_RX_SENSITIVITY"/>
<link href="#rfc.section.5.8" rel="Chapter" title="5.8 MAC Properties"/>
<link href="#rfc.section.5.8.1" rel="Chapter" title="5.8.1 PROP 48: PROP_MAC_SCAN_STATE"/>
<link href="#rfc.section.5.8.2" rel="Chapter" title="5.8.2 PROP 49: PROP_MAC_SCAN_MASK"/>
<link href="#rfc.section.5.8.3" rel="Chapter" title="5.8.3 PROP 50: PROP_MAC_SCAN_PERIOD"/>
<link href="#rfc.section.5.8.4" rel="Chapter" title="5.8.4 PROP 51: PROP_MAC_SCAN_BEACON"/>
<link href="#rfc.section.5.8.5" rel="Chapter" title="5.8.5 PROP 52: PROP_MAC_15_4_LADDR"/>
<link href="#rfc.section.5.8.6" rel="Chapter" title="5.8.6 PROP 53: PROP_MAC_15_4_SADDR"/>
<link href="#rfc.section.5.8.7" rel="Chapter" title="5.8.7 PROP 54: PROP_MAC_15_4_PANID"/>
<link href="#rfc.section.5.8.8" rel="Chapter" title="5.8.8 PROP 55: PROP_MAC_RAW_STREAM_ENABLED"/>
<link href="#rfc.section.5.8.9" rel="Chapter" title="5.8.9 PROP 56: PROP_MAC_PROMISCUOUS_MODE"/>
<link href="#rfc.section.5.8.10" rel="Chapter" title="5.8.10 PROP 57: PROP_MAC_ENERGY_SCAN_RESULT"/>
<link href="#rfc.section.5.8.11" rel="Chapter" title="5.8.11 PROP 4864: PROP_MAC_WHITELIST"/>
<link href="#rfc.section.5.8.12" rel="Chapter" title="5.8.12 PROP 4865: PROP_MAC_WHITELIST_ENABLED"/>
<link href="#rfc.section.5.8.13" rel="Chapter" title="5.8.13 PROP 4867: SPINEL_PROP_MAC_SRC_MATCH_ENABLED"/>
<link href="#rfc.section.5.8.14" rel="Chapter" title="5.8.14 PROP 4868: SPINEL_PROP_MAC_SRC_MATCH_SHORT_ADDRESSES"/>
<link href="#rfc.section.5.8.15" rel="Chapter" title="5.8.15 PROP 4869: SPINEL_PROP_MAC_SRC_MATCH_EXTENDED_ADDRESSES"/>
<link href="#rfc.section.5.8.16" rel="Chapter" title="5.8.16 PROP 4870: PROP_MAC_BLACKLIST"/>
<link href="#rfc.section.5.8.17" rel="Chapter" title="5.8.17 PROP 4871: PROP_MAC_BLACKLIST_ENABLED"/>
<link href="#rfc.section.5.9" rel="Chapter" title="5.9 NET Properties"/>
<link href="#rfc.section.5.9.1" rel="Chapter" title="5.9.1 PROP 64: PROP_NET_SAVED"/>
<link href="#rfc.section.5.9.2" rel="Chapter" title="5.9.2 PROP 65: PROP_NET_IF_UP"/>
<link href="#rfc.section.5.9.3" rel="Chapter" title="5.9.3 PROP 66: PROP_NET_STACK_UP"/>
<link href="#rfc.section.5.9.4" rel="Chapter" title="5.9.4 PROP 67: PROP_NET_ROLE"/>
<link href="#rfc.section.5.9.5" rel="Chapter" title="5.9.5 PROP 68: PROP_NET_NETWORK_NAME"/>
<link href="#rfc.section.5.9.6" rel="Chapter" title="5.9.6 PROP 69: PROP_NET_XPANID"/>
<link href="#rfc.section.5.9.7" rel="Chapter" title="5.9.7 PROP 70: PROP_NET_MASTER_KEY"/>
<link href="#rfc.section.5.9.8" rel="Chapter" title="5.9.8 PROP 71: PROP_NET_KEY_SEQUENCE_COUNTER"/>
<link href="#rfc.section.5.9.9" rel="Chapter" title="5.9.9 PROP 72: PROP_NET_PARTITION_ID"/>
<link href="#rfc.section.5.9.10" rel="Chapter" title="5.9.10 PROP 73: PROP_NET_REQUIRE_JOIN_EXISTING"/>
<link href="#rfc.section.5.9.11" rel="Chapter" title="5.9.11 PROP 74: PROP_NET_KEY_SWITCH_GUARDTIME"/>
<link href="#rfc.section.5.9.12" rel="Chapter" title="5.9.12 PROP 75: PROP_NET_PSKC"/>
<link href="#rfc.section.5.10" rel="Chapter" title="5.10 IPv6 Properties"/>
<link href="#rfc.section.5.10.1" rel="Chapter" title="5.10.1 PROP 96: PROP_IPV6_LL_ADDR"/>
<link href="#rfc.section.5.10.2" rel="Chapter" title="5.10.2 PROP 97: PROP_IPV6_ML_ADDR"/>
<link href="#rfc.section.5.10.3" rel="Chapter" title="5.10.3 PROP 98: PROP_IPV6_ML_PREFIX"/>
<link href="#rfc.section.5.10.4" rel="Chapter" title="5.10.4 PROP 99: PROP_IPV6_ADDRESS_TABLE"/>
<link href="#rfc.section.5.10.5" rel="Chapter" title="5.10.5 PROP 101: PROP_IPv6_ICMP_PING_OFFLOAD"/>
<link href="#rfc.section.5.11" rel="Chapter" title="5.11 Debug Properties"/>
<link href="#rfc.section.5.11.1" rel="Chapter" title="5.11.1 PROP 16384: PROP_DEBUG_TEST_ASSERT"/>
<link href="#rfc.section.5.11.2" rel="Chapter" title="5.11.2 PROP 16385: PROP_DEBUG_NCP_LOG_LEVEL"/>
<link href="#rfc.section.6" rel="Chapter" title="6 Status Codes"/>
<link href="#rfc.section.7" rel="Chapter" title="7 Technology: Thread(R)"/>
<link href="#rfc.section.7.1" rel="Chapter" title="7.1 Capabilities"/>
<link href="#rfc.section.7.2" rel="Chapter" title="7.2 Properties"/>
<link href="#rfc.section.7.2.1" rel="Chapter" title="7.2.1 PROP 80: PROP_THREAD_LEADER_ADDR"/>
<link href="#rfc.section.7.2.2" rel="Chapter" title="7.2.2 PROP 81: PROP_THREAD_PARENT"/>
<link href="#rfc.section.7.2.3" rel="Chapter" title="7.2.3 PROP 82: PROP_THREAD_CHILD_TABLE"/>
<link href="#rfc.section.7.2.4" rel="Chapter" title="7.2.4 PROP 83: PROP_THREAD_LEADER_RID"/>
<link href="#rfc.section.7.2.5" rel="Chapter" title="7.2.5 PROP 84: PROP_THREAD_LEADER_WEIGHT"/>
<link href="#rfc.section.7.2.6" rel="Chapter" title="7.2.6 PROP 85: PROP_THREAD_LOCAL_LEADER_WEIGHT"/>
<link href="#rfc.section.7.2.7" rel="Chapter" title="7.2.7 PROP 86: PROP_THREAD_NETWORK_DATA"/>
<link href="#rfc.section.7.2.8" rel="Chapter" title="7.2.8 PROP 87: PROP_THREAD_NETWORK_DATA_VERSION"/>
<link href="#rfc.section.7.2.9" rel="Chapter" title="7.2.9 PROP 88: PROP_THREAD_STABLE_NETWORK_DATA"/>
<link href="#rfc.section.7.2.10" rel="Chapter" title="7.2.10 PROP 89: PROP_THREAD_STABLE_NETWORK_DATA_VERSION"/>
<link href="#rfc.section.7.2.11" rel="Chapter" title="7.2.11 PROP 90: PROP_THREAD_ON_MESH_NETS"/>
<link href="#rfc.section.7.2.12" rel="Chapter" title="7.2.12 PROP 91: PROP_THREAD_OFF_MESH_ROUTES"/>
<link href="#rfc.section.7.2.13" rel="Chapter" title="7.2.13 PROP 92: PROP_THREAD_ASSISTING_PORTS"/>
<link href="#rfc.section.7.2.14" rel="Chapter" title="7.2.14 PROP 93: PROP_THREAD_ALLOW_LOCAL_NET_DATA_CHANGE"/>
<link href="#rfc.section.7.2.15" rel="Chapter" title="7.2.15 PROP 94: PROP_THREAD_MODE"/>
<link href="#rfc.section.7.2.16" rel="Chapter" title="7.2.16 PROP 5376: PROP_THREAD_CHILD_TIMEOUT"/>
<link href="#rfc.section.7.2.17" rel="Chapter" title="7.2.17 PROP 5377: PROP_THREAD_RLOC16"/>
<link href="#rfc.section.7.2.18" rel="Chapter" title="7.2.18 PROP 5378: PROP_THREAD_ROUTER_UPGRADE_THRESHOLD"/>
<link href="#rfc.section.7.2.19" rel="Chapter" title="7.2.19 PROP 5379: PROP_THREAD_CONTEXT_REUSE_DELAY"/>
<link href="#rfc.section.7.2.20" rel="Chapter" title="7.2.20 PROP 5380: PROP_THREAD_NETWORK_ID_TIMEOUT"/>
<link href="#rfc.section.7.2.21" rel="Chapter" title="7.2.21 PROP 5381: PROP_THREAD_ACTIVE_ROUTER_IDS"/>
<link href="#rfc.section.7.2.22" rel="Chapter" title="7.2.22 PROP 5382: PROP_THREAD_RLOC16_DEBUG_PASSTHRU"/>
<link href="#rfc.section.7.2.23" rel="Chapter" title="7.2.23 PROP 5383: PROP_THREAD_ROUTER_ROLE_ENABLED"/>
<link href="#rfc.section.7.2.24" rel="Chapter" title="7.2.24 PROP 5384: PROP_THREAD_ROUTER_DOWNGRADE_THRESHOLD"/>
<link href="#rfc.section.7.2.25" rel="Chapter" title="7.2.25 PROP 5385: PROP_THREAD_ROUTER_SELECTION_JITTER"/>
<link href="#rfc.section.7.2.26" rel="Chapter" title="7.2.26 PROP 5386: PROP_THREAD_PREFERRED_ROUTER_ID"/>
<link href="#rfc.section.7.2.27" rel="Chapter" title="7.2.27 PROP 5387: PROP_THREAD_NEIGHBOR_TABLE"/>
<link href="#rfc.section.7.2.28" rel="Chapter" title="7.2.28 PROP 5388: PROP_THREAD_CHILD_COUNT_MAX"/>
<link href="#rfc.section.7.2.29" rel="Chapter" title="7.2.29 PROP 5389: PROP_THREAD_LEADER_NETWORK_DATA"/>
<link href="#rfc.section.7.2.30" rel="Chapter" title="7.2.30 PROP 5390: PROP_THREAD_STABLE_LEADER_NETWORK_DATA"/>
<link href="#rfc.section.7.2.31" rel="Chapter" title="7.2.31 PROP 5391: PROP_THREAD_JOINERS"/>
<link href="#rfc.section.7.2.32" rel="Chapter" title="7.2.32 PROP 5392: PROP_THREAD_COMMISSIONER_ENABLED"/>
<link href="#rfc.section.7.2.33" rel="Chapter" title="7.2.33 PROP 5393: PROP_THREAD_TMF_PROXY_ENABLED"/>
<link href="#rfc.section.7.2.34" rel="Chapter" title="7.2.34 PROP 5394: PROP_THREAD_TMF_PROXY_STREAM"/>
<link href="#rfc.section.7.2.35" rel="Chapter" title="7.2.35 PROP 5395: PROP_THREAD_DISOVERY_SCAN_JOINER_FLAG"/>
<link href="#rfc.section.7.2.36" rel="Chapter" title="7.2.36 PROP 5396: PROP_THREAD_DISCOVERY_SCAN_ENABLE_FILTERING"/>
<link href="#rfc.section.7.2.37" rel="Chapter" title="7.2.37 PROP 5397: PROP_THREAD_DISCOVERY_SCAN_PANID"/>
<link href="#rfc.section.7.2.38" rel="Chapter" title="7.2.38 PROP 5398: PROP_THREAD_STEERING_DATA"/>
<link href="#rfc.section.8" rel="Chapter" title="8 Feature: Network Save"/>
<link href="#rfc.section.8.1" rel="Chapter" title="8.1 Commands"/>
<link href="#rfc.section.8.1.1" rel="Chapter" title="8.1.1 CMD 9: (Host-&gt;NCP) CMD_NET_SAVE"/>
<link href="#rfc.section.8.1.2" rel="Chapter" title="8.1.2 CMD 10: (Host-&gt;NCP) CMD_NET_CLEAR"/>
<link href="#rfc.section.8.1.3" rel="Chapter" title="8.1.3 CMD 11: (Host-&gt;NCP) CMD_NET_RECALL"/>
<link href="#rfc.section.9" rel="Chapter" title="9 Feature: Host Buffer Offload"/>
<link href="#rfc.section.9.1" rel="Chapter" title="9.1 Commands"/>
<link href="#rfc.section.9.1.1" rel="Chapter" title="9.1.1 CMD 12: (NCP-&gt;Host) CMD_HBO_OFFLOAD"/>
<link href="#rfc.section.9.1.2" rel="Chapter" title="9.1.2 CMD 13: (NCP-&gt;Host) CMD_HBO_RECLAIM"/>
<link href="#rfc.section.9.1.3" rel="Chapter" title="9.1.3 CMD 14: (NCP-&gt;Host) CMD_HBO_DROP"/>
<link href="#rfc.section.9.1.4" rel="Chapter" title="9.1.4 CMD 15: (Host-&gt;NCP) CMD_HBO_OFFLOADED"/>
<link href="#rfc.section.9.1.5" rel="Chapter" title="9.1.5 CMD 16: (Host-&gt;NCP) CMD_HBO_RECLAIMED"/>
<link href="#rfc.section.9.1.6" rel="Chapter" title="9.1.6 CMD 17: (Host-&gt;NCP) CMD_HBO_DROPPED"/>
<link href="#rfc.section.9.2" rel="Chapter" title="9.2 Properties"/>
<link href="#rfc.section.9.2.1" rel="Chapter" title="9.2.1 PROP 10: PROP_HBO_MEM_MAX"/>
<link href="#rfc.section.9.2.2" rel="Chapter" title="9.2.2 PROP 11: PROP_HBO_BLOCK_MAX"/>
<link href="#rfc.section.10" rel="Chapter" title="10 Feature: Jam Detection"/>
<link href="#rfc.section.10.1" rel="Chapter" title="10.1 Properties"/>
<link href="#rfc.section.10.1.1" rel="Chapter" title="10.1.1 PROP 4608: PROP_JAM_DETECT_ENABLE"/>
<link href="#rfc.section.10.1.2" rel="Chapter" title="10.1.2 PROP 4609: PROP_JAM_DETECTED"/>
<link href="#rfc.section.10.1.3" rel="Chapter" title="10.1.3 PROP 4610: PROP_JAM_DETECT_RSSI_THRESHOLD"/>
<link href="#rfc.section.10.1.4" rel="Chapter" title="10.1.4 PROP 4611: PROP_JAM_DETECT_WINDOW"/>
<link href="#rfc.section.10.1.5" rel="Chapter" title="10.1.5 PROP 4612: PROP_JAM_DETECT_BUSY"/>
<link href="#rfc.section.10.1.6" rel="Chapter" title="10.1.6 PROP 4613: PROP_JAM_DETECT_HISTORY_BITMAP"/>
<link href="#rfc.section.11" rel="Chapter" title="11 Feature: GPIO Access"/>
<link href="#rfc.section.11.1" rel="Chapter" title="11.1 Properties"/>
<link href="#rfc.section.11.1.1" rel="Chapter" title="11.1.1 PROP 4096: PROP_GPIO_CONFIG"/>
<link href="#rfc.section.11.1.2" rel="Chapter" title="11.1.2 PROP 4098: PROP_GPIO_STATE"/>
<link href="#rfc.section.11.1.3" rel="Chapter" title="11.1.3 PROP 4099: PROP_GPIO_STATE_SET"/>
<link href="#rfc.section.11.1.4" rel="Chapter" title="11.1.4 PROP 4100: PROP_GPIO_STATE_CLEAR"/>
<link href="#rfc.section.12" rel="Chapter" title="12 Feature: True Random Number Generation"/>
<link href="#rfc.section.12.1" rel="Chapter" title="12.1 Properties"/>
<link href="#rfc.section.12.1.1" rel="Chapter" title="12.1.1 PROP 4101: PROP_TRNG_32"/>
<link href="#rfc.section.12.1.2" rel="Chapter" title="12.1.2 PROP 4102: PROP_TRNG_128"/>
<link href="#rfc.section.12.1.3" rel="Chapter" title="12.1.3 PROP 4103: PROP_TRNG_RAW_32"/>
<link href="#rfc.section.13" rel="Chapter" title="13 Security Considerations"/>
<link href="#rfc.section.13.1" rel="Chapter" title="13.1 Raw Application Access"/>
<link href="#rfc.appendix.A" rel="Chapter" title="A Framing Protocol"/>
<link href="#rfc.appendix.A.1" rel="Chapter" title="A.1 UART Recommendations"/>
<link href="#rfc.appendix.A.1.1" rel="Chapter" title="A.1.1 UART Bit Rate Detection"/>
<link href="#rfc.appendix.A.1.2" rel="Chapter" title="A.1.2 HDLC-Lite"/>
<link href="#rfc.appendix.A.2" rel="Chapter" title="A.2 SPI Recommendations"/>
<link href="#rfc.appendix.A.2.1" rel="Chapter" title="A.2.1 SPI Framing Protocol"/>
<link href="#rfc.appendix.A.3" rel="Chapter" title="A.3 I&#xB2;C Recommendations"/>
<link href="#rfc.appendix.A.4" rel="Chapter" title="A.4 Native USB Recommendations"/>
<link href="#rfc.appendix.B" rel="Chapter" title="B Test Vectors"/>
<link href="#rfc.appendix.B.1" rel="Chapter" title="B.1 Test Vector: Packed Unsigned Integer"/>
<link href="#rfc.appendix.B.2" rel="Chapter" title="B.2 Test Vector: Reset Command"/>
<link href="#rfc.appendix.B.3" rel="Chapter" title="B.3 Test Vector: Reset Notification"/>
<link href="#rfc.appendix.B.4" rel="Chapter" title="B.4 Test Vector: Scan Beacon"/>
<link href="#rfc.appendix.B.5" rel="Chapter" title="B.5 Test Vector: Inbound IPv6 Packet"/>
<link href="#rfc.appendix.B.6" rel="Chapter" title="B.6 Test Vector: Outbound IPv6 Packet"/>
<link href="#rfc.appendix.B.7" rel="Chapter" title="B.7 Test Vector: Fetch list of on-mesh networks"/>
<link href="#rfc.appendix.B.8" rel="Chapter" title="B.8 Test Vector: Returned list of on-mesh networks"/>
<link href="#rfc.appendix.B.9" rel="Chapter" title="B.9 Test Vector: Adding an on-mesh network"/>
<link href="#rfc.appendix.B.10" rel="Chapter" title="B.10 Test Vector: Insertion notification of an on-mesh network"/>
<link href="#rfc.appendix.B.11" rel="Chapter" title="B.11 Test Vector: Removing a local on-mesh network"/>
<link href="#rfc.appendix.B.12" rel="Chapter" title="B.12 Test Vector: Removal notification of an on-mesh network"/>
<link href="#rfc.appendix.C" rel="Chapter" title="C Example Sessions"/>
<link href="#rfc.appendix.C.1" rel="Chapter" title="C.1 NCP Initialization"/>
<link href="#rfc.appendix.C.2" rel="Chapter" title="C.2 Attaching to a network"/>
<link href="#rfc.appendix.C.3" rel="Chapter" title="C.3 Successfully joining a pre-existing network"/>
<link href="#rfc.appendix.C.4" rel="Chapter" title="C.4 Unsuccessfully joining a pre-existing network"/>
<link href="#rfc.appendix.C.5" rel="Chapter" title="C.5 Detaching from a network"/>
<link href="#rfc.appendix.C.6" rel="Chapter" title="C.6 Attaching to a saved network"/>
<link href="#rfc.appendix.C.7" rel="Chapter" title="C.7 NCP Software Reset"/>
<link href="#rfc.appendix.C.8" rel="Chapter" title="C.8 Adding an on-mesh prefix"/>
<link href="#rfc.appendix.C.9" rel="Chapter" title="C.9 Entering low-power modes"/>
<link href="#rfc.appendix.C.10" rel="Chapter" title="C.10 Sniffing raw packets"/>
<link href="#rfc.appendix.D" rel="Chapter" title="D Glossary"/>
<link href="#rfc.appendix.E" rel="Chapter" title="E Acknowledgments"/>
<link href="#rfc.authors" rel="Chapter"/>
<meta name="generator" content="xml2rfc version 2.5.2 - http://tools.ietf.org/tools/xml2rfc" />
<link rel="schema.dct" href="http://purl.org/dc/terms/" />
<meta name="dct.creator" content="Quattlebaum, R. and J. Woodyatt, Ed." />
<meta name="dct.identifier" content="urn:ietf:id:draft-rquattle-spinel-unified-ab5628a5" />
<meta name="dct.issued" scheme="ISO8601" content="2017-6-22" />
<meta name="dct.abstract" content="This document describes the Spinel protocol, which facilitates the control and management of IPv6 network interfaces on devices where general purpose application processors offload network functions at their interfaces to network co-processors (NCP) connected by simple communication links like serial data channels. While initially developed to support Thread(R), Spinel's layered design allows it to be easily adapted to other similar network technologies. " />
<meta name="description" content="This document describes the Spinel protocol, which facilitates the control and management of IPv6 network interfaces on devices where general purpose application processors offload network functions at their interfaces to network co-processors (NCP) connected by simple communication links like serial data channels. While initially developed to support Thread(R), Spinel's layered design allows it to be easily adapted to other similar network technologies. " />
</head>
<body>
<table class="header">
<tbody>
<tr>
<td class="left">Network Working Group</td>
<td class="right">R. Quattlebaum</td>
</tr>
<tr>
<td class="left">Internet-Draft</td>
<td class="right">J. Woodyatt, Ed.</td>
</tr>
<tr>
<td class="left">Intended status: Informational</td>
<td class="right">Nest Labs, Inc.</td>
</tr>
<tr>
<td class="left">Expires: December 24, 2017</td>
<td class="right">June 22, 2017</td>
</tr>
</tbody>
</table>
<p class="title">Spinel Host-Controller Protocol<br />
<span class="filename">draft-rquattle-spinel-unified-ab5628a5</span></p>
<h1 id="rfc.abstract">
<a href="#rfc.abstract">Abstract</a>
</h1>
<p>This document describes the Spinel protocol, which facilitates the control and management of IPv6 network interfaces on devices where general purpose application processors offload network functions at their interfaces to network co-processors (NCP) connected by simple communication links like serial data channels. While initially developed to support Thread(R), Spinel's layered design allows it to be easily adapted to other similar network technologies. </p>
<p>This document also describes various Spinel specializations, including support for the Thread(R) low-power mesh network technology. </p>
<h1 id="rfc.status">
<a href="#rfc.status">Status of This Memo</a>
</h1>
<p>This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79.</p>
<p>Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet-Drafts is at http://datatracker.ietf.org/drafts/current/.</p>
<p>Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress."</p>
<p>This Internet-Draft will expire on December 24, 2017.</p>
<h1 id="rfc.copyrightnotice">
<a href="#rfc.copyrightnotice">Copyright Notice</a>
</h1>
<p>Copyright (c) 2017 IETF Trust and the persons identified as the document authors. All rights reserved.</p>
<p>This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (http://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License.</p>
<p>This document may not be modified, and derivative works of it may not be created, and it may not be published except as an Internet-Draft.</p>
<hr class="noprint" />
<h1 class="np" id="rfc.toc"><a href="#rfc.toc">Table of Contents</a></h1>
<ul class="toc">
<li>1. <a href="#rfc.section.1">Introduction</a></li>
<ul><li>1.1. <a href="#rfc.section.1.1">About this Draft</a></li>
<ul><li>1.1.1. <a href="#rfc.section.1.1.1">Scope</a></li>
<li>1.1.2. <a href="#rfc.section.1.1.2">Renumbering</a></li>
</ul></ul><li>2. <a href="#rfc.section.2">Frame Format</a></li>
<ul><li>2.1. <a href="#rfc.section.2.1">Header Format</a></li>
<ul><li>2.1.1. <a href="#rfc.section.2.1.1">FLG: Flag</a></li>
<li>2.1.2. <a href="#rfc.section.2.1.2">NLI: Network Link Identifier</a></li>
<li>2.1.3. <a href="#rfc.section.2.1.3">TID: Transaction Identifier</a></li>
<li>2.1.4. <a href="#rfc.section.2.1.4">Command Identifier (CMD)</a></li>
<li>2.1.5. <a href="#rfc.section.2.1.5">Command Payload (Optional)</a></li>
</ul></ul><li>3. <a href="#rfc.section.3">Data Packing</a></li>
<ul><li>3.1. <a href="#rfc.section.3.1">Primitive Types</a></li>
<li>3.2. <a href="#rfc.section.3.2">Packed Unsigned Integer</a></li>
<li>3.3. <a href="#rfc.section.3.3">Data Blobs</a></li>
<li>3.4. <a href="#rfc.section.3.4">Structured Data</a></li>
<li>3.5. <a href="#rfc.section.3.5">Arrays</a></li>
</ul><li>4. <a href="#rfc.section.4">Commands</a></li>
<ul><li>4.1. <a href="#rfc.section.4.1">CMD 0: (Host-&gt;NCP) CMD_NOOP</a></li>
<li>4.2. <a href="#rfc.section.4.2">CMD 1: (Host-&gt;NCP) CMD_RESET</a></li>
<li>4.3. <a href="#rfc.section.4.3">CMD 2: (Host-&gt;NCP) CMD_PROP_VALUE_GET</a></li>
<li>4.4. <a href="#rfc.section.4.4">CMD 3: (Host-&gt;NCP) CMD_PROP_VALUE_SET</a></li>
<li>4.5. <a href="#rfc.section.4.5">CMD 4: (Host-&gt;NCP) CMD_PROP_VALUE_INSERT</a></li>
<li>4.6. <a href="#rfc.section.4.6">CMD 5: (Host-&gt;NCP) CMD_PROP_VALUE_REMOVE</a></li>
<li>4.7. <a href="#rfc.section.4.7">CMD 6: (NCP-&gt;Host) CMD_PROP_VALUE_IS</a></li>
<li>4.8. <a href="#rfc.section.4.8">CMD 7: (NCP-&gt;Host) CMD_PROP_VALUE_INSERTED</a></li>
<li>4.9. <a href="#rfc.section.4.9">CMD 8: (NCP-&gt;Host) CMD_PROP_VALUE_REMOVED</a></li>
<li>4.10. <a href="#rfc.section.4.10">CMD 18: (Host-&gt;NCP) CMD_PEEK</a></li>
<li>4.11. <a href="#rfc.section.4.11">CMD 19: (NCP-&gt;Host) CMD_PEEK_RET</a></li>
<li>4.12. <a href="#rfc.section.4.12">CMD 20: (Host-&gt;NCP) CMD_POKE</a></li>
<li>4.13. <a href="#rfc.section.4.13">CMD 21: (Host-&gt;NCP) CMD_PROP_VALUE_MULTI_GET</a></li>
<li>4.14. <a href="#rfc.section.4.14">CMD 22: (Host-&gt;NCP) CMD_PROP_VALUE_MULTI_SET</a></li>
<li>4.15. <a href="#rfc.section.4.15">CMD 23: (NCP-&gt;Host) CMD_PROP_VALUES_ARE</a></li>
</ul><li>5. <a href="#rfc.section.5">Properties</a></li>
<ul><li>5.1. <a href="#rfc.section.5.1">Property Methods</a></li>
<li>5.2. <a href="#rfc.section.5.2">Property Types</a></li>
<ul><li>5.2.1. <a href="#rfc.section.5.2.1">Single-Value Properties</a></li>
<li>5.2.2. <a href="#rfc.section.5.2.2">Multiple-Value Properties</a></li>
<li>5.2.3. <a href="#rfc.section.5.2.3">Stream Properties</a></li>
</ul><li>5.3. <a href="#rfc.section.5.3">Property Numbering</a></li>
<li>5.4. <a href="#rfc.section.5.4">Property Sections</a></li>
<li>5.5. <a href="#rfc.section.5.5">Core Properties</a></li>
<ul><li>5.5.1. <a href="#rfc.section.5.5.1">PROP 0: PROP_LAST_STATUS</a></li>
<li>5.5.2. <a href="#rfc.section.5.5.2">PROP 1: PROP_PROTOCOL_VERSION</a></li>
<li>5.5.3. <a href="#rfc.section.5.5.3">PROP 2: PROP_NCP_VERSION</a></li>
<li>5.5.4. <a href="#rfc.section.5.5.4">PROP 3: PROP_INTERFACE_TYPE</a></li>
<li>5.5.5. <a href="#rfc.section.5.5.5">PROP 4: PROP_INTERFACE_VENDOR_ID</a></li>
<li>5.5.6. <a href="#rfc.section.5.5.6">PROP 5: PROP_CAPS</a></li>
<li>5.5.7. <a href="#rfc.section.5.5.7">PROP 6: PROP_INTERFACE_COUNT</a></li>
<li>5.5.8. <a href="#rfc.section.5.5.8">PROP 7: PROP_POWER_STATE</a></li>
<li>5.5.9. <a href="#rfc.section.5.5.9">PROP 8: PROP_HWADDR</a></li>
<li>5.5.10. <a href="#rfc.section.5.5.10">PROP 9: PROP_LOCK</a></li>
<li>5.5.11. <a href="#rfc.section.5.5.11">PROP 10: PROP_HOST_POWER_STATE</a></li>
<li>5.5.12. <a href="#rfc.section.5.5.12">PROP 4104: PROP_UNSOL_UPDATE_FILTER</a></li>
<li>5.5.13. <a href="#rfc.section.5.5.13">PROP 4105: PROP_UNSOL_UPDATE_LIST</a></li>
</ul><li>5.6. <a href="#rfc.section.5.6">Stream Properties</a></li>
<ul><li>5.6.1. <a href="#rfc.section.5.6.1">PROP 112: PROP_STREAM_DEBUG</a></li>
<li>5.6.2. <a href="#rfc.section.5.6.2">PROP 113: PROP_STREAM_RAW</a></li>
<li>5.6.3. <a href="#rfc.section.5.6.3">PROP 114: PROP_STREAM_NET</a></li>
<li>5.6.4. <a href="#rfc.section.5.6.4">PROP 115: PROP_STREAM_NET_INSECURE</a></li>
</ul><li>5.7. <a href="#rfc.section.5.7">PHY Properties</a></li>
<ul><li>5.7.1. <a href="#rfc.section.5.7.1">PROP 32: PROP_PHY_ENABLED</a></li>
<li>5.7.2. <a href="#rfc.section.5.7.2">PROP 33: PROP_PHY_CHAN</a></li>
<li>5.7.3. <a href="#rfc.section.5.7.3">PROP 34: PROP_PHY_CHAN_SUPPORTED</a></li>
<li>5.7.4. <a href="#rfc.section.5.7.4">PROP 35: PROP_PHY_FREQ</a></li>
<li>5.7.5. <a href="#rfc.section.5.7.5">PROP 36: PROP_PHY_CCA_THRESHOLD</a></li>
<li>5.7.6. <a href="#rfc.section.5.7.6">PROP 37: PROP_PHY_TX_POWER</a></li>
<li>5.7.7. <a href="#rfc.section.5.7.7">PROP 38: PROP_PHY_RSSI</a></li>
<li>5.7.8. <a href="#rfc.section.5.7.8">PROP 39: PROP_PHY_RX_SENSITIVITY</a></li>
</ul><li>5.8. <a href="#rfc.section.5.8">MAC Properties</a></li>
<ul><li>5.8.1. <a href="#rfc.section.5.8.1">PROP 48: PROP_MAC_SCAN_STATE</a></li>
<li>5.8.2. <a href="#rfc.section.5.8.2">PROP 49: PROP_MAC_SCAN_MASK</a></li>
<li>5.8.3. <a href="#rfc.section.5.8.3">PROP 50: PROP_MAC_SCAN_PERIOD</a></li>
<li>5.8.4. <a href="#rfc.section.5.8.4">PROP 51: PROP_MAC_SCAN_BEACON</a></li>
<li>5.8.5. <a href="#rfc.section.5.8.5">PROP 52: PROP_MAC_15_4_LADDR</a></li>
<li>5.8.6. <a href="#rfc.section.5.8.6">PROP 53: PROP_MAC_15_4_SADDR</a></li>
<li>5.8.7. <a href="#rfc.section.5.8.7">PROP 54: PROP_MAC_15_4_PANID</a></li>
<li>5.8.8. <a href="#rfc.section.5.8.8">PROP 55: PROP_MAC_RAW_STREAM_ENABLED</a></li>
<li>5.8.9. <a href="#rfc.section.5.8.9">PROP 56: PROP_MAC_PROMISCUOUS_MODE</a></li>
<li>5.8.10. <a href="#rfc.section.5.8.10">PROP 57: PROP_MAC_ENERGY_SCAN_RESULT</a></li>
<li>5.8.11. <a href="#rfc.section.5.8.11">PROP 4864: PROP_MAC_WHITELIST</a></li>
<li>5.8.12. <a href="#rfc.section.5.8.12">PROP 4865: PROP_MAC_WHITELIST_ENABLED</a></li>
<li>5.8.13. <a href="#rfc.section.5.8.13">PROP 4867: SPINEL_PROP_MAC_SRC_MATCH_ENABLED</a></li>
<li>5.8.14. <a href="#rfc.section.5.8.14">PROP 4868: SPINEL_PROP_MAC_SRC_MATCH_SHORT_ADDRESSES</a></li>
<li>5.8.15. <a href="#rfc.section.5.8.15">PROP 4869: SPINEL_PROP_MAC_SRC_MATCH_EXTENDED_ADDRESSES</a></li>
<li>5.8.16. <a href="#rfc.section.5.8.16">PROP 4870: PROP_MAC_BLACKLIST</a></li>
<li>5.8.17. <a href="#rfc.section.5.8.17">PROP 4871: PROP_MAC_BLACKLIST_ENABLED</a></li>
</ul><li>5.9. <a href="#rfc.section.5.9">NET Properties</a></li>
<ul><li>5.9.1. <a href="#rfc.section.5.9.1">PROP 64: PROP_NET_SAVED</a></li>
<li>5.9.2. <a href="#rfc.section.5.9.2">PROP 65: PROP_NET_IF_UP</a></li>
<li>5.9.3. <a href="#rfc.section.5.9.3">PROP 66: PROP_NET_STACK_UP</a></li>
<li>5.9.4. <a href="#rfc.section.5.9.4">PROP 67: PROP_NET_ROLE</a></li>
<li>5.9.5. <a href="#rfc.section.5.9.5">PROP 68: PROP_NET_NETWORK_NAME</a></li>
<li>5.9.6. <a href="#rfc.section.5.9.6">PROP 69: PROP_NET_XPANID</a></li>
<li>5.9.7. <a href="#rfc.section.5.9.7">PROP 70: PROP_NET_MASTER_KEY</a></li>
<li>5.9.8. <a href="#rfc.section.5.9.8">PROP 71: PROP_NET_KEY_SEQUENCE_COUNTER</a></li>
<li>5.9.9. <a href="#rfc.section.5.9.9">PROP 72: PROP_NET_PARTITION_ID</a></li>
<li>5.9.10. <a href="#rfc.section.5.9.10">PROP 73: PROP_NET_REQUIRE_JOIN_EXISTING</a></li>
<li>5.9.11. <a href="#rfc.section.5.9.11">PROP 74: PROP_NET_KEY_SWITCH_GUARDTIME</a></li>
<li>5.9.12. <a href="#rfc.section.5.9.12">PROP 75: PROP_NET_PSKC</a></li>
</ul><li>5.10. <a href="#rfc.section.5.10">IPv6 Properties</a></li>
<ul><li>5.10.1. <a href="#rfc.section.5.10.1">PROP 96: PROP_IPV6_LL_ADDR</a></li>
<li>5.10.2. <a href="#rfc.section.5.10.2">PROP 97: PROP_IPV6_ML_ADDR</a></li>
<li>5.10.3. <a href="#rfc.section.5.10.3">PROP 98: PROP_IPV6_ML_PREFIX</a></li>
<li>5.10.4. <a href="#rfc.section.5.10.4">PROP 99: PROP_IPV6_ADDRESS_TABLE</a></li>
<li>5.10.5. <a href="#rfc.section.5.10.5">PROP 101: PROP_IPv6_ICMP_PING_OFFLOAD</a></li>
</ul><li>5.11. <a href="#rfc.section.5.11">Debug Properties</a></li>
<ul><li>5.11.1. <a href="#rfc.section.5.11.1">PROP 16384: PROP_DEBUG_TEST_ASSERT</a></li>
<li>5.11.2. <a href="#rfc.section.5.11.2">PROP 16385: PROP_DEBUG_NCP_LOG_LEVEL</a></li>
</ul></ul><li>6. <a href="#rfc.section.6">Status Codes</a></li>
<li>7. <a href="#rfc.section.7">Technology: Thread(R)</a></li>
<ul><li>7.1. <a href="#rfc.section.7.1">Capabilities</a></li>
<li>7.2. <a href="#rfc.section.7.2">Properties</a></li>
<ul><li>7.2.1. <a href="#rfc.section.7.2.1">PROP 80: PROP_THREAD_LEADER_ADDR</a></li>
<li>7.2.2. <a href="#rfc.section.7.2.2">PROP 81: PROP_THREAD_PARENT</a></li>
<li>7.2.3. <a href="#rfc.section.7.2.3">PROP 82: PROP_THREAD_CHILD_TABLE</a></li>
<li>7.2.4. <a href="#rfc.section.7.2.4">PROP 83: PROP_THREAD_LEADER_RID</a></li>
<li>7.2.5. <a href="#rfc.section.7.2.5">PROP 84: PROP_THREAD_LEADER_WEIGHT</a></li>
<li>7.2.6. <a href="#rfc.section.7.2.6">PROP 85: PROP_THREAD_LOCAL_LEADER_WEIGHT</a></li>
<li>7.2.7. <a href="#rfc.section.7.2.7">PROP 86: PROP_THREAD_NETWORK_DATA</a></li>
<li>7.2.8. <a href="#rfc.section.7.2.8">PROP 87: PROP_THREAD_NETWORK_DATA_VERSION</a></li>
<li>7.2.9. <a href="#rfc.section.7.2.9">PROP 88: PROP_THREAD_STABLE_NETWORK_DATA</a></li>
<li>7.2.10. <a href="#rfc.section.7.2.10">PROP 89: PROP_THREAD_STABLE_NETWORK_DATA_VERSION</a></li>
<li>7.2.11. <a href="#rfc.section.7.2.11">PROP 90: PROP_THREAD_ON_MESH_NETS</a></li>
<li>7.2.12. <a href="#rfc.section.7.2.12">PROP 91: PROP_THREAD_OFF_MESH_ROUTES</a></li>
<li>7.2.13. <a href="#rfc.section.7.2.13">PROP 92: PROP_THREAD_ASSISTING_PORTS</a></li>
<li>7.2.14. <a href="#rfc.section.7.2.14">PROP 93: PROP_THREAD_ALLOW_LOCAL_NET_DATA_CHANGE</a></li>
<li>7.2.15. <a href="#rfc.section.7.2.15">PROP 94: PROP_THREAD_MODE</a></li>
<li>7.2.16. <a href="#rfc.section.7.2.16">PROP 5376: PROP_THREAD_CHILD_TIMEOUT</a></li>
<li>7.2.17. <a href="#rfc.section.7.2.17">PROP 5377: PROP_THREAD_RLOC16</a></li>
<li>7.2.18. <a href="#rfc.section.7.2.18">PROP 5378: PROP_THREAD_ROUTER_UPGRADE_THRESHOLD</a></li>
<li>7.2.19. <a href="#rfc.section.7.2.19">PROP 5379: PROP_THREAD_CONTEXT_REUSE_DELAY</a></li>
<li>7.2.20. <a href="#rfc.section.7.2.20">PROP 5380: PROP_THREAD_NETWORK_ID_TIMEOUT</a></li>
<li>7.2.21. <a href="#rfc.section.7.2.21">PROP 5381: PROP_THREAD_ACTIVE_ROUTER_IDS</a></li>
<li>7.2.22. <a href="#rfc.section.7.2.22">PROP 5382: PROP_THREAD_RLOC16_DEBUG_PASSTHRU</a></li>
<li>7.2.23. <a href="#rfc.section.7.2.23">PROP 5383: PROP_THREAD_ROUTER_ROLE_ENABLED</a></li>
<li>7.2.24. <a href="#rfc.section.7.2.24">PROP 5384: PROP_THREAD_ROUTER_DOWNGRADE_THRESHOLD</a></li>
<li>7.2.25. <a href="#rfc.section.7.2.25">PROP 5385: PROP_THREAD_ROUTER_SELECTION_JITTER</a></li>
<li>7.2.26. <a href="#rfc.section.7.2.26">PROP 5386: PROP_THREAD_PREFERRED_ROUTER_ID</a></li>
<li>7.2.27. <a href="#rfc.section.7.2.27">PROP 5387: PROP_THREAD_NEIGHBOR_TABLE</a></li>
<li>7.2.28. <a href="#rfc.section.7.2.28">PROP 5388: PROP_THREAD_CHILD_COUNT_MAX</a></li>
<li>7.2.29. <a href="#rfc.section.7.2.29">PROP 5389: PROP_THREAD_LEADER_NETWORK_DATA</a></li>
<li>7.2.30. <a href="#rfc.section.7.2.30">PROP 5390: PROP_THREAD_STABLE_LEADER_NETWORK_DATA</a></li>
<li>7.2.31. <a href="#rfc.section.7.2.31">PROP 5391: PROP_THREAD_JOINERS</a></li>
<li>7.2.32. <a href="#rfc.section.7.2.32">PROP 5392: PROP_THREAD_COMMISSIONER_ENABLED</a></li>
<li>7.2.33. <a href="#rfc.section.7.2.33">PROP 5393: PROP_THREAD_TMF_PROXY_ENABLED</a></li>
<li>7.2.34. <a href="#rfc.section.7.2.34">PROP 5394: PROP_THREAD_TMF_PROXY_STREAM</a></li>
<li>7.2.35. <a href="#rfc.section.7.2.35">PROP 5395: PROP_THREAD_DISOVERY_SCAN_JOINER_FLAG</a></li>
<li>7.2.36. <a href="#rfc.section.7.2.36">PROP 5396: PROP_THREAD_DISCOVERY_SCAN_ENABLE_FILTERING</a></li>
<li>7.2.37. <a href="#rfc.section.7.2.37">PROP 5397: PROP_THREAD_DISCOVERY_SCAN_PANID</a></li>
<li>7.2.38. <a href="#rfc.section.7.2.38">PROP 5398: PROP_THREAD_STEERING_DATA</a></li>
</ul></ul><li>8. <a href="#rfc.section.8">Feature: Network Save</a></li>
<ul><li>8.1. <a href="#rfc.section.8.1">Commands</a></li>
<ul><li>8.1.1. <a href="#rfc.section.8.1.1">CMD 9: (Host-&gt;NCP) CMD_NET_SAVE</a></li>
<li>8.1.2. <a href="#rfc.section.8.1.2">CMD 10: (Host-&gt;NCP) CMD_NET_CLEAR</a></li>
<li>8.1.3. <a href="#rfc.section.8.1.3">CMD 11: (Host-&gt;NCP) CMD_NET_RECALL</a></li>
</ul></ul><li>9. <a href="#rfc.section.9">Feature: Host Buffer Offload</a></li>
<ul><li>9.1. <a href="#rfc.section.9.1">Commands</a></li>
<ul><li>9.1.1. <a href="#rfc.section.9.1.1">CMD 12: (NCP-&gt;Host) CMD_HBO_OFFLOAD</a></li>
<li>9.1.2. <a href="#rfc.section.9.1.2">CMD 13: (NCP-&gt;Host) CMD_HBO_RECLAIM</a></li>
<li>9.1.3. <a href="#rfc.section.9.1.3">CMD 14: (NCP-&gt;Host) CMD_HBO_DROP</a></li>
<li>9.1.4. <a href="#rfc.section.9.1.4">CMD 15: (Host-&gt;NCP) CMD_HBO_OFFLOADED</a></li>
<li>9.1.5. <a href="#rfc.section.9.1.5">CMD 16: (Host-&gt;NCP) CMD_HBO_RECLAIMED</a></li>
<li>9.1.6. <a href="#rfc.section.9.1.6">CMD 17: (Host-&gt;NCP) CMD_HBO_DROPPED</a></li>
</ul><li>9.2. <a href="#rfc.section.9.2">Properties</a></li>
<ul><li>9.2.1. <a href="#rfc.section.9.2.1">PROP 10: PROP_HBO_MEM_MAX</a></li>
<li>9.2.2. <a href="#rfc.section.9.2.2">PROP 11: PROP_HBO_BLOCK_MAX</a></li>
</ul></ul><li>10. <a href="#rfc.section.10">Feature: Jam Detection</a></li>
<ul><li>10.1. <a href="#rfc.section.10.1">Properties</a></li>
<ul><li>10.1.1. <a href="#rfc.section.10.1.1">PROP 4608: PROP_JAM_DETECT_ENABLE</a></li>
<li>10.1.2. <a href="#rfc.section.10.1.2">PROP 4609: PROP_JAM_DETECTED</a></li>
<li>10.1.3. <a href="#rfc.section.10.1.3">PROP 4610: PROP_JAM_DETECT_RSSI_THRESHOLD</a></li>
<li>10.1.4. <a href="#rfc.section.10.1.4">PROP 4611: PROP_JAM_DETECT_WINDOW</a></li>
<li>10.1.5. <a href="#rfc.section.10.1.5">PROP 4612: PROP_JAM_DETECT_BUSY</a></li>
<li>10.1.6. <a href="#rfc.section.10.1.6">PROP 4613: PROP_JAM_DETECT_HISTORY_BITMAP</a></li>
</ul></ul><li>11. <a href="#rfc.section.11">Feature: GPIO Access</a></li>
<ul><li>11.1. <a href="#rfc.section.11.1">Properties</a></li>
<ul><li>11.1.1. <a href="#rfc.section.11.1.1">PROP 4096: PROP_GPIO_CONFIG</a></li>
<li>11.1.2. <a href="#rfc.section.11.1.2">PROP 4098: PROP_GPIO_STATE</a></li>
<li>11.1.3. <a href="#rfc.section.11.1.3">PROP 4099: PROP_GPIO_STATE_SET</a></li>
<li>11.1.4. <a href="#rfc.section.11.1.4">PROP 4100: PROP_GPIO_STATE_CLEAR</a></li>
</ul></ul><li>12. <a href="#rfc.section.12">Feature: True Random Number Generation</a></li>
<ul><li>12.1. <a href="#rfc.section.12.1">Properties</a></li>
<ul><li>12.1.1. <a href="#rfc.section.12.1.1">PROP 4101: PROP_TRNG_32</a></li>
<li>12.1.2. <a href="#rfc.section.12.1.2">PROP 4102: PROP_TRNG_128</a></li>
<li>12.1.3. <a href="#rfc.section.12.1.3">PROP 4103: PROP_TRNG_RAW_32</a></li>
</ul></ul><li>13. <a href="#rfc.section.13">Security Considerations</a></li>
<ul><li>13.1. <a href="#rfc.section.13.1">Raw Application Access</a></li>
</ul><li>Appendix A. <a href="#rfc.appendix.A">Framing Protocol</a></li>
<ul><li>A.1. <a href="#rfc.appendix.A.1">UART Recommendations</a></li>
<ul><li>A.1.1. <a href="#rfc.appendix.A.1.1">UART Bit Rate Detection</a></li>
<li>A.1.2. <a href="#rfc.appendix.A.1.2">HDLC-Lite</a></li>
</ul><li>A.2. <a href="#rfc.appendix.A.2">SPI Recommendations</a></li>
<ul><li>A.2.1. <a href="#rfc.appendix.A.2.1">SPI Framing Protocol</a></li>
</ul><li>A.3. <a href="#rfc.appendix.A.3">I&#178;C Recommendations</a></li>
<li>A.4. <a href="#rfc.appendix.A.4">Native USB Recommendations</a></li>
</ul><li>Appendix B. <a href="#rfc.appendix.B">Test Vectors</a></li>
<ul><li>B.1. <a href="#rfc.appendix.B.1">Test Vector: Packed Unsigned Integer</a></li>
<li>B.2. <a href="#rfc.appendix.B.2">Test Vector: Reset Command</a></li>
<li>B.3. <a href="#rfc.appendix.B.3">Test Vector: Reset Notification</a></li>
<li>B.4. <a href="#rfc.appendix.B.4">Test Vector: Scan Beacon</a></li>
<li>B.5. <a href="#rfc.appendix.B.5">Test Vector: Inbound IPv6 Packet</a></li>
<li>B.6. <a href="#rfc.appendix.B.6">Test Vector: Outbound IPv6 Packet</a></li>
<li>B.7. <a href="#rfc.appendix.B.7">Test Vector: Fetch list of on-mesh networks</a></li>
<li>B.8. <a href="#rfc.appendix.B.8">Test Vector: Returned list of on-mesh networks</a></li>
<li>B.9. <a href="#rfc.appendix.B.9">Test Vector: Adding an on-mesh network</a></li>
<li>B.10. <a href="#rfc.appendix.B.10">Test Vector: Insertion notification of an on-mesh network</a></li>
<li>B.11. <a href="#rfc.appendix.B.11">Test Vector: Removing a local on-mesh network</a></li>
<li>B.12. <a href="#rfc.appendix.B.12">Test Vector: Removal notification of an on-mesh network</a></li>
</ul><li>Appendix C. <a href="#rfc.appendix.C">Example Sessions</a></li>
<ul><li>C.1. <a href="#rfc.appendix.C.1">NCP Initialization</a></li>
<li>C.2. <a href="#rfc.appendix.C.2">Attaching to a network</a></li>
<li>C.3. <a href="#rfc.appendix.C.3">Successfully joining a pre-existing network</a></li>
<li>C.4. <a href="#rfc.appendix.C.4">Unsuccessfully joining a pre-existing network</a></li>
<li>C.5. <a href="#rfc.appendix.C.5">Detaching from a network</a></li>
<li>C.6. <a href="#rfc.appendix.C.6">Attaching to a saved network</a></li>
<li>C.7. <a href="#rfc.appendix.C.7">NCP Software Reset</a></li>
<li>C.8. <a href="#rfc.appendix.C.8">Adding an on-mesh prefix</a></li>
<li>C.9. <a href="#rfc.appendix.C.9">Entering low-power modes</a></li>
<li>C.10. <a href="#rfc.appendix.C.10">Sniffing raw packets</a></li>
</ul><li>Appendix D. <a href="#rfc.appendix.D">Glossary</a></li>
<li>Appendix E. <a href="#rfc.appendix.E">Acknowledgments</a></li>
<li><a href="#rfc.authors">Authors' Addresses</a></li>
</ul>
<h1 id="rfc.section.1"><a href="#rfc.section.1">1.</a> <a href="#introduction" id="introduction">Introduction</a></h1>
<p id="rfc.section.1.p.1">Spinel is a host-controller protocol designed to enable interoperation over simple serial connections between general purpose device operating systems (OS) and network co-processors (NCP) for the purpose of controlling and managing their IPv6 network interfaces, achieving the following goals: </p>
<p/>
<ul>
<li>Adopt a layered approach to the protocol design, allowing future support for other network protocols.</li>
<li>Minimize the number of required commands/methods by providing a rich, property-based API.</li>
<li>Support NCPs capable of being connected to more than one network at a time.</li>
<li>Gracefully handle the addition of new features and capabilities without necessarily breaking backward compatibility.</li>
<li>Be as minimal and light-weight as possible without unnecessarily sacrificing flexibility.</li>
</ul>
<p> </p>
<p id="rfc.section.1.p.3">On top of this core framework, we define the properties and commands to enable various features and network protocols. </p>
<h1 id="rfc.section.1.1"><a href="#rfc.section.1.1">1.1.</a> <a href="#about-this-draft" id="about-this-draft">About this Draft</a></h1>
<p id="rfc.section.1.1.p.1">This document is currently in a draft status and is changing often. This section discusses some ideas for changes to the protocol that haven't yet been fully specified, as well as some of the impetus for the current design. </p>
<h1 id="rfc.section.1.1.1"><a href="#rfc.section.1.1.1">1.1.1.</a> <a href="#scope" id="scope">Scope</a></h1>
<p id="rfc.section.1.1.1.p.1">The eventual intent is to have two documents: A Spinel basis document which discusses the network-technology-agnostic mechanisms and a Thread(R) specialization document which describes all of the Thread(R)-specific implementation details. Currently, this document covers both. </p>
<h1 id="rfc.section.1.1.2"><a href="#rfc.section.1.1.2">1.1.2.</a> <a href="#renumbering" id="renumbering">Renumbering</a></h1>
<p id="rfc.section.1.1.2.p.1">Efforts are currently maintained to try to prevent overtly backward-incompatible changes to the existing protocol, but if you are implementing Spinel in your own products you should expect there to be at least one large renumbering event and major version number change before the standard is considered "baked". All changes will be clearly marked and documented to make such a transition as easy as possible. </p>
<p id="rfc.section.1.1.2.p.2">To allow conclusive detection of protocol (in)compatibility between the host and the NCP, the following commands and properties are already considered to be "baked" and will not change: </p>
<p/>
<ul>
<li>Command IDs zero through eight. (Reset, No-op, and Property-Value Commands)</li>
<li>Property IDs zero through two. (Last status, Protocol Version, and NCP Version)</li>
</ul>
<p> </p>
<p id="rfc.section.1.1.2.p.4">Renumbering would be undertaken in order to better organize the allocation of property IDs and capability IDs. One of the initial goals of this protocol was for it to be possible for a host or NCP to only implement properties with values less than 127 and for the NCP to still be usable---relegating all larger property values for extra features or other capabilities that aren't strictly necessary. This would allow simple implementations to avoid the need to implement support for PUIs (<a href="#packed-unsigned-integer">Section 3.2</a>). </p>
<p id="rfc.section.1.1.2.p.5">As time has gone by and the protocol has become more fleshed out, it has become clear that some of the initial allocations were inadequate and should be revisited if we want to try to achieve the original goal. </p>
<h1 id="rfc.section.2"><a href="#rfc.section.2">2.</a> <a href="#frame-format" id="frame-format">Frame Format</a></h1>
<p id="rfc.section.2.p.1">A frame is defined simply as the concatenation of </p>
<p/>
<ul>
<li>A header byte</li>
<li>A command (up to three bytes, see <a href="#packed-unsigned-integer">Section 3.2</a> for format)</li>
<li>An optional command payload</li>
</ul>
<p> </p>
<table cellpadding="3" cellspacing="0" class="tt full center">
<thead>
<tr>
<th class="center">Octets:</th>
<th class="center">1</th>
<th class="center">1-3</th>
<th class="center">n</th>
</tr>
</thead>
<tbody>
<tr>
<td class="center">Fields:</td>
<td class="center">HEADER</td>
<td class="center">CMD</td>
<td class="center">CMD_PAYLOAD</td>
</tr>
</tbody>
</table>
<h1 id="rfc.section.2.1"><a href="#rfc.section.2.1">2.1.</a> <a href="#header-format" id="header-format">Header Format</a></h1>
<p id="rfc.section.2.1.p.1">The header byte is broken down as follows: </p>
<pre>
0 1 2 3 4 5 6 7
+---+---+---+---+---+---+---+---+
| FLG | NLI | TID |
+---+---+---+---+---+---+---+---+
</pre>
<p>
<a id="CREF1" class="info">[CREF1]<span class="info">RQ: Eventually, when https://github.com/miekg/mmark/issues/95 is addressed, the above table should be swapped out with this: | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | |---|---|---|---|---|---|---|---| | FLG || NLI || TID ||||</span></a>
</p>
<h1 id="rfc.section.2.1.1"><a href="#rfc.section.2.1.1">2.1.1.</a> <a href="#flg-flag" id="flg-flag">FLG: Flag</a></h1>
<p id="rfc.section.2.1.1.p.1">The flag field of the header byte (<samp>FLG</samp>) is always set to the value two (or <samp>10</samp> in binary). Any frame received with these bits set to any other value else MUST NOT be considered a Spinel frame. </p>
<p id="rfc.section.2.1.1.p.2">This convention allows Spinel to be line compatible with BTLE HCI. By defining the first two bit in this way we can disambiguate between Spinel frames and HCI frames (which always start with either <samp>0x01</samp> or <samp>0x04</samp>) without any additional framing overhead. </p>
<h1 id="rfc.section.2.1.2"><a href="#rfc.section.2.1.2">2.1.2.</a> <a href="#nli-network-link-identifier" id="nli-network-link-identifier">NLI: Network Link Identifier</a></h1>
<p id="rfc.section.2.1.2.p.1">The Network Link Identifier (NLI) is a number between 0 and 3, which is associated by the OS with one of up to four IPv6 zone indices corresponding to conceptual IPv6 interfaces on the NCP. This allows the protocol to support IPv6 nodes connecting simultaneously to more than one IPv6 network link using a single NCP instance. The first Network Link Identifier (0) MUST refer to a distinguished conceptual interface provided by the NCP for its IPv6 link type. The other three Network Link Identifiers (1, 2 and 3) MAY be dissociated from any conceptual interface. </p>
<h1 id="rfc.section.2.1.3"><a href="#rfc.section.2.1.3">2.1.3.</a> <a href="#tid-transaction-identifier" id="tid-transaction-identifier">TID: Transaction Identifier</a></h1>
<p id="rfc.section.2.1.3.p.1">The least significant bits of the header represent the Transaction Identifier(TID). The TID is used for correlating responses to the commands which generated them. </p>
<p id="rfc.section.2.1.3.p.2">When a command is sent from the host, any reply to that command sent by the NCP will use the same value for the TID. When the host receives a frame that matches the TID of the command it sent, it can easily recognize that frame as the actual response to that command. </p>
<p id="rfc.section.2.1.3.p.3">The TID value of zero (0) is used for commands to which a correlated response is not expected or needed, such as for unsolicited update commands sent to the host from the NCP. </p>
<h1 id="rfc.section.2.1.4"><a href="#rfc.section.2.1.4">2.1.4.</a> <a href="#command-identifier-cmd" id="command-identifier-cmd">Command Identifier (CMD)</a></h1>
<p id="rfc.section.2.1.4.p.1">The command identifier is a 21-bit unsigned integer encoded in up to three bytes using the packed unsigned integer format described in <a href="#packed-unsigned-integer">Section 3.2</a>. This encoding allows for up to 2,097,152 individual commands, with the first 127 commands represented as a single byte. Command identifiers larger than 2,097,151 are explicitly forbidden. </p>
<table cellpadding="3" cellspacing="0" class="tt full center">
<thead>
<tr>
<th class="center">CID Range</th>
<th class="center">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="center">0 - 63</td>
<td class="center">Reserved for core commands</td>
</tr>
<tr>
<td class="center">64 - 15,359</td>
<td class="center">
<em>UNALLOCATED</em>
</td>
</tr>
<tr>
<td class="center">15,360 - 16,383</td>
<td class="center">Vendor-specific</td>
</tr>
<tr>
<td class="center">16,384 - 1,999,999</td>
<td class="center">
<em>UNALLOCATED</em>
</td>
</tr>
<tr>
<td class="center">2,000,000 - 2,097,151</td>
<td class="center">Experimental use only</td>
</tr>
</tbody>
</table>
<h1 id="rfc.section.2.1.5"><a href="#rfc.section.2.1.5">2.1.5.</a> <a href="#command-payload-optional" id="command-payload-optional">Command Payload (Optional)</a></h1>
<p id="rfc.section.2.1.5.p.1">Depending on the semantics of the command in question, a payload MAY be included in the frame. The exact composition and length of the payload is defined by the command identifier. </p>
<h1 id="rfc.section.3"><a href="#rfc.section.3">3.</a> <a href="#data-packing" id="data-packing">Data Packing</a></h1>
<p id="rfc.section.3.p.1">Data serialization for properties is performed using a light-weight data packing format which was loosely inspired by D-Bus. The format of a serialization is defined by a specially formatted string. </p>
<p id="rfc.section.3.p.2">This packing format is used for notational convenience. While this string-based datatype format has been designed so that the strings may be directly used by a structured data parser, such a thing is not required to implement Spinel. Indeed, higly constrained applications may find such a thing to be too heavyweight. </p>
<p id="rfc.section.3.p.3">Goals: </p>
<p/>
<ul>
<li>Be lightweight and favor direct representation of values.</li>
<li>Use an easily readable and memorable format string.</li>
<li>Support lists and structures.</li>
<li>Allow properties to be appended to structures while maintaining backward compatibility.</li>
</ul>
<p> </p>
<p id="rfc.section.3.p.5">Each primitive datatype has an ASCII character associated with it. Structures can be represented as strings of these characters. For example: </p>
<p/>
<ul>
<li><samp>C</samp>: A single unsigned byte.</li>
<li><samp>C6U</samp>: A single unsigned byte, followed by a 128-bit IPv6 address, followed by a zero-terminated UTF8 string.</li>
<li><samp>A(6)</samp>: An array of concatenated IPv6 addresses</li>
</ul>
<p> </p>
<p id="rfc.section.3.p.7">In each case, the data is represented exactly as described. For example, an array of 10 IPv6 address is stored as 160 bytes. </p>
<h1 id="rfc.section.3.1"><a href="#rfc.section.3.1">3.1.</a> <a href="#primitive-types" id="primitive-types">Primitive Types</a></h1>
<table cellpadding="3" cellspacing="0" class="tt full center">
<thead>
<tr>
<th class="center">Char</th>
<th class="left">Name</th>
<th class="left">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="center">
<samp>.</samp>
</td>
<td class="left">DATATYPE_VOID</td>
<td class="left">Empty data type. Used internally.</td>
</tr>
<tr>
<td class="center">
<samp>b</samp>
</td>
<td class="left">DATATYPE_BOOL</td>
<td class="left">Boolean value. Encoded in 8-bits as either 0x00 or 0x01. All other values are illegal.</td>
</tr>
<tr>
<td class="center">
<samp>C</samp>
</td>
<td class="left">DATATYPE_UINT8</td>
<td class="left">Unsigned 8-bit integer.</td>
</tr>
<tr>
<td class="center">
<samp>c</samp>
</td>
<td class="left">DATATYPE_INT8</td>
<td class="left">Signed 8-bit integer.</td>
</tr>
<tr>
<td class="center">
<samp>S</samp>
</td>
<td class="left">DATATYPE_UINT16</td>
<td class="left">Unsigned 16-bit integer.</td>
</tr>
<tr>
<td class="center">
<samp>s</samp>
</td>
<td class="left">DATATYPE_INT16</td>
<td class="left">Signed 16-bit integer.</td>
</tr>
<tr>
<td class="center">
<samp>L</samp>
</td>
<td class="left">DATATYPE_UINT32</td>
<td class="left">Unsigned 32-bit integer.</td>
</tr>
<tr>
<td class="center">
<samp>l</samp>
</td>
<td class="left">DATATYPE_INT32</td>
<td class="left">Signed 32-bit integer.</td>
</tr>
<tr>
<td class="center">
<samp>i</samp>
</td>
<td class="left">DATATYPE_UINT_PACKED</td>
<td class="left">Packed Unsigned Integer. See <a href="#packed-unsigned-integer">Section 3.2</a>.</td>
</tr>
<tr>
<td class="center">
<samp>6</samp>
</td>
<td class="left">DATATYPE_IPv6ADDR</td>
<td class="left">IPv6 Address. (Big-endian)</td>
</tr>
<tr>
<td class="center">
<samp>E</samp>
</td>
<td class="left">DATATYPE_EUI64</td>
<td class="left">EUI-64 Address. (Big-endian)</td>
</tr>
<tr>
<td class="center">
<samp>e</samp>
</td>
<td class="left">DATATYPE_EUI48</td>
<td class="left">EUI-48 Address. (Big-endian)</td>
</tr>
<tr>
<td class="center">
<samp>D</samp>
</td>
<td class="left">DATATYPE_DATA</td>
<td class="left">Arbitrary data. See <a href="#data-blobs">Section 3.3</a>.</td>
</tr>
<tr>
<td class="center">
<samp>d</samp>
</td>
<td class="left">DATATYPE_DATA_WLEN</td>
<td class="left">Arbitrary data with prepended length. See <a href="#data-blobs">Section 3.3</a>.</td>
</tr>
<tr>
<td class="center">
<samp>U</samp>
</td>
<td class="left">DATATYPE_UTF8</td>
<td class="left">Zero-terminated UTF8-encoded string.</td>
</tr>
<tr>
<td class="center">
<samp>t(...)</samp>
</td>
<td class="left">DATATYPE_STRUCT</td>
<td class="left">Structured datatype with prepended length. See <a href="#structured-data">Section 3.4</a>.</td>
</tr>
<tr>
<td class="center">
<samp>A(...)</samp>
</td>
<td class="left">DATATYPE_ARRAY</td>
<td class="left">Array of datatypes. Compound type. See <a href="#arrays">Section 3.5</a>.</td>
</tr>
</tbody>
</table>
<p id="rfc.section.3.1.p.1">All multi-byte values are little-endian unless explicitly stated otherwise. </p>
<h1 id="rfc.section.3.2"><a href="#rfc.section.3.2">3.2.</a> <a href="#packed-unsigned-integer" id="packed-unsigned-integer">Packed Unsigned Integer</a></h1>
<p id="rfc.section.3.2.p.1">For certain types of integers, such command or property identifiers, usually have a value on the wire that is less than 127. However, in order to not preclude the use of values larger than 255, we would need to add an extra byte. Doing this would add an extra byte to the majority of instances, which can add up in terms of bandwidth. </p>
<p id="rfc.section.3.2.p.2">The packed unsigned integer format is based on the <a href="https://www.w3.org/TR/exi/#encodingUnsignedInteger">unsigned integer format in EXI</a>, except that we limit the maximum value to the largest value that can be encoded into three bytes(2,097,151). </p>
<p id="rfc.section.3.2.p.3">For all values less than 127, the packed form of the number is simply a single byte which directly represents the number. For values larger than 127, the following process is used to encode the value: </p>
<p/>
<ol>
<li>The unsigned integer is broken up into <em>n</em> 7-bit chunks and placed into <em>n</em> octets, leaving the most significant bit of each octet unused.</li>
<li>Order the octets from least-significant to most-significant. (Little-endian)</li>
<li>Clear the most significant bit of the most significant octet. Set the least significant bit on all other octets.</li>
</ol>
<p> </p>
<p id="rfc.section.3.2.p.5">Where <em>n</em> is the smallest number of 7-bit chunks you can use to represent the given value. </p>
<p id="rfc.section.3.2.p.6">Take the value 1337, for example: </p>
<pre>
1337 =&gt; 0x0539
=&gt; [39 0A]
=&gt; [B9 0A]
</pre>
<p id="rfc.section.3.2.p.7">To decode the value, you collect the 7-bit chunks until you find an octet with the most significant bit clear. </p>
<h1 id="rfc.section.3.3"><a href="#rfc.section.3.3">3.3.</a> <a href="#data-blobs" id="data-blobs">Data Blobs</a></h1>
<p id="rfc.section.3.3.p.1">There are two types for data blobs: <samp>d</samp> and <samp>D</samp>. </p>
<p/>
<ul>
<li><samp>d</samp> has the length of the data (in bytes) prepended to the data (with the length encoded as type <samp>S</samp>). The size of the length field is not included in the length.</li>
<li><samp>D</samp> does not have a prepended length: the length of the data is implied by the bytes remaining to be parsed. It is an error for <samp>D</samp> to not be the last type in a type in a type signature.</li>
</ul>
<p> </p>
<p id="rfc.section.3.3.p.3">This dichotomy allows for more efficient encoding by eliminating redundency. If the rest of the buffer is a data blob, encoding the length would be redundant because we already know how many bytes are in the rest of the buffer. </p>
<p id="rfc.section.3.3.p.4">In some cases we use <samp>d</samp> even if it is the last field in a type signature. We do this to allow for us to be able to append additional fields to the type signature if necessary in the future. This is usually the case with embedded structs, like in the scan results. </p>
<p id="rfc.section.3.3.p.5">For example, let's say we have a buffer that is encoded with the datatype signature of <samp>CLLD</samp>. In this case, it is pretty easy to tell where the start and end of the data blob is: the start is 9 bytes from the start of the buffer, and its length is the length of the buffer minus 9. (9 is the number of bytes taken up by a byte and two longs) </p>
<p id="rfc.section.3.3.p.6">The datatype signature <samp>CLLDU</samp> is illegal because we can't determine where the last field (a zero-terminated UTF8 string) starts. But the datatype <samp>CLLdU</samp> <em>is</em> legal, because the parser can determine the exact length of the data blob-- allowing it to know where the start of the next field would be. </p>
<h1 id="rfc.section.3.4"><a href="#rfc.section.3.4">3.4.</a> <a href="#structured-data" id="structured-data">Structured Data</a></h1>
<p id="rfc.section.3.4.p.1">The structure data type (<samp>t(...)</samp>) is a way of bundling together several fields into a single structure. It can be thought of as a <samp>d</samp> type except that instead of being opaque, the fields in the content are known. This is useful for things like scan results where you have substructures which are defined by different layers. </p>
<p id="rfc.section.3.4.p.2">For example, consider the type signature <samp>Lt(ES)t(6C)</samp>. In this hypothetical case, the first struct is defined by the MAC layer, and the second struct is defined by the PHY layer. Because of the use of structures, we know exactly what part comes from that layer. Additionally, we can add fields to each structure without introducing backward compatability problems: Data encoded as <samp>Lt(ESU)t(6C)</samp> (Notice the extra <samp>U</samp>) will decode just fine as <samp>Lt(ES)t(6C)</samp>. Additionally, if we don't care about the MAC layer and only care about the network layer, we could parse as <samp>Lt()t(6C)</samp>. </p>
<p id="rfc.section.3.4.p.3">Note that data encoded as <samp>Lt(ES)t(6C)</samp> will also parse as <samp>Ldd</samp>, with the structures from both layers now being opaque data blobs. </p>
<h1 id="rfc.section.3.5"><a href="#rfc.section.3.5">3.5.</a> <a href="#arrays" id="arrays">Arrays</a></h1>
<p id="rfc.section.3.5.p.1">An array is simply a concatenated set of <em>n</em> data encodings. For example, the type <samp>A(6)</samp> is simply a list of IPv6 addresses---one after the other. The type <samp>A(6E)</samp> likewise a concatenation of IPv6-address/EUI-64 pairs. </p>
<p id="rfc.section.3.5.p.2">If an array contains many fields, the fields will often be surrounded by a structure (<samp>t(...)</samp>). This effectively prepends each item in the array with its length. This is useful for improving parsing performance or to allow additional fields to be added in the future in a backward compatible way. If there is a high certainty that additional fields will never be added, the struct may be omitted (saving two bytes per item). </p>
<p id="rfc.section.3.5.p.3">This specification does not define a way to embed an array as a field alongside other fields. </p>
<h1 id="rfc.section.4"><a href="#rfc.section.4">4.</a> <a href="#commands" id="commands">Commands</a></h1>
<h1 id="rfc.section.4.1"><a href="#rfc.section.4.1">4.1.</a> <a href="#cmd-noop" id="cmd-noop">CMD 0: (Host-&gt;NCP) CMD_NOOP</a></h1>
<table cellpadding="3" cellspacing="0" class="tt full center">
<thead>
<tr>
<th class="center">Octets:</th>
<th class="center">1</th>
<th class="center">1</th>
</tr>
</thead>
<tbody>
<tr>
<td class="center">Fields:</td>
<td class="center">HEADER</td>
<td class="center">CMD_NOOP</td>
</tr>
</tbody>
</table>
<p id="rfc.section.4.1.p.1">No-Operation command. Induces the NCP to send a success status back to the host. This is primarily used for liveliness checks. </p>
<p id="rfc.section.4.1.p.2">The command payload for this command SHOULD be empty. The receiver MUST ignore any non-empty command payload. </p>
<p id="rfc.section.4.1.p.3">There is no error condition for this command. </p>
<h1 id="rfc.section.4.2"><a href="#rfc.section.4.2">4.2.</a> <a href="#cmd-reset" id="cmd-reset">CMD 1: (Host-&gt;NCP) CMD_RESET</a></h1>
<table cellpadding="3" cellspacing="0" class="tt full center">
<thead>
<tr>
<th class="center">Octets:</th>
<th class="center">1</th>
<th class="center">1</th>
</tr>
</thead>
<tbody>
<tr>
<td class="center">Fields:</td>
<td class="center">HEADER</td>
<td class="center">CMD_RESET</td>
</tr>
</tbody>
</table>
<p id="rfc.section.4.2.p.1">Reset NCP command. Causes the NCP to perform a software reset. Due to the nature of this command, the TID is ignored. The host should instead wait for a <samp>CMD_PROP_VALUE_IS</samp> command from the NCP indicating <samp>PROP_LAST_STATUS</samp> has been set to <samp>STATUS_RESET_SOFTWARE</samp>. </p>
<p id="rfc.section.4.2.p.2">The command payload for this command SHOULD be empty. The receiver MUST ignore any non-empty command payload. </p>
<p id="rfc.section.4.2.p.3">If an error occurs, the value of <samp>PROP_LAST_STATUS</samp> will be emitted instead with the value set to the generated status code for the error. </p>
<h1 id="rfc.section.4.3"><a href="#rfc.section.4.3">4.3.</a> <a href="#cmd-prop-value-get" id="cmd-prop-value-get">CMD 2: (Host-&gt;NCP) CMD_PROP_VALUE_GET</a></h1>
<table cellpadding="3" cellspacing="0" class="tt full center">
<thead>
<tr>
<th class="center">Octets:</th>
<th class="center">1</th>
<th class="center">1</th>
<th class="center">1-3</th>
</tr>
</thead>
<tbody>
<tr>
<td class="center">Fields:</td>
<td class="center">HEADER</td>
<td class="center">CMD_PROP_VALUE_GET</td>
<td class="center">PROP_ID</td>
</tr>
</tbody>
</table>
<p id="rfc.section.4.3.p.1">Get property value command. Causes the NCP to emit a <samp>CMD_PROP_VALUE_IS</samp> command for the given property identifier. </p>
<p id="rfc.section.4.3.p.2">The payload for this command is the property identifier encoded in the packed unsigned integer format described in <a href="#packed-unsigned-integer">Section 3.2</a>. </p>
<p id="rfc.section.4.3.p.3">If an error occurs, the value of <samp>PROP_LAST_STATUS</samp> will be emitted instead with the value set to the generated status code for the error. </p>
<h1 id="rfc.section.4.4"><a href="#rfc.section.4.4">4.4.</a> <a href="#cmd-prop-value-set" id="cmd-prop-value-set">CMD 3: (Host-&gt;NCP) CMD_PROP_VALUE_SET</a></h1>
<table cellpadding="3" cellspacing="0" class="tt full center">
<thead>
<tr>
<th class="center">Octets:</th>
<th class="center">1</th>
<th class="center">1</th>
<th class="center">1-3</th>
<th class="center">n</th>
</tr>
</thead>
<tbody>
<tr>
<td class="center">Fields:</td>
<td class="center">HEADER</td>
<td class="center">CMD_PROP_VALUE_SET</td>
<td class="center">PROP_ID</td>
<td class="center">VALUE</td>
</tr>
</tbody>
</table>
<p id="rfc.section.4.4.p.1">Set property value command. Instructs the NCP to set the given property to the specific given value, replacing any previous value. </p>
<p id="rfc.section.4.4.p.2">The payload for this command is the property identifier encoded in the packed unsigned integer format described in <a href="#packed-unsigned-integer">Section 3.2</a>, followed by the property value. The exact format of the property value is defined by the property. </p>
<p id="rfc.section.4.4.p.3">If an error occurs, the value of <samp>PROP_LAST_STATUS</samp> will be emitted with the value set to the generated status code for the error. </p>
<h1 id="rfc.section.4.5"><a href="#rfc.section.4.5">4.5.</a> <a href="#cmd-prop-value-insert" id="cmd-prop-value-insert">CMD 4: (Host-&gt;NCP) CMD_PROP_VALUE_INSERT</a></h1>
<table cellpadding="3" cellspacing="0" class="tt full center">
<thead>
<tr>
<th class="center">Octets:</th>
<th class="center">1</th>
<th class="center">1</th>
<th class="center">1-3</th>
<th class="center">n</th>
</tr>
</thead>
<tbody>
<tr>
<td class="center">Fields:</td>
<td class="center">HEADER</td>
<td class="center">CMD_PROP_VALUE_INSERT</td>
<td class="center">PROP_ID</td>
<td class="center">VALUE</td>
</tr>
</tbody>
</table>
<p id="rfc.section.4.5.p.1">Insert value into property command. Instructs the NCP to insert the given value into a list-oriented property, without removing other items in the list. The resulting order of items in the list is defined by the individual property being operated on. </p>
<p id="rfc.section.4.5.p.2">The payload for this command is the property identifier encoded in the packed unsigned integer format described in <a href="#packed-unsigned-integer">Section 3.2</a>, followed by the value to be inserted. The exact format of the value is defined by the property. </p>
<p id="rfc.section.4.5.p.3">If the type signature of the property specified by <samp>PROP_ID</samp> consists of a single structure enclosed by an array (<samp>A(t(...))</samp>), then the contents of <samp>VALUE</samp> MUST contain the contents of the structure (<samp>...</samp>) rather than the serialization of the whole item (<samp>t(...)</samp>). Specifically, the length of the structure MUST NOT be prepended to <samp>VALUE</samp>. This helps to eliminate redundant data. </p>
<p id="rfc.section.4.5.p.4">If an error occurs, the value of <samp>PROP_LAST_STATUS</samp> will be emitted with the value set to the generated status code for the error. </p>
<h1 id="rfc.section.4.6"><a href="#rfc.section.4.6">4.6.</a> <a href="#cmd-prop-value-remove" id="cmd-prop-value-remove">CMD 5: (Host-&gt;NCP) CMD_PROP_VALUE_REMOVE</a></h1>
<table cellpadding="3" cellspacing="0" class="tt full center">
<thead>
<tr>
<th class="center">Octets:</th>
<th class="center">1</th>
<th class="center">1</th>
<th class="center">1-3</th>
<th class="center">n</th>
</tr>
</thead>
<tbody>
<tr>
<td class="center">Fields:</td>
<td class="center">HEADER</td>
<td class="center">CMD_PROP_VALUE_REMOVE</td>
<td class="center">PROP_ID</td>
<td class="center">VALUE</td>
</tr>
</tbody>
</table>
<p id="rfc.section.4.6.p.1">Remove value from property command. Instructs the NCP to remove the given value from a list-oriented property, without affecting other items in the list. The resulting order of items in the list is defined by the individual property being operated on. </p>
<p id="rfc.section.4.6.p.2">Note that this command operates <em>by value</em>, not by index! </p>
<p id="rfc.section.4.6.p.3">The payload for this command is the property identifier encoded in the packed unsigned integer format described in <a href="#packed-unsigned-integer">Section 3.2</a>, followed by the value to be removed. The exact format of the value is defined by the property. </p>
<p id="rfc.section.4.6.p.4">If the type signature of the property specified by <samp>PROP_ID</samp> consists of a single structure enclosed by an array (<samp>A(t(...))</samp>), then the contents of <samp>VALUE</samp> MUST contain the contents of the structure (<samp>...</samp>) rather than the serialization of the whole item (<samp>t(...)</samp>). Specifically, the length of the structure MUST NOT be prepended to <samp>VALUE</samp>. This helps to eliminate redundant data. </p>
<p id="rfc.section.4.6.p.5">If an error occurs, the value of <samp>PROP_LAST_STATUS</samp> will be emitted with the value set to the generated status code for the error. </p>
<h1 id="rfc.section.4.7"><a href="#rfc.section.4.7">4.7.</a> <a href="#cmd-prop-value-is" id="cmd-prop-value-is">CMD 6: (NCP-&gt;Host) CMD_PROP_VALUE_IS</a></h1>
<table cellpadding="3" cellspacing="0" class="tt full center">
<thead>
<tr>
<th class="center">Octets:</th>
<th class="center">1</th>
<th class="center">1</th>
<th class="center">1-3</th>
<th class="center">n</th>
</tr>
</thead>
<tbody>
<tr>
<td class="center">Fields:</td>
<td class="center">HEADER</td>
<td class="center">CMD_PROP_VALUE_IS</td>
<td class="center">PROP_ID</td>
<td class="center">VALUE</td>
</tr>
</tbody>
</table>
<p id="rfc.section.4.7.p.1">Property value notification command. This command can be sent by the NCP in response to a previous command from the host, or it can be sent by the NCP in an unsolicited fashion to notify the host of various state changes asynchronously. </p>
<p id="rfc.section.4.7.p.2">The payload for this command is the property identifier encoded in the packed unsigned integer format described in <a href="#packed-unsigned-integer">Section 3.2</a>, followed by the current value of the given property. </p>
<h1 id="rfc.section.4.8"><a href="#rfc.section.4.8">4.8.</a> <a href="#cmd-prop-value-inserted" id="cmd-prop-value-inserted">CMD 7: (NCP-&gt;Host) CMD_PROP_VALUE_INSERTED</a></h1>
<table cellpadding="3" cellspacing="0" class="tt full center">
<thead>
<tr>
<th class="center">Octets:</th>
<th class="center">1</th>
<th class="center">1</th>
<th class="center">1-3</th>
<th class="center">n</th>
</tr>
</thead>
<tbody>
<tr>
<td class="center">Fields:</td>
<td class="center">HEADER</td>
<td class="center">CMD_PROP_VALUE_INSERTED</td>
<td class="center">PROP_ID</td>
<td class="center">VALUE</td>
</tr>
</tbody>
</table>
<p id="rfc.section.4.8.p.1">Property value insertion notification command. This command can be sent by the NCP in response to the <samp>CMD_PROP_VALUE_INSERT</samp> command, or it can be sent by the NCP in an unsolicited fashion to notify the host of various state changes asynchronously. </p>
<p id="rfc.section.4.8.p.2">The payload for this command is the property identifier encoded in the packed unsigned integer format described in <a href="#packed-unsigned-integer">Section 3.2</a>, followed by the value that was inserted into the given property. </p>
<p id="rfc.section.4.8.p.3">If the type signature of the property specified by <samp>PROP_ID</samp> consists of a single structure enclosed by an array (<samp>A(t(...))</samp>), then the contents of <samp>VALUE</samp> MUST contain the contents of the structure (<samp>...</samp>) rather than the serialization of the whole item (<samp>t(...)</samp>). Specifically, the length of the structure MUST NOT be prepended to <samp>VALUE</samp>. This helps to eliminate redundant data. </p>
<p id="rfc.section.4.8.p.4">The resulting order of items in the list is defined by the given property. </p>
<h1 id="rfc.section.4.9"><a href="#rfc.section.4.9">4.9.</a> <a href="#cmd-prop-value-removed" id="cmd-prop-value-removed">CMD 8: (NCP-&gt;Host) CMD_PROP_VALUE_REMOVED</a></h1>
<table cellpadding="3" cellspacing="0" class="tt full center">
<thead>
<tr>
<th class="center">Octets:</th>
<th class="center">1</th>
<th class="center">1</th>
<th class="center">1-3</th>
<th class="center">n</th>
</tr>
</thead>
<tbody>
<tr>
<td class="center">Fields:</td>
<td class="center">HEADER</td>
<td class="center">CMD_PROP_VALUE_REMOVED</td>
<td class="center">PROP_ID</td>
<td class="center">VALUE</td>
</tr>
</tbody>
</table>
<p id="rfc.section.4.9.p.1">Property value removal notification command. This command can be sent by the NCP in response to the <samp>CMD_PROP_VALUE_REMOVE</samp> command, or it can be sent by the NCP in an unsolicited fashion to notify the host of various state changes asynchronously. </p>
<p id="rfc.section.4.9.p.2">Note that this command operates <em>by value</em>, not by index! </p>
<p id="rfc.section.4.9.p.3">The payload for this command is the property identifier encoded in the packed unsigned integer format described in <a href="#packed-unsigned-integer">Section 3.2</a>, followed by the value that was removed from the given property. </p>
<p id="rfc.section.4.9.p.4">If the type signature of the property specified by <samp>PROP_ID</samp> consists of a single structure enclosed by an array (<samp>A(t(...))</samp>), then the contents of <samp>VALUE</samp> MUST contain the contents of the structure (<samp>...</samp>) rather than the serialization of the whole item (<samp>t(...)</samp>). Specifically, the length of the structure MUST NOT be prepended to <samp>VALUE</samp>. This helps to eliminate redundant data. </p>
<p id="rfc.section.4.9.p.5">The resulting order of items in the list is defined by the given property. </p>
<h1 id="rfc.section.4.10"><a href="#rfc.section.4.10">4.10.</a> <a href="#cmd-peek" id="cmd-peek">CMD 18: (Host-&gt;NCP) CMD_PEEK</a></h1>
<table cellpadding="3" cellspacing="0" class="tt full center">
<thead>
<tr>
<th class="center">Octets:</th>
<th class="center">1</th>
<th class="center">1</th>
<th class="center">4</th>
<th class="center">2</th>
</tr>
</thead>
<tbody>
<tr>
<td class="center">Fields:</td>
<td class="center">HEADER</td>
<td class="center">CMD_PEEK</td>
<td class="center">ADDRESS</td>
<td class="center">COUNT</td>
</tr>
</tbody>
</table>
<p id="rfc.section.4.10.p.1">This command allows the NCP to fetch values from the RAM of the NCP for debugging purposes. Upon success, <samp>CMD_PEEK_RET</samp> is sent from the NCP to the host. Upon failure, <samp>PROP_LAST_STATUS</samp> is emitted with the appropriate error indication. </p>
<p id="rfc.section.4.10.p.2">Due to the low-level nature of this command, certain error conditions may induce the NCP to reset. </p>
<p id="rfc.section.4.10.p.3">The NCP MAY prevent certain regions of memory from being accessed. </p>
<p id="rfc.section.4.10.p.4">The implementation of this command has security implications. See <a href="#security-considerations">Section 13</a> for more information. </p>
<p id="rfc.section.4.10.p.5">This command requires the capability <samp>CAP_PEEK_POKE</samp> to be present. </p>
<h1 id="rfc.section.4.11"><a href="#rfc.section.4.11">4.11.</a> <a href="#cmd-peek-ret" id="cmd-peek-ret">CMD 19: (NCP-&gt;Host) CMD_PEEK_RET</a></h1>
<table cellpadding="3" cellspacing="0" class="tt full center">
<thead>
<tr>
<th class="center">Octets:</th>
<th class="center">1</th>
<th class="center">1</th>
<th class="center">4</th>
<th class="center">2</th>
<th class="center">n</th>
</tr>
</thead>
<tbody>
<tr>
<td class="center">Fields:</td>
<td class="center">HEADER</td>
<td class="center">CMD_PEEK_RET</td>
<td class="center">ADDRESS</td>
<td class="center">COUNT</td>
<td class="center">BYTES</td>
</tr>
</tbody>
</table>
<p id="rfc.section.4.11.p.1">This command contains the contents of memory that was requested by a previous call to <samp>CMD_PEEK</samp>. </p>
<p id="rfc.section.4.11.p.2">This command requires the capability <samp>CAP_PEEK_POKE</samp> to be present. </p>
<h1 id="rfc.section.4.12"><a href="#rfc.section.4.12">4.12.</a> <a href="#cmd-poke" id="cmd-poke">CMD 20: (Host-&gt;NCP) CMD_POKE</a></h1>
<table cellpadding="3" cellspacing="0" class="tt full center">
<thead>
<tr>
<th class="center">Octets:</th>
<th class="center">1</th>
<th class="center">1</th>
<th class="center">4</th>
<th class="center">2</th>
<th class="center">n</th>
</tr>
</thead>
<tbody>
<tr>
<td class="center">Fields:</td>
<td class="center">HEADER</td>
<td class="center">CMD_POKE</td>
<td class="center">ADDRESS</td>
<td class="center">COUNT</td>
<td class="center">BYTES</td>
</tr>
</tbody>
</table>
<p id="rfc.section.4.12.p.1">This command writes the bytes to the specified memory address for debugging purposes. </p>
<p id="rfc.section.4.12.p.2">Due to the low-level nature of this command, certain error conditions may induce the NCP to reset. </p>
<p id="rfc.section.4.12.p.3">The implementation of this command has security implications. See <a href="#security-considerations">Section 13</a> for more information. </p>
<p id="rfc.section.4.12.p.4">This command requires the capability <samp>CAP_PEEK_POKE</samp> to be present. </p>
<h1 id="rfc.section.4.13"><a href="#rfc.section.4.13">4.13.</a> <a href="#cmd-prop-value-multi-get" id="cmd-prop-value-multi-get">CMD 21: (Host-&gt;NCP) CMD_PROP_VALUE_MULTI_GET</a></h1>
<p/>
<ul>
<li>Argument-Encoding: <samp>A(i)</samp></li>
<li>Required Capability: <samp>CAP_CMD_MULTI</samp></li>
</ul>
<p> </p>
<p id="rfc.section.4.13.p.2">Fetch the value of multiple properties in one command. Arguments are an array of property IDs. If all properties are fetched successfully, a <samp>CMD_PROP_VALUES_ARE</samp> command is sent back to the host containing the propertyid and value of each fetched property. The order of the results in <samp>CMD_PROP_VALUES_ARE</samp> match the order of properties given in <samp>CMD_PROP_VALUE_GET</samp>. </p>
<p id="rfc.section.4.13.p.3">Errors fetching individual properties are reflected as indicating a change to <samp>PROP_LAST_STATUS</samp> for that property's place. </p>
<p id="rfc.section.4.13.p.4">Not all properties can be fetched using this method. As a general rule of thumb, any property that blocks when getting will fail for that individual property with <samp>STATUS_INVALID_COMMAND_FOR_PROP</samp>. </p>
<h1 id="rfc.section.4.14"><a href="#rfc.section.4.14">4.14.</a> <a href="#cmd-prop-value-multi-set" id="cmd-prop-value-multi-set">CMD 22: (Host-&gt;NCP) CMD_PROP_VALUE_MULTI_SET</a></h1>
<p/>
<ul>
<li>Argument-Encoding: <samp>A(iD)</samp></li>
<li>Required Capability: <samp>CAP_CMD_MULTI</samp></li>
</ul>
<p> </p>
<table cellpadding="3" cellspacing="0" class="tt full center">
<thead>
<tr>
<th class="center">Octets:</th>
<th class="center">1</th>
<th class="center">1</th>
<th class="center">n</th>
</tr>
</thead>
<tbody>
<tr>
<td class="center">Fields:</td>
<td class="center">HEADER</td>
<td class="center">CMD_PROP_VALUE_MULTI_SET</td>
<td class="center">Property/Value Pairs</td>
</tr>
</tbody>
</table>
<p id="rfc.section.4.14.p.2">With each property/value pair being: </p>
<table cellpadding="3" cellspacing="0" class="tt full center">
<thead>
<tr>
<th class="center">Octets:</th>
<th class="center">2</th>
<th class="center">1-3</th>
<th class="center">n</th>
</tr>
</thead>
<tbody>
<tr>
<td class="center">Fields:</td>
<td class="center">LENGTH</td>
<td class="center">PROP_ID</td>
<td class="center">PROP_VALUE</td>
</tr>
</tbody>
</table>
<p id="rfc.section.4.14.p.3">This command sets the value of several properties at once in the given order. The setting of properties stops at the first error, ignoring any later properties. </p>
<p id="rfc.section.4.14.p.4">The result of this command is generally <samp>CMD_PROP_VALUES_ARE</samp> unless (for example) a parsing error has occured (in which case <samp>CMD_PROP_VALUE_IS</samp> for <samp>PROP_LAST_STATUS</samp> would be the result). The order of the results in <samp>CMD_PROP_VALUES_ARE</samp> match the order of properties given in <samp>CMD_PROP_VALUE_MULTI_SET</samp>. </p>
<p id="rfc.section.4.14.p.5">Since the processing of properties to set stops at the first error, the resulting <samp>CMD_PROP_VALUES_ARE</samp> can contain fewer items than the requested number of properties to set. </p>
<p id="rfc.section.4.14.p.6">Not all properties can be set using this method. As a general rule of thumb, any property that blocks when setting will fail for that individual property with <samp>STATUS_INVALID_COMMAND_FOR_PROP</samp>. </p>
<h1 id="rfc.section.4.15"><a href="#rfc.section.4.15">4.15.</a> <a href="#cmd-prop-values-are" id="cmd-prop-values-are">CMD 23: (NCP-&gt;Host) CMD_PROP_VALUES_ARE</a></h1>
<p/>
<ul>
<li>Argument-Encoding: <samp>A(iD)</samp></li>
<li>Required Capability: <samp>CAP_CMD_MULTI</samp></li>
</ul>
<p> </p>
<table cellpadding="3" cellspacing="0" class="tt full center">
<thead>
<tr>
<th class="center">Octets:</th>
<th class="center">1</th>
<th class="center">1</th>
<th class="center">n</th>
</tr>
</thead>
<tbody>
<tr>
<td class="center">Fields:</td>
<td class="center">HEADER</td>
<td class="center">CMD_PROP_VALUES_ARE</td>
<td class="center">Property/Value Pairs</td>
</tr>
</tbody>
</table>
<p id="rfc.section.4.15.p.2">With each property/value pair being: </p>
<table cellpadding="3" cellspacing="0" class="tt full center">
<thead>
<tr>
<th class="center">Octets:</th>
<th class="center">2</th>
<th class="center">1-3</th>
<th class="center">n</th>
</tr>
</thead>
<tbody>
<tr>
<td class="center">Fields:</td>
<td class="center">LENGTH</td>
<td class="center">PROP_ID</td>
<td class="center">PROP_VALUE</td>
</tr>
</tbody>
</table>
<p id="rfc.section.4.15.p.3">This command is emitted by the NCP as the response to both the <samp>CMD_PROP_VALUE_MULTI_GET</samp> and <samp>CMD_PROP_VALUE_MULTI_SET</samp> commands. It is roughly analogous to <samp>CMD_PROP_VALUE_IS</samp>, except that it contains more than one property. </p>
<p id="rfc.section.4.15.p.4">This command SHOULD NOT be emitted asynchronously, or in response to any command other than <samp>CMD_PROP_VALUE_MULTI_GET</samp> or <samp>CMD_PROP_VALUE_MULTI_SET</samp>. </p>
<p id="rfc.section.4.15.p.5">The arguments are a list of structures containing the emitted property and the associated value. These are presented in the same order as given in the associated initiating command. In cases where getting or setting a specific property resulted in an error, the associated slot in this command will describe <samp>PROP_LAST_STATUS</samp>. </p>
<h1 id="rfc.section.5"><a href="#rfc.section.5">5.</a> <a href="#properties" id="properties">Properties</a></h1>
<p id="rfc.section.5.p.1">Spinel is largely a property-based protocol, similar to representational state transfer (REST), with a property defined for every attribute that an OS needs to create, read, update or delete in the function of an IPv6 interface. The inspiration of this approach was memory-mapped hardware registers for peripherals. The goal is to avoid, as much as possible, the use of large complicated structures and/or method argument lists. The reason for avoiding these is because they have a tendency to change, especially early in development. Adding or removing a property from a structure can render the entire protocol incompatible. By using properties, you simply extend the protocol with an additional property. </p>
<p id="rfc.section.5.p.2">Almost all features and capabilities are implemented using properties. Most new features that are initially proposed as commands can be adapted to be property-based instead. Notable exceptions include "Host Buffer Offload" (<a href="#feature-host-buffer-offload">Section 9</a>) and "Network Save" (<a href="#feature-network-save">Section 8</a>). </p>
<p id="rfc.section.5.p.3">In Spinel, properties are keyed by an unsigned integer between 0 and 2,097,151 (See <a href="#packed-unsigned-integer">Section 3.2</a>). </p>
<h1 id="rfc.section.5.1"><a href="#rfc.section.5.1">5.1.</a> <a href="#property-methods" id="property-methods">Property Methods</a></h1>
<p id="rfc.section.5.1.p.1">Properties may support one or more of the following methods: </p>
<p/>
<ul>
<li><samp>VALUE_GET</samp> (<a href="#cmd-prop-value-get">Section 4.3</a>)</li>
<li><samp>VALUE_SET</samp> (<a href="#cmd-prop-value-set">Section 4.4</a>)</li>
<li><samp>VALUE_INSERT</samp> (<a href="#cmd-prop-value-insert">Section 4.5</a>)</li>
<li><samp>VALUE_REMOVE</samp> (<a href="#cmd-prop-value-remove">Section 4.6</a>)</li>
</ul>
<p> </p>
<p id="rfc.section.5.1.p.3">Additionally, the NCP can send updates to the host (either synchronously or asynchronously) that inform the host about changes to specific properties: </p>
<p/>
<ul>
<li><samp>VALUE_IS</samp> (<a href="#cmd-prop-value-is">Section 4.7</a>)</li>
<li><samp>VALUE_INSERTED</samp> (<a href="#cmd-prop-value-inserted">Section 4.8</a>)</li>
<li><samp>VALUE_REMOVED</samp> (<a href="#cmd-prop-value-removed">Section 4.9</a>)</li>
</ul>
<p> </p>
<h1 id="rfc.section.5.2"><a href="#rfc.section.5.2">5.2.</a> <a href="#property-types" id="property-types">Property Types</a></h1>
<p id="rfc.section.5.2.p.1">Conceptually, there are three different types of properties: </p>
<p/>
<ul>
<li>Single-value properties</li>
<li>Multiple-value (Array) properties</li>
<li>Stream properties</li>
</ul>
<p> </p>
<h1 id="rfc.section.5.2.1"><a href="#rfc.section.5.2.1">5.2.1.</a> <a href="#singlevalue-properties" id="singlevalue-properties">Single-Value Properties</a></h1>
<p id="rfc.section.5.2.1.p.1">Single-value properties are properties that have a simple representation of a single value. Examples would be: </p>
<p/>
<ul>
<li>Current radio channel (Represented as an unsigned 8-bit integer)</li>
<li>Network name (Represented as a UTF-8 encoded string)</li>
<li>802.15.4 PAN ID (Represented as an unsigned 16-bit integer)</li>
</ul>
<p> </p>
<p id="rfc.section.5.2.1.p.3">The valid operations on these sorts of properties are <samp>GET</samp> and <samp>SET</samp>. </p>
<h1 id="rfc.section.5.2.2"><a href="#rfc.section.5.2.2">5.2.2.</a> <a href="#multiplevalue-properties" id="multiplevalue-properties">Multiple-Value Properties</a></h1>
<p id="rfc.section.5.2.2.p.1">Multiple-Value Properties have more than one value associated with them. Examples would be: </p>
<p/>
<ul>
<li>List of channels supported by the radio hardware.</li>
<li>List of IPv6 addresses assigned to the interface.</li>
<li>List of capabilities supported by the NCP.</li>
</ul>
<p> </p>
<p id="rfc.section.5.2.2.p.3">The valid operations on these sorts of properties are <samp>VALUE_GET</samp>, <samp>VALUE_SET</samp>, <samp>VALUE_INSERT</samp>, and <samp>VALUE_REMOVE</samp>. </p>
<p id="rfc.section.5.2.2.p.4">When the value is fetched using <samp>VALUE_GET</samp>, the returned value is the concatenation of all of the individual values in the list. If the length of the value for an individual item in the list is not defined by the type then each item returned in the list is prepended with a length (See <a href="#arrays">Section 3.5</a>). The order of the returned items, unless explicitly defined for that specific property, is undefined. </p>
<p><samp>VALUE_SET</samp> provides a way to completely replace all previous values. Calling <samp>VALUE_SET</samp> with an empty value effectively instructs the NCP to clear the value of that property. </p>
<p><samp>VALUE_INSERT</samp> and <samp>VALUE_REMOVE</samp> provide mechanisms for the insertion or removal of individual items <em>by value</em>. The payload for these commands is a plain single value. </p>
<h1 id="rfc.section.5.2.3"><a href="#rfc.section.5.2.3">5.2.3.</a> <a href="#stream-properties" id="stream-properties">Stream Properties</a></h1>
<p id="rfc.section.5.2.3.p.1">Stream properties are special properties representing streams of data. Examples would be: </p>
<p/>
<ul>
<li>Network packet stream (<a href="#prop-stream-net">Section 5.6.3</a>)</li>
<li>Raw packet stream (<a href="#prop-stream-raw">Section 5.6.2</a>)</li>
<li>Debug message stream (<a href="#prop-stream-debug">Section 5.6.1</a>)</li>
<li>Network Beacon stream (<a href="#prop-mac-scan-beacon">Section 5.8.4</a>)</li>
</ul>
<p> </p>
<p id="rfc.section.5.2.3.p.3">All such properties emit changes asynchronously using the <samp>VALUE_IS</samp> command, sent from the NCP to the host. For example, as IPv6 traffic is received by the NCP, the IPv6 packets are sent to the host by way of asynchronous <samp>VALUE_IS</samp> notifications. </p>
<p id="rfc.section.5.2.3.p.4">Some of these properties also support the host send data back to the NCP. For example, this is how the host sends IPv6 traffic to the NCP. </p>
<p id="rfc.section.5.2.3.p.5">These types of properties generally do not support <samp>VALUE_GET</samp>, as it is meaningless. </p>
<h1 id="rfc.section.5.3"><a href="#rfc.section.5.3">5.3.</a> <a href="#property-numbering" id="property-numbering">Property Numbering</a></h1>
<p id="rfc.section.5.3.p.1">While the majority of the properties that allow the configuration of network connectivity are network protocol specific, there are several properties that are required in all implementations. </p>
<p id="rfc.section.5.3.p.2">Future property allocations SHALL be made from the following allocation plan: </p>
<table cellpadding="3" cellspacing="0" class="tt full center">
<thead>
<tr>
<th class="left">Property ID Range</th>
<th class="left">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="left">0 - 127</td>
<td class="left">Reserved for frequently-used properties</td>
</tr>
<tr>
<td class="left">128 - 15,359</td>
<td class="left">Unallocated</td>
</tr>
<tr>
<td class="left">15,360 - 16,383</td>
<td class="left">Vendor-specific</td>
</tr>
<tr>
<td class="left">16,384 - 1,999,999</td>
<td class="left">Unallocated</td>
</tr>
<tr>
<td class="left">2,000,000 - 2,097,151</td>
<td class="left">Experimental use only</td>
</tr>
</tbody>
</table>
<p id="rfc.section.5.3.p.3">For an explanation of the data format encoding shorthand used throughout this document, see <a href="#data-packing">Section 3</a>. </p>
<h1 id="rfc.section.5.4"><a href="#rfc.section.5.4">5.4.</a> <a href="#property-sections" id="property-sections">Property Sections</a></h1>
<p id="rfc.section.5.4.p.1">The currently assigned properties are broken up into several sections, each with reserved ranges of property identifiers. These ranges are: </p>
<table cellpadding="3" cellspacing="0" class="tt full center">
<thead>
<tr>
<th class="center">Name</th>
<th class="center">Range (Inclusive)</th>
<th class="center">Documentation</th>
</tr>
</thead>
<tbody>
<tr>
<td class="center">Core</td>
<td class="center">0x00 - 0x1F, 0x1000 - 0x11FF</td>
<td class="center">
<a href="#prop-core">Section 5.5</a>
</td>
</tr>
<tr>
<td class="center">PHY</td>
<td class="center">0x20 - 0x2F, 0x1200 - 0x12FF</td>
<td class="center">
<a href="#prop-phy">Section 5.7</a>
</td>
</tr>
<tr>
<td class="center">MAC</td>
<td class="center">0x30 - 0x3F, 0x1300 - 0x13FF</td>
<td class="center">
<a href="#prop-mac">Section 5.8</a>
</td>
</tr>
<tr>
<td class="center">NET</td>
<td class="center">0x40 - 0x4F, 0x1400 - 0x14FF</td>
<td class="center">
<a href="#prop-net">Section 5.9</a>
</td>
</tr>
<tr>
<td class="center">Tech</td>
<td class="center">0x50 - 0x5F, 0x1500 - 0x15FF</td>
<td class="center">Technology-specific</td>
</tr>
<tr>
<td class="center">IPv6</td>
<td class="center">0x60 - 0x6F, 0x1600 - 0x16FF</td>
<td class="center">
<a href="#prop-ipv6">Section 5.10</a>
</td>
</tr>
<tr>
<td class="center">Stream</td>
<td class="center">0x70 - 0x7F, 0x1700 - 0x17FF</td>
<td class="center">
<a href="#prop-core">Section 5.5</a>
</td>
</tr>
<tr>
<td class="center">Debug</td>
<td class="center">0x4000 - 0x4400</td>
<td class="center">
<a href="#prop-debug">Section 5.11</a>
</td>
</tr>
</tbody>
</table>
<p id="rfc.section.5.4.p.2">Note that some of the property sections have two reserved ranges: a primary range (which is encoded as a single byte) and an extended range (which is encoded as two bytes). properties which are used more frequently are generally allocated from the former range. </p>
<h1 id="rfc.section.5.5"><a href="#rfc.section.5.5">5.5.</a> <a href="#prop-core" id="prop-core">Core Properties</a></h1>
<h1 id="rfc.section.5.5.1"><a href="#rfc.section.5.5.1">5.5.1.</a> <a href="#prop-last-status" id="prop-last-status">PROP 0: PROP_LAST_STATUS</a></h1>
<p/>
<ul>
<li>Type: Read-Only</li>
<li>Encoding: <samp>i</samp></li>
</ul>
<p> </p>
<table cellpadding="3" cellspacing="0" class="tt full center">
<thead>
<tr>
<th class="right">Octets:</th>
<th class="center">1-3</th>
</tr>
</thead>
<tbody>
<tr>
<td class="right">Fields:</td>
<td class="center">LAST_STATUS</td>
</tr>
</tbody>
</table>
<p id="rfc.section.5.5.1.p.2">Describes the status of the last operation. Encoded as a packed unsigned integer. </p>
<p id="rfc.section.5.5.1.p.3">This property is emitted often to indicate the result status of pretty much any Host-to-NCP operation. </p>
<p id="rfc.section.5.5.1.p.4">It is emitted automatically at NCP startup with a value indicating the reset reason. </p>
<p id="rfc.section.5.5.1.p.5">See <a href="#status-codes">Section 6</a> for the complete list of status codes. </p>
<h1 id="rfc.section.5.5.2"><a href="#rfc.section.5.5.2">5.5.2.</a> <a href="#prop-protocol-version" id="prop-protocol-version">PROP 1: PROP_PROTOCOL_VERSION</a></h1>
<p/>
<ul>
<li>Type: Read-Only</li>
<li>Encoding: <samp>ii</samp></li>
</ul>
<p> </p>
<table cellpadding="3" cellspacing="0" class="tt full center">
<thead>
<tr>
<th class="center">Octets:</th>
<th class="center">1-3</th>
<th class="center">1-3</th>
</tr>
</thead>
<tbody>
<tr>
<td class="center">Fields:</td>
<td class="center">MAJOR_VERSION</td>
<td class="center">MINOR_VERSION</td>
</tr>
</tbody>
</table>
<p id="rfc.section.5.5.2.p.2">Describes the protocol version information. This property contains four fields, each encoded as a packed unsigned integer: </p>
<p/>
<ul>
<li>Major Version Number</li>
<li>Minor Version Number</li>
</ul>
<p> </p>
<p id="rfc.section.5.5.2.p.4">This document describes major version 4, minor version 3 of this protocol. </p>
<p id="rfc.section.5.5.2.p.5">The host MUST only use this property from NLI 0. Behavior when used from other NLIs is undefined. </p>
<h1 id="rfc.section.5.5.2.1"><a href="#rfc.section.5.5.2.1">5.5.2.1.</a> <a href="#major-version-number" id="major-version-number">Major Version Number</a></h1>
<p id="rfc.section.5.5.2.1.p.1">The major version number is used to identify large and incompatible differences between protocol versions. </p>
<p id="rfc.section.5.5.2.1.p.2">The host MUST enter a FAULT state if it does not explicitly support the given major version number. </p>
<h1 id="rfc.section.5.5.2.2"><a href="#rfc.section.5.5.2.2">5.5.2.2.</a> <a href="#minor-version-number" id="minor-version-number">Minor Version Number</a></h1>
<p id="rfc.section.5.5.2.2.p.1">The minor version number is used to identify small but otherwise compatible differences between protocol versions. A mismatch between the advertised minor version number and the minor version that is supported by the host SHOULD NOT be fatal to the operation of the host. </p>
<h1 id="rfc.section.5.5.3"><a href="#rfc.section.5.5.3">5.5.3.</a> <a href="#prop-ncp-version" id="prop-ncp-version">PROP 2: PROP_NCP_VERSION</a></h1>
<p/>
<ul>
<li>Type: Read-Only</li>
<li>Packed-Encoding: <samp>U</samp></li>
</ul>
<p> </p>
<table cellpadding="3" cellspacing="0" class="tt full center">
<thead>
<tr>
<th class="center">Octets:</th>
<th class="center">n</th>
</tr>
</thead>
<tbody>
<tr>
<td class="center">Fields:</td>
<td class="center">NCP_VESION_STRING</td>
</tr>
</tbody>
</table>
<p id="rfc.section.5.5.3.p.2">Contains a string which describes the firmware currently running on the NCP. Encoded as a zero-terminated UTF-8 string. </p>
<p id="rfc.section.5.5.3.p.3">The format of the string is not strictly defined, but it is intended to present similarly to the "User-Agent" string from HTTP. The RECOMMENDED format of the string is as follows: </p>
<pre>
STACK-NAME/STACK-VERSION[BUILD_INFO][; OTHER_INFO]; BUILD_DATE_AND_TIME
</pre>
<p id="rfc.section.5.5.3.p.4">Examples: </p>
<p/>
<ul>
<li>
<samp>OpenThread/1.0d26-25-gb684c7f; DEBUG; May 9 2016 18:22:04</samp>
</li>
<li>
<samp>ConnectIP/2.0b125 s1 ALPHA; Sept 24 2015 20:49:19</samp>
</li>
</ul>
<p> </p>
<p id="rfc.section.5.5.3.p.6">The host MUST only use this property from NLI 0. Behavior when used from other NLIs is undefined. </p>
<h1 id="rfc.section.5.5.4"><a href="#rfc.section.5.5.4">5.5.4.</a> <a href="#prop-interface-type" id="prop-interface-type">PROP 3: PROP_INTERFACE_TYPE</a></h1>
<p/>
<ul>
<li>Type: Read-Only</li>
<li>Encoding: <samp>i</samp></li>
</ul>
<p> </p>
<table cellpadding="3" cellspacing="0" class="tt full center">
<thead>
<tr>
<th class="center">Octets:</th>
<th class="center">1-3</th>
</tr>
</thead>
<tbody>
<tr>
<td class="center">Fields:</td>
<td class="center">INTERFACE_TYPE</td>
</tr>
</tbody>
</table>
<p id="rfc.section.5.5.4.p.2">This integer identifies what the network protocol for this NCP. Currently defined values are: </p>
<p/>
<ul>
<li>0: Bootloader</li>
<li>2: ZigBee IP(TM)</li>
<li>3: Thread(R)</li>
</ul>
<p> </p>
<p id="rfc.section.5.5.4.p.4">The host MUST enter a FAULT state if it does not recognize the protocol given by the NCP. </p>
<h1 id="rfc.section.5.5.5"><a href="#rfc.section.5.5.5">5.5.5.</a> <a href="#prop-interface-vendor-id" id="prop-interface-vendor-id">PROP 4: PROP_INTERFACE_VENDOR_ID</a></h1>
<p/>
<ul>
<li>Type: Read-Only</li>
<li>Encoding: <samp>i</samp></li>
</ul>
<p> </p>
<table cellpadding="3" cellspacing="0" class="tt full center">
<thead>
<tr>
<th class="center">Octets:</th>
<th class="center">1-3</th>
</tr>
</thead>
<tbody>
<tr>
<td class="center">Fields:</td>
<td class="center">VENDOR_ID</td>
</tr>
</tbody>
</table>
<p id="rfc.section.5.5.5.p.2">Vendor identifier. </p>
<h1 id="rfc.section.5.5.6"><a href="#rfc.section.5.5.6">5.5.6.</a> <a href="#prop-caps" id="prop-caps">PROP 5: PROP_CAPS</a></h1>
<p/>
<ul>
<li>Type: Read-Only</li>
<li>Packed-Encoding: <samp>A(i)</samp></li>
</ul>
<p> </p>
<table cellpadding="3" cellspacing="0" class="tt full center">
<thead>
<tr>
<th class="center">Octets:</th>
<th class="center">1-3</th>
<th class="center">1-3</th>
<th class="center">...</th>
</tr>
</thead>
<tbody>
<tr>
<td class="center">Fields:</td>
<td class="center">CAP_1</td>
<td class="center">CAP_2</td>
<td class="center">...</td>
</tr>
</tbody>
</table>
<p id="rfc.section.5.5.6.p.2">Describes the supported capabilities of this NCP. Encoded as a list of packed unsigned integers. </p>
<p id="rfc.section.5.5.6.p.3">A capability is defined as a 21-bit integer that describes a subset of functionality which is supported by the NCP. </p>
<p id="rfc.section.5.5.6.p.4">Currently defined values are: </p>
<p/>
<ul>
<li>1: <samp>CAP_LOCK</samp></li>
<li>2: <samp>CAP_NET_SAVE</samp></li>
<li>3: <samp>CAP_HBO</samp>: Host Buffer Offload. See <a href="#feature-host-buffer-offload">Section 9</a>.</li>
<li>4: <samp>CAP_POWER_SAVE</samp></li>
<li>5: <samp>CAP_COUNTERS</samp></li>
<li>6: <samp>CAP_JAM_DETECT</samp>: Jamming detection. See <a href="#feature-jam-detect">Section 10</a></li>
<li>7: <samp>CAP_PEEK_POKE</samp>: PEEK/POKE debugging commands.</li>
<li>8: <samp>CAP_WRITABLE_RAW_STREAM</samp>: <samp>PROP_STREAM_RAW</samp> is writable.</li>
<li>9: <samp>CAP_GPIO</samp>: Support for GPIO access. See <a href="#feature-gpio-access">Section 11</a>.</li>
<li>10: <samp>CAP_TRNG</samp>: Support for true random number generation. See <a href="#feature-trng">Section 12</a>.</li>
<li>11: <samp>CAP_CMD_MULTI</samp>: Support for <samp>CMD_PROP_VALUE_MULTI_GET</samp> (<a href="#cmd-prop-value-multi-get">Section 4.13</a>), <samp>CMD_PROP_VALUE_MULTI_SET</samp> (<a href="#cmd-prop-value-multi-set">Section 4.14</a>, and <samp>CMD_PROP_VALUES_ARE</samp> (<a href="#cmd-prop-values-are">Section 4.15</a>).</li>
<li>12: <samp>CAP_UNSOL_UPDATE_FILTER</samp>: Support for <samp>PROP_UNSOL_UPDATE_FILTER</samp> (<a href="#prop-unsol-update-filter">Section 5.5.12</a>) and <samp>PROP_UNSOL_UPDATE_LIST</samp> (<a href="#prop-unsol-update-list">Section 5.5.13</a>).</li>
<li>16: <samp>CAP_802_15_4_2003</samp></li>
<li>17: <samp>CAP_802_15_4_2006</samp></li>
<li>18: <samp>CAP_802_15_4_2011</samp></li>
<li>21: <samp>CAP_802_15_4_PIB</samp></li>
<li>24: <samp>CAP_802_15_4_2450MHZ_OQPSK</samp></li>
<li>25: <samp>CAP_802_15_4_915MHZ_OQPSK</samp></li>
<li>26: <samp>CAP_802_15_4_868MHZ_OQPSK</samp></li>
<li>27: <samp>CAP_802_15_4_915MHZ_BPSK</samp></li>
<li>28: <samp>CAP_802_15_4_868MHZ_BPSK</samp></li>
<li>29: <samp>CAP_802_15_4_915MHZ_ASK</samp></li>
<li>30: <samp>CAP_802_15_4_868MHZ_ASK</samp></li>
<li>48: <samp>CAP_ROLE_ROUTER</samp></li>
<li>49: <samp>CAP_ROLE_SLEEPY</samp></li>
<li>52: <samp>CAP_NET_THREAD_1_0</samp></li>
<li>512: <samp>CAP_MAC_WHITELIST</samp></li>
<li>513: <samp>CAP_MAC_RAW</samp></li>
<li>514: <samp>CAP_OOB_STEERING_DATA</samp></li>
<li>1024: <samp>CAP_THREAD_COMMISSIONER</samp></li>
<li>1025: <samp>CAP_THREAD_TMF_PROXY</samp></li>
</ul>
<p> </p>
<p id="rfc.section.5.5.6.p.6">Additionally, future capability allocations SHALL be made from the following allocation plan: </p>
<table cellpadding="3" cellspacing="0" class="tt full center">
<thead>
<tr>
<th class="center">Capability Range</th>
<th class="center">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="center">0 - 127</td>
<td class="center">Reserved for core capabilities</td>
</tr>
<tr>
<td class="center">128 - 15,359</td>
<td class="center">
<em>UNALLOCATED</em>
</td>
</tr>
<tr>
<td class="center">15,360 - 16,383</td>
<td class="center">Vendor-specific</td>
</tr>
<tr>
<td class="center">16,384 - 1,999,999</td>
<td class="center">
<em>UNALLOCATED</em>
</td>
</tr>
<tr>
<td class="center">2,000,000 - 2,097,151</td>
<td class="center">Experimental use only</td>
</tr>
</tbody>
</table>
<h1 id="rfc.section.5.5.7"><a href="#rfc.section.5.5.7">5.5.7.</a> <a href="#prop-interface-count" id="prop-interface-count">PROP 6: PROP_INTERFACE_COUNT</a></h1>
<p/>
<ul>
<li>Type: Read-Only</li>
<li>Packed-Encoding: <samp>C</samp></li>
</ul>
<p> </p>
<table cellpadding="3" cellspacing="0" class="tt full center">
<thead>
<tr>
<th class="center">Octets:</th>
<th class="center">1</th>
</tr>
</thead>
<tbody>
<tr>
<td class="center">Fields:</td>
<td class="center">
<samp>INTERFACE_COUNT</samp>
</td>
</tr>
</tbody>
</table>
<p id="rfc.section.5.5.7.p.2">Describes the number of concurrent interfaces supported by this NCP. Since the concurrent interface mechanism is still TBD, this value MUST always be one. </p>
<p id="rfc.section.5.5.7.p.3">This value is encoded as an unsigned 8-bit integer. </p>
<p id="rfc.section.5.5.7.p.4">The host MUST only use this property from NLI 0. Behavior when used from other NLIs is undefined. </p>
<h1 id="rfc.section.5.5.8"><a href="#rfc.section.5.5.8">5.5.8.</a> <a href="#prop-power-state" id="prop-power-state">PROP 7: PROP_POWER_STATE</a></h1>
<p/>
<ul>
<li>Type: Read-Write</li>
<li>Packed-Encoding: <samp>C</samp></li>
</ul>
<p> </p>
<table cellpadding="3" cellspacing="0" class="tt full center">
<thead>
<tr>
<th class="center">Octets:</th>
<th class="center">1</th>
</tr>
</thead>
<tbody>
<tr>
<td class="center">Fields:</td>
<td class="center">POWER_STATE</td>
</tr>
</tbody>
</table>
<p id="rfc.section.5.5.8.p.2">Describes the current power state of the NCP. By writing to this property you can manage the lower state of the NCP. Enumeration is encoded as a single unsigned byte. </p>
<p id="rfc.section.5.5.8.p.3">Defined values are: </p>
<p/>
<ul>
<li>0: <samp>POWER_STATE_OFFLINE</samp>: NCP is physically powered off. (Enumerated for completeness sake, not expected on the wire)</li>
<li>1: <samp>POWER_STATE_DEEP_SLEEP</samp>: Almost everything on the NCP is shut down, but can still be resumed via a command or interrupt.</li>
<li>2: <samp>POWER_STATE_STANDBY</samp>: NCP is in the lowest power state that can still be awoken by an event from the radio (e.g. waiting for alarm)</li>
<li>3: <samp>POWER_STATE_LOW_POWER</samp>: NCP is responsive (and possibly connected), but using less power. (e.g. "Sleepy" child node)</li>
<li>4: <samp>POWER_STATE_ONLINE</samp>: NCP is fully powered. (e.g. "Parent" node)</li>
</ul>
<p> </p>
<p>
<a id="CREF2" class="info">[CREF2]<span class="info">RQ: We should consider reversing the numbering here so that 0 is `POWER_STATE_ONLINE`. We may also want to include some extra values between the defined values for future expansion, so that we can preserve the ordered relationship. --</span></a>
</p>
<h1 id="rfc.section.5.5.9"><a href="#rfc.section.5.5.9">5.5.9.</a> <a href="#prop-hwaddr" id="prop-hwaddr">PROP 8: PROP_HWADDR</a></h1>
<p/>
<ul>
<li>Type: Read-Only*</li>
<li>Packed-Encoding: <samp>E</samp></li>
</ul>
<p> </p>
<table cellpadding="3" cellspacing="0" class="tt full center">
<thead>
<tr>
<th class="center">Octets:</th>
<th class="center">8</th>
</tr>
</thead>
<tbody>
<tr>
<td class="center">Fields:</td>
<td class="center">HWADDR</td>
</tr>
</tbody>
</table>
<p id="rfc.section.5.5.9.p.2">The static EUI64 address of the device, used as a serial number. This value is read-only, but may be writable under certain vendor-defined circumstances. </p>
<h1 id="rfc.section.5.5.10"><a href="#rfc.section.5.5.10">5.5.10.</a> <a href="#prop-lock" id="prop-lock">PROP 9: PROP_LOCK</a></h1>
<p/>
<ul>
<li>Type: Read-Write</li>
<li>Packed-Encoding: <samp>b</samp></li>
</ul>
<p> </p>
<table cellpadding="3" cellspacing="0" class="tt full center">
<thead>
<tr>
<th class="center">Octets:</th>
<th class="center">1</th>
</tr>
</thead>
<tbody>
<tr>
<td class="center">Fields:</td>
<td class="center">LOCK</td>
</tr>
</tbody>
</table>
<p id="rfc.section.5.5.10.p.2">Property lock. Used for grouping changes to several properties to take effect at once, or to temporarily prevent the automatic updating of property values. When this property is set, the execution of the NCP is effectively frozen until it is cleared. </p>
<p id="rfc.section.5.5.10.p.3">This property is only supported if the <samp>CAP_LOCK</samp> capability is present. </p>
<p id="rfc.section.5.5.10.p.4">Unlike most other properties, setting this property to true when the value of the property is already true MUST fail with a last status of <samp>STATUS_ALREADY</samp>. </p>
<h1 id="rfc.section.5.5.11"><a href="#rfc.section.5.5.11">5.5.11.</a> <a href="#prop-host-power-state" id="prop-host-power-state">PROP 10: PROP_HOST_POWER_STATE</a></h1>
<p/>
<ul>
<li>Type: Read-Write</li>
<li>Packed-Encoding: <samp>C</samp></li>
<li>Default value: 4</li>
</ul>
<p> </p>
<table cellpadding="3" cellspacing="0" class="tt full center">
<thead>
<tr>
<th class="center">Octets:</th>
<th class="center">1</th>
</tr>
</thead>
<tbody>
<tr>
<td class="center">Fields:</td>
<td class="center">
<samp>HOST_POWER_STATE</samp>
</td>
</tr>
</tbody>
</table>
<p id="rfc.section.5.5.11.p.2">Describes the current power state of the <em>host</em>. This property is used by the host to inform the NCP when it has changed power states. The NCP can then use this state to determine which properties need asynchronous updates. Enumeration is encoded as a single unsigned byte. These states are defined in similar terms to <samp>PROP_POWER_STATE</samp> (<a href="#prop-power-state">Section 5.5.8</a>). </p>
<p id="rfc.section.5.5.11.p.3">Defined values are: </p>
<p/>
<ul>
<li>0: <samp>HOST_POWER_STATE_OFFLINE</samp>: Host is physically powered off and cannot be woken by the NCP. All asynchronous commands are squelched.</li>
<li>1: <samp>HOST_POWER_STATE_DEEP_SLEEP</samp>: The host is in a low power state where it can be woken by the NCP but will potentially require more than two seconds to become fully responsive. The NCP MUST avoid sending unnecessary property updates, such as child table updates or non-critical messages on the debug stream. If the NCP needs to wake the host for traffic, the NCP MUST first take action to wake the host. Once the NCP signals to the host that it should wake up, the NCP MUST wait for some activity from the host (indicating that it is fully awake) before sending frames.</li>
<li>2: <strong>RESERVED</strong>. This value MUST NOT be set by the host. If received by the NCP, the NCP SHOULD consider this as a synonym of <samp>HOST_POWER_STATE_DEEP_SLEEP</samp>.</li>
<li>3: <samp>HOST_POWER_STATE_LOW_POWER</samp>: The host is in a low power state where it can be immediately woken by the NCP. The NCP SHOULD avoid sending unnecessary property updates, such as child table updates or non-critical messages on the debug stream.</li>
<li>4: <samp>HOST_POWER_STATE_ONLINE</samp>: The host is awake and responsive. No special filtering is performed by the NCP on asynchronous updates.</li>
<li>All other values are <strong>RESERVED</strong>. They MUST NOT be set by the host. If received by the NCP, the NCP SHOULD consider the value as a synonym of <samp>HOST_POWER_STATE_LOW_POWER</samp>.</li>
</ul>
<p> </p>
<p>
<a id="CREF3" class="info">[CREF3]<span class="info">RQ: We should consider reversing the numbering here so that 0 is `POWER_STATE_ONLINE`. We may also want to include some extra values between the defined values for future expansion, so that we can preserve the ordered relationship. --</span></a>
</p>
<p id="rfc.section.5.5.11.p.6">After setting this power state, any further commands from the host to the NCP will cause <samp>HOST_POWER_STATE</samp> to automatically revert to <samp>HOST_POWER_STATE_ONLINE</samp>. </p>
<p id="rfc.section.5.5.11.p.7">When the host is entering a low-power state, it should wait for the response from the NCP acknowledging the command (with <samp>CMD_VALUE_IS</samp>). Once that acknowledgement is received the host may enter the low-power state. </p>
<p id="rfc.section.5.5.11.p.8">If the NCP has the <samp>CAP_UNSOL_UPDATE_FILTER</samp> capability, any unsolicited property updates masked by <samp>PROP_UNSOL_UPDATE_FILTER</samp> should be honored while the host indicates it is in a low-power state. After resuming to the <samp>HOST_POWER_STATE_ONLINE</samp> state, the value of <samp>PROP_UNSOL_UPDATE_FILTER</samp> MUST be unchanged from the value assigned prior to the host indicating it was entering a low-power state. </p>
<p id="rfc.section.5.5.11.p.9">The host MUST only use this property from NLI 0. Behavior when used from other NLIs is undefined. </p>
<h1 id="rfc.section.5.5.12"><a href="#rfc.section.5.5.12">5.5.12.</a> <a href="#prop-unsol-update-filter" id="prop-unsol-update-filter">PROP 4104: PROP_UNSOL_UPDATE_FILTER</a></h1>
<p/>
<ul>
<li>Required only if <samp>CAP_UNSOL_UPDATE_FILTER</samp> is set.</li>
<li>Type: Read-Write</li>
<li>Packed-Encoding: <samp>A(I)</samp></li>
<li>Default value: Empty.</li>
</ul>
<p> </p>
<p id="rfc.section.5.5.12.p.2">Contains a list of properties which are <em>excluded</em> from generating unsolicited value updates. This property MUST be empty after reset. </p>
<p id="rfc.section.5.5.12.p.3">In other words, the host may opt-out of unsolicited property updates for a specific property by adding that property id to this list. </p>
<p id="rfc.section.5.5.12.p.4">Hosts SHOULD NOT add properties to this list which are not present in <samp>PROP_UNSOL_UPDATE_LIST</samp>. If such properties are added, the NCP MUST ignore the unsupported properties. </p>
<p>
<a id="CREF4" class="info">[CREF4]<span class="info">RQ: The justification for the above behavior is to attempt to avoid possible future interop problems by explicitly making sure that unknown properties are ignored. Since unknown properties will obviously not be generating unsolicited updates, it seems fairly harmless. An implementation may print out a warning to the debug stream. Note that the error is still detectable: If you VALUE\_SET unsupported properties, the resulting VALUE\_IS would contain only the supported properties of that set(since the unsupported properties would be ignored). If an implementation cares that much about getting this right then it needs to make sure that it checks PROP\_UNSOL\_UPDATE\_LIST first. --</span></a>
</p>
<p id="rfc.section.5.5.12.p.6">Implementations of this property are only REQUIRED to support and use the following commands: </p>
<p/>
<ul>
<li><samp>CMD_PROP_VALUE_GET</samp> (<a href="#cmd-prop-value-get">Section 4.3</a>)</li>
<li><samp>CMD_PROP_VALUE_SET</samp> (<a href="#cmd-prop-value-set">Section 4.4</a>)</li>
<li><samp>CMD_PROP_VALUE_IS</samp> (<a href="#cmd-prop-value-is">Section 4.7</a>)</li>
</ul>
<p> </p>
<p id="rfc.section.5.5.12.p.8">Implementations of this property MAY optionally support and use the following commands: </p>
<p/>
<ul>
<li><samp>CMD_PROP_VALUE_INSERT</samp> (<a href="#cmd-prop-value-insert">Section 4.5</a>)</li>
<li><samp>CMD_PROP_VALUE_REMOVE</samp> (<a href="#cmd-prop-value-remove">Section 4.6</a>)</li>
<li><samp>CMD_PROP_VALUE_INSERTED</samp> (<a href="#cmd-prop-value-inserted">Section 4.8</a>)</li>
<li><samp>CMD_PROP_VALUE_REMOVED</samp> (<a href="#cmd-prop-value-removed">Section 4.9</a>)</li>
</ul>
<p> </p>
<p id="rfc.section.5.5.12.p.10">Host implementations which are aiming to maximize their compatability across different firmwre implementations SHOULD NOT assume the availability of the optional commands for this property. </p>
<p id="rfc.section.5.5.12.p.11">The value of this property SHALL be independent for each NLI. </p>
<h1 id="rfc.section.5.5.13"><a href="#rfc.section.5.5.13">5.5.13.</a> <a href="#prop-unsol-update-list" id="prop-unsol-update-list">PROP 4105: PROP_UNSOL_UPDATE_LIST</a></h1>
<p/>
<ul>
<li>Required only if <samp>CAP_UNSOL_UPDATE_FILTER</samp> is set.</li>
<li>Type: Read-Only</li>
<li>Packed-Encoding: <samp>A(I)</samp></li>
</ul>
<p> </p>
<p id="rfc.section.5.5.13.p.2">Contains a list of properties which are capable of generating unsolicited value updates. This list can be used when populating <samp>PROP_UNSOL_UPDATE_FILTER</samp> to disable all unsolicited property updates. </p>
<p id="rfc.section.5.5.13.p.3">This property is intended to effectively behave as a constant for a given NCP firmware. </p>
<p id="rfc.section.5.5.13.p.4">Note that not all properties that support unsolicited updates need to be listed here. Scan results, for example, are only generated due to direct action on the part of the host, so those properties MUST NOT not be included in this list. </p>
<p id="rfc.section.5.5.13.p.5">The value of this property MAY be different across available NLIs. </p>
<h1 id="rfc.section.5.6"><a href="#rfc.section.5.6">5.6.</a> <a href="#prop-stream" id="prop-stream">Stream Properties</a></h1>
<h1 id="rfc.section.5.6.1"><a href="#rfc.section.5.6.1">5.6.1.</a> <a href="#prop-stream-debug" id="prop-stream-debug">PROP 112: PROP_STREAM_DEBUG</a></h1>
<p/>
<ul>
<li>Type: Read-Only-Stream</li>
<li>Packed-Encoding: <samp>D</samp></li>
</ul>
<p> </p>
<table cellpadding="3" cellspacing="0" class="tt full center">
<thead>
<tr>
<th class="center">Octets:</th>
<th class="center">n</th>
</tr>
</thead>
<tbody>
<tr>
<td class="center">Fields:</td>
<td class="center">UTF8_DATA</td>
</tr>
</tbody>
</table>
<p id="rfc.section.5.6.1.p.2">This property is a streaming property, meaning that you cannot explicitly fetch the value of this property. The stream provides human-readable debugging output which may be displayed in the host logs. </p>
<p id="rfc.section.5.6.1.p.3">The location of newline characters is not assumed by the host: it is the NCP's responsibility to insert newline characters where needed, just like with any other text stream. </p>
<p id="rfc.section.5.6.1.p.4">To receive the debugging stream, you wait for <samp>CMD_PROP_VALUE_IS</samp> commands for this property from the NCP. </p>
<h1 id="rfc.section.5.6.2"><a href="#rfc.section.5.6.2">5.6.2.</a> <a href="#prop-stream-raw" id="prop-stream-raw">PROP 113: PROP_STREAM_RAW</a></h1>
<p/>
<ul>
<li>Type: Read-Write-Stream</li>
<li>Packed-Encoding: <samp>dD</samp></li>
</ul>
<p> </p>
<table cellpadding="3" cellspacing="0" class="tt full center">
<thead>
<tr>
<th class="center">Octets:</th>
<th class="center">2</th>
<th class="center">n</th>
<th class="center">n</th>
</tr>
</thead>
<tbody>
<tr>
<td class="center">Fields:</td>
<td class="center">FRAME_DATA_LEN</td>
<td class="center">FRAME_DATA</td>
<td class="center">FRAME_METADATA</td>
</tr>
</tbody>
</table>
<p id="rfc.section.5.6.2.p.2">This stream provides the capability of sending and receiving raw packets to and from the radio. The exact format of the frame metadata and data is dependent on the MAC and PHY being used. </p>
<p id="rfc.section.5.6.2.p.3">This property is a streaming property, meaning that you cannot explicitly fetch the value of this property. To receive traffic, you wait for <samp>CMD_PROP_VALUE_IS</samp> commands with this property id from the NCP. </p>
<p id="rfc.section.5.6.2.p.4">Implementations may OPTIONALLY support the ability to transmit arbitrary raw packets. Support for this feature is indicated by the presence of the <samp>CAP_WRITABLE_RAW_STREAM</samp> capability. </p>
<p id="rfc.section.5.6.2.p.5">If the capability <samp>CAP_WRITABLE_RAW_STREAM</samp> is set, then packets written to this stream with <samp>CMD_PROP_VALUE_SET</samp> will be sent out over the radio. This allows the caller to use the radio directly, with the stack being implemented on the host instead of the NCP. </p>
<h1 id="rfc.section.5.6.2.1"><a href="#rfc.section.5.6.2.1">5.6.2.1.</a> <a href="#frame-metadata-format" id="frame-metadata-format">Frame Metadata Format</a></h1>
<p id="rfc.section.5.6.2.1.p.1">Any data past the end of <samp>FRAME_DATA_LEN</samp> is considered metadata and is OPTIONAL. Frame metadata MAY be empty or partially specified. Partially specified metadata MUST be accepted. Default values are used for all unspecified fields. </p>
<p id="rfc.section.5.6.2.1.p.2">The same general format is used for <samp>PROP_STREAM_RAW</samp>, <samp>PROP_STREAM_NET</samp>, and <samp>PROP_STREAM_NET_INSECURE</samp>. It can be used for frames sent from the NCP to the host as well as frames sent from the host to the NCP. </p>
<p id="rfc.section.5.6.2.1.p.3">The frame metadata field consists of the following fields: </p>
<table cellpadding="3" cellspacing="0" class="tt full center">
<thead>
<tr>
<th class="left">Field</th>
<th class="left">Description</th>
<th class="left">Type</th>
<th class="center">Len</th>
<th class="center">Default</th>
</tr>
</thead>
<tbody>
<tr>
<td class="left">MD_POWER</td>
<td class="left">(dBm) RSSI/TX-Power</td>
<td class="left"><samp>c</samp> int8</td>
<td class="center">1</td>
<td class="center">-128</td>
</tr>
<tr>
<td class="left">MD_NOISE</td>
<td class="left">(dBm) Noise floor</td>
<td class="left"><samp>c</samp> int8</td>
<td class="center">1</td>
<td class="center">-128</td>
</tr>
<tr>
<td class="left">MD_FLAG</td>
<td class="left">Flags (defined below)</td>
<td class="left"><samp>S</samp> uint16</td>
<td class="center">2</td>
<td class="center"/>
</tr>
<tr>
<td class="left">MD_PHY</td>
<td class="left">PHY-specific data</td>
<td class="left"><samp>d</samp> data</td>
<td class="center">&gt;=2</td>
<td class="center"/>
</tr>
<tr>
<td class="left">MD_VEND</td>
<td class="left">Vendor-specific data</td>
<td class="left"><samp>d</samp> data</td>
<td class="center">&gt;=2</td>
<td class="center"/>
</tr>
</tbody>
</table>
<p id="rfc.section.5.6.2.1.p.4">The following fields are ignored by the NCP for packets sent to it from the host: </p>
<p/>
<ul>
<li>MD_NOISE</li>
<li>MD_FLAG</li>
</ul>
<p> </p>
<p id="rfc.section.5.6.2.1.p.6">When specifying <samp>MD_POWER</samp> for a packet to be transmitted, the actual transmit power is never larger than the current value of <samp>PROP_PHY_TX_POWER</samp> (<a href="#prop-phy-tx-power">Section 5.7.6</a>). When left unspecified (or set to the value -128), an appropriate transmit power will be chosen by the NCP. </p>
<p id="rfc.section.5.6.2.1.p.7">The bit values in <samp>MD_FLAG</samp> are defined as follows: </p>
<table cellpadding="3" cellspacing="0" class="tt full center">
<thead>
<tr>
<th class="center">Bit</th>
<th class="center">Mask</th>
<th class="left">Name</th>
<th class="left">Description if set</th>
</tr>
</thead>
<tbody>
<tr>
<td class="center">15</td>
<td class="center">0x0001</td>
<td class="left">MD_FLAG_TX</td>
<td class="left">Packet was transmitted, not received.</td>
</tr>
<tr>
<td class="center">13</td>
<td class="center">0x0004</td>
<td class="left">MD_FLAG_BAD_FCS</td>
<td class="left">Packet was received with bad FCS</td>
</tr>
<tr>
<td class="center">12</td>
<td class="center">0x0008</td>
<td class="left">MD_FLAG_DUPE</td>
<td class="left">Packet seems to be a duplicate</td>
</tr>
<tr>
<td class="center">0-11, 14</td>
<td class="center">0xFFF2</td>
<td class="left">MD_FLAG_RESERVED</td>
<td class="left">Flags reserved for future use.</td>
</tr>
</tbody>
</table>
<p id="rfc.section.5.6.2.1.p.8">The format of <samp>MD_PHY</samp> is specified by the PHY layer currently in use, and may contain information such as the channel, LQI, antenna, or other pertainent information. </p>
<h1 id="rfc.section.5.6.3"><a href="#rfc.section.5.6.3">5.6.3.</a> <a href="#prop-stream-net" id="prop-stream-net">PROP 114: PROP_STREAM_NET</a></h1>
<p/>
<ul>
<li>Type: Read-Write-Stream</li>
<li>Packed-Encoding: <samp>dD</samp></li>
</ul>
<p> </p>
<table cellpadding="3" cellspacing="0" class="tt full center">
<thead>
<tr>
<th class="center">Octets:</th>
<th class="center">2</th>
<th class="center">n</th>
<th class="center">n</th>
</tr>
</thead>
<tbody>
<tr>
<td class="center">Fields:</td>
<td class="center">FRAME_DATA_LEN</td>
<td class="center">FRAME_DATA</td>
<td class="center">FRAME_METADATA</td>
</tr>
</tbody>
</table>
<p id="rfc.section.5.6.3.p.2">This stream provides the capability of sending and receiving data packets to and from the currently attached network. The exact format of the frame metadata and data is dependent on the network protocol being used. </p>
<p id="rfc.section.5.6.3.p.3">This property is a streaming property, meaning that you cannot explicitly fetch the value of this property. To receive traffic, you wait for <samp>CMD_PROP_VALUE_IS</samp> commands with this property id from the NCP. </p>
<p id="rfc.section.5.6.3.p.4">To send network packets, you call <samp>CMD_PROP_VALUE_SET</samp> on this property with the value of the packet. </p>
<p id="rfc.section.5.6.3.p.5">Any data past the end of <samp>FRAME_DATA_LEN</samp> is considered metadata, the format of which is described in <a href="#frame-metadata-format">Section 5.6.2.1</a>. </p>
<h1 id="rfc.section.5.6.4"><a href="#rfc.section.5.6.4">5.6.4.</a> <a href="#prop-stream-net-insecure" id="prop-stream-net-insecure">PROP 115: PROP_STREAM_NET_INSECURE</a></h1>
<p/>
<ul>
<li>Type: Read-Write-Stream</li>
<li>Packed-Encoding: <samp>dD</samp></li>
</ul>
<p> </p>
<table cellpadding="3" cellspacing="0" class="tt full center">
<thead>
<tr>
<th class="center">Octets:</th>
<th class="center">2</th>
<th class="center">n</th>
<th class="center">n</th>
</tr>
</thead>
<tbody>
<tr>
<td class="center">Fields:</td>
<td class="center">FRAME_DATA_LEN</td>
<td class="center">FRAME_DATA</td>
<td class="center">FRAME_METADATA</td>
</tr>
</tbody>
</table>
<p id="rfc.section.5.6.4.p.2">This stream provides the capability of sending and receiving unencrypted and unauthenticated data packets to and from nearby devices for the purposes of device commissioning. The exact format of the frame metadata and data is dependent on the network protocol being used. </p>
<p id="rfc.section.5.6.4.p.3">This property is a streaming property, meaning that you cannot explicitly fetch the value of this property. To receive traffic, you wait for <samp>CMD_PROP_VALUE_IS</samp> commands with this property id from the NCP. </p>
<p id="rfc.section.5.6.4.p.4">To send network packets, you call <samp>CMD_PROP_VALUE_SET</samp> on this property with the value of the packet. </p>
<p id="rfc.section.5.6.4.p.5">Any data past the end of <samp>FRAME_DATA_LEN</samp> is considered metadata, the format of which is described in <a href="#frame-metadata-format">Section 5.6.2.1</a>. </p>
<h1 id="rfc.section.5.7"><a href="#rfc.section.5.7">5.7.</a> <a href="#prop-phy" id="prop-phy">PHY Properties</a></h1>
<h1 id="rfc.section.5.7.1"><a href="#rfc.section.5.7.1">5.7.1.</a> <a href="#prop-phy-enabled" id="prop-phy-enabled">PROP 32: PROP_PHY_ENABLED</a></h1>
<p/>
<ul>
<li>Type: Read-Write</li>
<li>Packed-Encoding: <samp>b</samp> (bool8)</li>
</ul>
<p> </p>
<p id="rfc.section.5.7.1.p.2">Set to 1 if the PHY is enabled, set to 0 otherwise. May be directly enabled to bypass higher-level packet processing in order to implement things like packet sniffers. This property can only be written if the <samp>SPINEL_CAP_MAC_RAW</samp> capability is present. </p>
<h1 id="rfc.section.5.7.2"><a href="#rfc.section.5.7.2">5.7.2.</a> <a href="#prop-phy-chan" id="prop-phy-chan">PROP 33: PROP_PHY_CHAN</a></h1>
<p/>
<ul>
<li>Type: Read-Write</li>
<li>Packed-Encoding: <samp>C</samp> (uint8)</li>
</ul>
<p> </p>
<p id="rfc.section.5.7.2.p.2">Value is the current channel. Must be set to one of the values contained in <samp>PROP_PHY_CHAN_SUPPORTED</samp>. </p>
<h1 id="rfc.section.5.7.3"><a href="#rfc.section.5.7.3">5.7.3.</a> <a href="#prop-phy-chan-supported" id="prop-phy-chan-supported">PROP 34: PROP_PHY_CHAN_SUPPORTED</a></h1>
<p/>
<ul>
<li>Type: Read-Only</li>
<li>Packed-Encoding: <samp>A(C)</samp> (array of uint8)</li>
<li>Unit: List of channels</li>
</ul>
<p> </p>
<p id="rfc.section.5.7.3.p.2">Value is a list of channel values that are supported by the hardware. </p>
<h1 id="rfc.section.5.7.4"><a href="#rfc.section.5.7.4">5.7.4.</a> <a href="#prop-phy-freq" id="prop-phy-freq">PROP 35: PROP_PHY_FREQ</a></h1>
<p/>
<ul>
<li>Type: Read-Only</li>
<li>Packed-Encoding: <samp>L</samp> (uint32)</li>
<li>Unit: Kilohertz</li>
</ul>
<p> </p>
<p id="rfc.section.5.7.4.p.2">Value is the radio frequency (in kilohertz) of the current channel. </p>
<h1 id="rfc.section.5.7.5"><a href="#rfc.section.5.7.5">5.7.5.</a> <a href="#prop-phy-cca-threshold" id="prop-phy-cca-threshold">PROP 36: PROP_PHY_CCA_THRESHOLD</a></h1>
<p/>
<ul>
<li>Type: Read-Write</li>
<li>Packed-Encoding: <samp>c</samp> (int8)</li>
<li>Unit: dBm</li>
</ul>
<p> </p>
<p id="rfc.section.5.7.5.p.2">Value is the CCA (clear-channel assessment) threshold. Set to -128 to disable. </p>
<p id="rfc.section.5.7.5.p.3">When setting, the value will be rounded down to a value that is supported by the underlying radio hardware. </p>
<h1 id="rfc.section.5.7.6"><a href="#rfc.section.5.7.6">5.7.6.</a> <a href="#prop-phy-tx-power" id="prop-phy-tx-power">PROP 37: PROP_PHY_TX_POWER</a></h1>
<p/>
<ul>
<li>Type: Read-Write</li>
<li>Packed-Encoding: <samp>c</samp> (int8)</li>
<li>Unit: dBm</li>
</ul>
<p> </p>
<p id="rfc.section.5.7.6.p.2">Value is the transmit power of the radio. </p>
<p id="rfc.section.5.7.6.p.3">When setting, the value will be rounded down to a value that is supported by the underlying radio hardware. </p>
<h1 id="rfc.section.5.7.7"><a href="#rfc.section.5.7.7">5.7.7.</a> <a href="#prop-phy-rssi" id="prop-phy-rssi">PROP 38: PROP_PHY_RSSI</a></h1>
<p/>
<ul>
<li>Type: Read-Only</li>
<li>Packed-Encoding: <samp>c</samp> (int8)</li>
<li>Unit: dBm</li>
</ul>
<p> </p>
<p id="rfc.section.5.7.7.p.2">Value is the current RSSI (Received signal strength indication) from the radio. This value can be used in energy scans and for determining the ambient noise floor for the operating environment. </p>
<h1 id="rfc.section.5.7.8"><a href="#rfc.section.5.7.8">5.7.8.</a> <a href="#prop-phy-rx-sensitivity" id="prop-phy-rx-sensitivity">PROP 39: PROP_PHY_RX_SENSITIVITY</a></h1>
<p/>
<ul>
<li>Type: Read-Only</li>
<li>Packed-Encoding: <samp>c</samp> (int8)</li>
<li>Unit: dBm</li>
</ul>
<p> </p>
<p id="rfc.section.5.7.8.p.2">Value is the radio receive sensitivity. This value can be used as lower bound noise floor for link metrics computation. </p>
<h1 id="rfc.section.5.8"><a href="#rfc.section.5.8">5.8.</a> <a href="#prop-mac" id="prop-mac">MAC Properties</a></h1>
<h1 id="rfc.section.5.8.1"><a href="#rfc.section.5.8.1">5.8.1.</a> <a href="#prop-mac-scan-state" id="prop-mac-scan-state">PROP 48: PROP_MAC_SCAN_STATE</a></h1>
<p/>
<ul>
<li>Type: Read-Write</li>
<li>Packed-Encoding: <samp>C</samp></li>
<li>Unit: Enumeration</li>
</ul>
<p> </p>
<p id="rfc.section.5.8.1.p.2">Possible Values: </p>
<p/>
<ul>
<li>0: <samp>SCAN_STATE_IDLE</samp></li>
<li>1: <samp>SCAN_STATE_BEACON</samp></li>
<li>2: <samp>SCAN_STATE_ENERGY</samp></li>
<li>3: <samp>SCAN_STATE_DISCOVER</samp></li>
</ul>
<p> </p>
<p id="rfc.section.5.8.1.p.4">Set to <samp>SCAN_STATE_BEACON</samp> to start an active scan. Beacons will be emitted from <samp>PROP_MAC_SCAN_BEACON</samp>. </p>
<p id="rfc.section.5.8.1.p.5">Set to <samp>SCAN_STATE_ENERGY</samp> to start an energy scan. Channel energy result will be reported by emissions of <samp>PROP_MAC_ENERGY_SCAN_RESULT</samp> (per channel). </p>
<p id="rfc.section.5.8.1.p.6">Set to <samp>SCAN_STATE_DISOVER</samp> to start a Thread MLE discovery scan operation. Discovery scan result will be emitted from <samp>PROP_MAC_SCAN_BEACON</samp>. </p>
<p id="rfc.section.5.8.1.p.7">Value switches to <samp>SCAN_STATE_IDLE</samp> when scan is complete. </p>
<h1 id="rfc.section.5.8.2"><a href="#rfc.section.5.8.2">5.8.2.</a> <a href="#prop-mac-scan-mask" id="prop-mac-scan-mask">PROP 49: PROP_MAC_SCAN_MASK</a></h1>
<p/>
<ul>
<li>Type: Read-Write</li>
<li>Packed-Encoding: <samp>A(C)</samp></li>
<li>Unit: List of channels to scan</li>
</ul>
<p> </p>
<h1 id="rfc.section.5.8.3"><a href="#rfc.section.5.8.3">5.8.3.</a> <a href="#prop-mac-scan-period" id="prop-mac-scan-period">PROP 50: PROP_MAC_SCAN_PERIOD</a></h1>
<p/>
<ul>
<li>Type: Read-Write</li>
<li>Packed-Encoding: <samp>S</samp> (uint16)</li>
<li>Unit: milliseconds per channel</li>
</ul>
<p> </p>
<h1 id="rfc.section.5.8.4"><a href="#rfc.section.5.8.4">5.8.4.</a> <a href="#prop-mac-scan-beacon" id="prop-mac-scan-beacon">PROP 51: PROP_MAC_SCAN_BEACON</a></h1>
<p/>
<ul>
<li>Type: Read-Only-Stream</li>
<li>Packed-Encoding: <samp>Ccdd</samp> (or <samp>Cct(ESSc)t(iCUdd)</samp>)</li>
</ul>
<p> </p>
<table cellpadding="3" cellspacing="0" class="tt full center">
<thead>
<tr>
<th class="center">Octets:</th>
<th class="center">1</th>
<th class="center">1</th>
<th class="center">2</th>
<th class="center">n</th>
<th class="center">2</th>
<th class="center">n</th>
</tr>
</thead>
<tbody>
<tr>
<td class="center">Fields:</td>
<td class="center">CH</td>
<td class="center">RSSI</td>
<td class="center">MAC_LEN</td>
<td class="center">MAC_DATA</td>
<td class="center">NET_LEN</td>
<td class="center">NET_DATA</td>
</tr>
</tbody>
</table>
<p id="rfc.section.5.8.4.p.2">Scan beacons have two embedded structures which contain information about the MAC layer and the NET layer. Their format depends on the MAC and NET layer currently in use. The format below is for an 802.15.4 MAC with Thread: </p>
<p/>
<ul>
<li><samp>C</samp>: Channel</li>
<li><samp>c</samp>: RSSI of the beacon</li>
<li><samp>t</samp>: MAC layer properties (802.15.4 layer shown below for convenience) <ul><li><samp>E</samp>: Long address</li><li><samp>S</samp>: Short address</li><li><samp>S</samp>: PAN-ID</li><li><samp>c</samp>: LQI</li></ul></li>
<li>NET layer properties (Standard net layer shown below for convenience) <ul><li><samp>i</samp>: Protocol Number</li><li><samp>C</samp>: Flags</li><li><samp>U</samp>: Network Name</li><li><samp>d</samp>: XPANID</li><li><samp>d</samp>: Steering data</li></ul></li>
</ul>
<p> </p>
<p id="rfc.section.5.8.4.p.4">Extra parameters may be added to each of the structures in the future, so care should be taken to read the length that prepends each structure. </p>
<h1 id="rfc.section.5.8.5"><a href="#rfc.section.5.8.5">5.8.5.</a> <a href="#prop-mac-15-4-laddr" id="prop-mac-15-4-laddr">PROP 52: PROP_MAC_15_4_LADDR</a></h1>
<p/>
<ul>
<li>Type: Read-Write</li>
<li>Packed-Encoding: <samp>E</samp></li>
</ul>
<p> </p>
<p id="rfc.section.5.8.5.p.2">The 802.15.4 long address of this node. </p>
<p id="rfc.section.5.8.5.p.3">This property is only present on NCPs which implement 802.15.4 </p>
<h1 id="rfc.section.5.8.6"><a href="#rfc.section.5.8.6">5.8.6.</a> <a href="#prop-mac-15-4-saddr" id="prop-mac-15-4-saddr">PROP 53: PROP_MAC_15_4_SADDR</a></h1>
<p/>
<ul>
<li>Type: Read-Write</li>
<li>Packed-Encoding: <samp>S</samp></li>
</ul>
<p> </p>
<p id="rfc.section.5.8.6.p.2">The 802.15.4 short address of this node. </p>
<p id="rfc.section.5.8.6.p.3">This property is only present on NCPs which implement 802.15.4 </p>
<h1 id="rfc.section.5.8.7"><a href="#rfc.section.5.8.7">5.8.7.</a> <a href="#prop-mac-15-4-panid" id="prop-mac-15-4-panid">PROP 54: PROP_MAC_15_4_PANID</a></h1>
<p/>
<ul>
<li>Type: Read-Write</li>
<li>Packed-Encoding: <samp>S</samp></li>
</ul>
<p> </p>
<p id="rfc.section.5.8.7.p.2">The 802.15.4 PANID this node is associated with. </p>
<p id="rfc.section.5.8.7.p.3">This property is only present on NCPs which implement 802.15.4 </p>
<h1 id="rfc.section.5.8.8"><a href="#rfc.section.5.8.8">5.8.8.</a> <a href="#prop-mac-raw-stream-enabled" id="prop-mac-raw-stream-enabled">PROP 55: PROP_MAC_RAW_STREAM_ENABLED</a></h1>
<p/>
<ul>
<li>Type: Read-Write</li>
<li>Packed-Encoding: <samp>b</samp></li>
</ul>
<p> </p>
<p id="rfc.section.5.8.8.p.2">Set to true to enable raw MAC frames to be emitted from <samp>PROP_STREAM_RAW</samp>. See <a href="#prop-stream-raw">Section 5.6.2</a>. </p>
<h1 id="rfc.section.5.8.9"><a href="#rfc.section.5.8.9">5.8.9.</a> <a href="#prop-mac-promiscuous-mode" id="prop-mac-promiscuous-mode">PROP 56: PROP_MAC_PROMISCUOUS_MODE</a></h1>
<p/>
<ul>
<li>Type: Read-Write</li>
<li>Packed-Encoding: <samp>C</samp></li>
</ul>
<p> </p>
<p id="rfc.section.5.8.9.p.2">Possible Values: </p>
<table cellpadding="3" cellspacing="0" class="tt full center">
<thead>
<tr>
<th class="center">Id</th>
<th class="center">Name</th>
<th class="center">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="center">0</td>
<td class="center">
<samp>MAC_PROMISCUOUS_MODE_OFF</samp>
</td>
<td class="center">Normal MAC filtering is in place.</td>
</tr>
<tr>
<td class="center">1</td>
<td class="center">
<samp>MAC_PROMISCUOUS_MODE_NETWORK</samp>
</td>
<td class="center">All MAC packets matching network are passed up the stack.</td>
</tr>
<tr>
<td class="center">2</td>
<td class="center">
<samp>MAC_PROMISCUOUS_MODE_FULL</samp>
</td>
<td class="center">All decoded MAC packets are passed up the stack.</td>
</tr>
</tbody>
</table>
<p id="rfc.section.5.8.9.p.3">See <a href="#prop-stream-raw">Section 5.6.2</a>. </p>
<h1 id="rfc.section.5.8.10"><a href="#rfc.section.5.8.10">5.8.10.</a> <a href="#prop-mac-escan-result" id="prop-mac-escan-result">PROP 57: PROP_MAC_ENERGY_SCAN_RESULT</a></h1>
<p/>
<ul>
<li>Type: Read-Only-Stream</li>
<li>Packed-Encoding: <samp>Cc</samp></li>
</ul>
<p> </p>
<p id="rfc.section.5.8.10.p.2">This property is emitted during energy scan operation per scanned channel with following format: </p>
<p/>
<ul>
<li><samp>C</samp>: Channel</li>
<li><samp>c</samp>: RSSI (in dBm)</li>
</ul>
<p> </p>
<h1 id="rfc.section.5.8.11"><a href="#rfc.section.5.8.11">5.8.11.</a> <a href="#prop-mac-whitelist" id="prop-mac-whitelist">PROP 4864: PROP_MAC_WHITELIST</a></h1>
<p/>
<ul>
<li>Type: Read-Write</li>
<li>Packed-Encoding: <samp>A(T(Ec))</samp></li>
<li>Required capability: <samp>CAP_MAC_WHITELIST</samp></li>
</ul>
<p> </p>
<p id="rfc.section.5.8.11.p.2">Structure Parameters: </p>
<p/>
<ul>
<li><samp>E</samp>: EUI64 address of node</li>
<li><samp>c</samp>: Optional RSSI-override value. The value 127 indicates that the RSSI-override feature is not enabled for this address. If this value is omitted when setting or inserting, it is assumed to be 127. This parameter is ignored when removing.</li>
</ul>
<p> </p>
<h1 id="rfc.section.5.8.12"><a href="#rfc.section.5.8.12">5.8.12.</a> <a href="#prop-mac-whitelist-enabled" id="prop-mac-whitelist-enabled">PROP 4865: PROP_MAC_WHITELIST_ENABLED</a></h1>
<p/>
<ul>
<li>Type: Read-Write</li>
<li>Packed-Encoding: <samp>b</samp></li>
<li>Required capability: <samp>CAP_MAC_WHITELIST</samp></li>
</ul>
<p> </p>
<h1 id="rfc.section.5.8.13"><a href="#rfc.section.5.8.13">5.8.13.</a> <a href="#prop-mac-src-match-enabled" id="prop-mac-src-match-enabled">PROP 4867: SPINEL_PROP_MAC_SRC_MATCH_ENABLED</a></h1>
<p/>
<ul>
<li>Type: Write</li>
<li>Packed-Encoding: <samp>b</samp></li>
</ul>
<p> </p>
<p id="rfc.section.5.8.13.p.2">Set to true to enable radio source matching or false to disable it. This property is only available if the <samp>SPINEL_CAP_MAC_RAW</samp> capability is present. The source match functionality is used by radios when generating ACKs. The short and extended address lists are used for settings the Frame Pending bit in the ACKs. </p>
<h1 id="rfc.section.5.8.14"><a href="#rfc.section.5.8.14">5.8.14.</a> <a href="#prop-mac-src-match-short-addresses" id="prop-mac-src-match-short-addresses">PROP 4868: SPINEL_PROP_MAC_SRC_MATCH_SHORT_ADDRESSES</a></h1>
<p/>
<ul>
<li>Type: Write</li>
<li>Packed-Encoding: <samp>A(S)</samp></li>
</ul>
<p> </p>
<p id="rfc.section.5.8.14.p.2">Configures the list of short addresses used for source matching. This property is only available if the <samp>SPINEL_CAP_MAC_RAW</samp> capability is present. </p>
<p id="rfc.section.5.8.14.p.3">Structure Parameters: </p>
<p/>
<ul>
<li><samp>S</samp>: Short address for hardware generated ACKs</li>
</ul>
<p> </p>
<h1 id="rfc.section.5.8.15"><a href="#rfc.section.5.8.15">5.8.15.</a> <a href="#prop-mac-src-match-extended-addresses" id="prop-mac-src-match-extended-addresses">PROP 4869: SPINEL_PROP_MAC_SRC_MATCH_EXTENDED_ADDRESSES</a></h1>
<p/>
<ul>
<li>Type: Write</li>
<li>Packed-Encoding: <samp>A(E)</samp></li>
</ul>
<p> </p>
<p id="rfc.section.5.8.15.p.2">Configures the list of extended addresses used for source matching. This property is only available if the <samp>SPINEL_CAP_MAC_RAW</samp> capability is present. </p>
<p id="rfc.section.5.8.15.p.3">Structure Parameters: </p>
<p/>
<ul>
<li><samp>E</samp>: EUI64 address for hardware generated ACKs</li>
</ul>
<p> </p>
<h1 id="rfc.section.5.8.16"><a href="#rfc.section.5.8.16">5.8.16.</a> <a href="#prop-mac-blacklist" id="prop-mac-blacklist">PROP 4870: PROP_MAC_BLACKLIST</a></h1>
<p/>
<ul>
<li>Type: Read-Write</li>
<li>Packed-Encoding: <samp>A(T(E))</samp></li>
<li>Required capability: <samp>CAP_MAC_WHITELIST</samp></li>
</ul>
<p> </p>
<p id="rfc.section.5.8.16.p.2">Structure Parameters: </p>
<p/>
<ul>
<li><samp>E</samp>: EUI64 address of node</li>
</ul>
<p> </p>
<h1 id="rfc.section.5.8.17"><a href="#rfc.section.5.8.17">5.8.17.</a> <a href="#prop-mac-blacklist-enabled" id="prop-mac-blacklist-enabled">PROP 4871: PROP_MAC_BLACKLIST_ENABLED</a></h1>
<p/>
<ul>
<li>Type: Read-Write</li>
<li>Packed-Encoding: <samp>b</samp></li>
<li>Required capability: <samp>CAP_MAC_WHITELIST</samp></li>
</ul>
<p> </p>
<h1 id="rfc.section.5.9"><a href="#rfc.section.5.9">5.9.</a> <a href="#prop-net" id="prop-net">NET Properties</a></h1>
<h1 id="rfc.section.5.9.1"><a href="#rfc.section.5.9.1">5.9.1.</a> <a href="#prop-net-saved" id="prop-net-saved">PROP 64: PROP_NET_SAVED</a></h1>
<p/>
<ul>
<li>Type: Read-Only</li>
<li>Packed-Encoding: <samp>b</samp></li>
</ul>
<p> </p>
<p id="rfc.section.5.9.1.p.2">Returns true if there is a network state stored/saved. </p>
<h1 id="rfc.section.5.9.2"><a href="#rfc.section.5.9.2">5.9.2.</a> <a href="#prop-net-if-up" id="prop-net-if-up">PROP 65: PROP_NET_IF_UP</a></h1>
<p/>
<ul>
<li>Type: Read-Write</li>
<li>Packed-Encoding: <samp>b</samp></li>
</ul>
<p> </p>
<p id="rfc.section.5.9.2.p.2">Network interface up/down status. Non-zero (set to 1) indicates up, zero indicates down. </p>
<h1 id="rfc.section.5.9.3"><a href="#rfc.section.5.9.3">5.9.3.</a> <a href="#prop-net-stack-up" id="prop-net-stack-up">PROP 66: PROP_NET_STACK_UP</a></h1>
<p/>
<ul>
<li>Type: Read-Write</li>
<li>Packed-Encoding: <samp>b</samp></li>
<li>Unit: Enumeration</li>
</ul>
<p> </p>
<p id="rfc.section.5.9.3.p.2">Thread stack operational status. Non-zero (set to 1) indicates up, zero indicates down. </p>
<h1 id="rfc.section.5.9.4"><a href="#rfc.section.5.9.4">5.9.4.</a> <a href="#prop-net-role" id="prop-net-role">PROP 67: PROP_NET_ROLE</a></h1>
<p/>
<ul>
<li>Type: Read-Write</li>
<li>Packed-Encoding: <samp>C</samp></li>
<li>Unit: Enumeration</li>
</ul>
<p> </p>
<p id="rfc.section.5.9.4.p.2">Values: </p>
<p/>
<ul>
<li>0: <samp>NET_ROLE_DETACHED</samp></li>
<li>1: <samp>NET_ROLE_CHILD</samp></li>
<li>2: <samp>NET_ROLE_ROUTER</samp></li>
<li>3: <samp>NET_ROLE_LEADER</samp></li>
</ul>
<p> </p>
<h1 id="rfc.section.5.9.5"><a href="#rfc.section.5.9.5">5.9.5.</a> <a href="#prop-net-network-name" id="prop-net-network-name">PROP 68: PROP_NET_NETWORK_NAME</a></h1>
<p/>
<ul>
<li>Type: Read-Write</li>
<li>Packed-Encoding: <samp>U</samp></li>
</ul>
<p> </p>
<h1 id="rfc.section.5.9.6"><a href="#rfc.section.5.9.6">5.9.6.</a> <a href="#prop-net-xpanid" id="prop-net-xpanid">PROP 69: PROP_NET_XPANID</a></h1>
<p/>
<ul>
<li>Type: Read-Write</li>
<li>Packed-Encoding: <samp>D</samp></li>
</ul>
<p> </p>
<h1 id="rfc.section.5.9.7"><a href="#rfc.section.5.9.7">5.9.7.</a> <a href="#prop-net-master-key" id="prop-net-master-key">PROP 70: PROP_NET_MASTER_KEY</a></h1>
<p/>
<ul>
<li>Type: Read-Write</li>
<li>Packed-Encoding: <samp>D</samp></li>
</ul>
<p> </p>
<h1 id="rfc.section.5.9.8"><a href="#rfc.section.5.9.8">5.9.8.</a> <a href="#prop-net-key-sequence-counter" id="prop-net-key-sequence-counter">PROP 71: PROP_NET_KEY_SEQUENCE_COUNTER</a></h1>
<p/>
<ul>
<li>Type: Read-Write</li>
<li>Packed-Encoding: <samp>L</samp></li>
</ul>
<p> </p>
<h1 id="rfc.section.5.9.9"><a href="#rfc.section.5.9.9">5.9.9.</a> <a href="#prop-net-partition-id" id="prop-net-partition-id">PROP 72: PROP_NET_PARTITION_ID</a></h1>
<p/>
<ul>
<li>Type: Read-Write</li>
<li>Packed-Encoding: <samp>L</samp></li>
</ul>
<p> </p>
<p id="rfc.section.5.9.9.p.2">The partition ID of the partition that this node is a member of. </p>
<h1 id="rfc.section.5.9.10"><a href="#rfc.section.5.9.10">5.9.10.</a> <a href="#prop-net-require-join-existing" id="prop-net-require-join-existing">PROP 73: PROP_NET_REQUIRE_JOIN_EXISTING</a></h1>
<p/>
<ul>
<li>Type: Read-Write</li>
<li>Packed-Encoding: <samp>b</samp></li>
</ul>
<p> </p>
<h1 id="rfc.section.5.9.11"><a href="#rfc.section.5.9.11">5.9.11.</a> <a href="#prop-net-key-swtich-guardtime" id="prop-net-key-swtich-guardtime">PROP 74: PROP_NET_KEY_SWITCH_GUARDTIME</a></h1>
<p/>
<ul>
<li>Type: Read-Write</li>
<li>Packed-Encoding: <samp>L</samp></li>
</ul>
<p> </p>
<h1 id="rfc.section.5.9.12"><a href="#rfc.section.5.9.12">5.9.12.</a> <a href="#prop-net-pskc" id="prop-net-pskc">PROP 75: PROP_NET_PSKC</a></h1>
<p/>
<ul>
<li>Type: Read-Write</li>
<li>Packed-Encoding: <samp>D</samp></li>
</ul>
<p> </p>
<h1 id="rfc.section.5.10"><a href="#rfc.section.5.10">5.10.</a> <a href="#prop-ipv6" id="prop-ipv6">IPv6 Properties</a></h1>
<h1 id="rfc.section.5.10.1"><a href="#rfc.section.5.10.1">5.10.1.</a> <a href="#prop-ipv6-ll-addr" id="prop-ipv6-ll-addr">PROP 96: PROP_IPV6_LL_ADDR</a></h1>
<p/>
<ul>
<li>Type: Read-Only</li>
<li>Packed-Encoding: <samp>6</samp></li>
</ul>
<p> </p>
<p id="rfc.section.5.10.1.p.2">IPv6 Address </p>
<h1 id="rfc.section.5.10.2"><a href="#rfc.section.5.10.2">5.10.2.</a> <a href="#prop-ipv6-ml-addr" id="prop-ipv6-ml-addr">PROP 97: PROP_IPV6_ML_ADDR</a></h1>
<p/>
<ul>
<li>Type: Read-Only</li>
<li>Packed-Encoding: <samp>6</samp></li>
</ul>
<p> </p>
<p id="rfc.section.5.10.2.p.2">IPv6 Address + Prefix Length </p>
<h1 id="rfc.section.5.10.3"><a href="#rfc.section.5.10.3">5.10.3.</a> <a href="#prop-ipv6-ml-prefix" id="prop-ipv6-ml-prefix">PROP 98: PROP_IPV6_ML_PREFIX</a></h1>
<p/>
<ul>
<li>Type: Read-Write</li>
<li>Packed-Encoding: <samp>6C</samp></li>
</ul>
<p> </p>
<p id="rfc.section.5.10.3.p.2">IPv6 Prefix + Prefix Length </p>
<h1 id="rfc.section.5.10.4"><a href="#rfc.section.5.10.4">5.10.4.</a> <a href="#prop-ipv6-address-table" id="prop-ipv6-address-table">PROP 99: PROP_IPV6_ADDRESS_TABLE</a></h1>
<p/>
<ul>
<li>Type: Read-Write</li>
<li>Packed-Encoding: <samp>A(t(6CLLC))</samp></li>
</ul>
<p> </p>
<p id="rfc.section.5.10.4.p.2">Array of structures containing: </p>
<p/>
<ul>
<li><samp>6</samp>: IPv6 Address</li>
<li><samp>C</samp>: Network Prefix Length</li>
<li><samp>L</samp>: Valid Lifetime</li>
<li><samp>L</samp>: Preferred Lifetime</li>
<li><samp>C</samp>: Flags</li>
</ul>
<p> </p>
<h1 id="rfc.section.5.10.5"><a href="#rfc.section.5.10.5">5.10.5.</a> <a href="#prop-101-propipv6icmppingoffload" id="prop-101-propipv6icmppingoffload">PROP 101: PROP_IPv6_ICMP_PING_OFFLOAD</a></h1>
<p/>
<ul>
<li>Type: Read-Write</li>
<li>Packed-Encoding: <samp>b</samp></li>
</ul>
<p> </p>
<p id="rfc.section.5.10.5.p.2">Allow the NCP to directly respond to ICMP ping requests. If this is turned on, ping request ICMP packets will not be passed to the host. </p>
<p id="rfc.section.5.10.5.p.3">Default value is <samp>false</samp>. </p>
<h1 id="rfc.section.5.11"><a href="#rfc.section.5.11">5.11.</a> <a href="#prop-debug" id="prop-debug">Debug Properties</a></h1>
<h1 id="rfc.section.5.11.1"><a href="#rfc.section.5.11.1">5.11.1.</a> <a href="#prop-debug-test-assert" id="prop-debug-test-assert">PROP 16384: PROP_DEBUG_TEST_ASSERT</a></h1>
<p/>
<ul>
<li>Type: Read-Only</li>
<li>Packed-Encoding: <samp>b</samp></li>
</ul>
<p> </p>
<p id="rfc.section.5.11.1.p.2">Reading this property will cause an assert on the NCP. This is intended for testing the assert functionality of underlying platform/NCP. Assert should ideally cause the NCP to reset, but if <samp>assert</samp> is not supported or disabled boolean value of <samp>false</samp> is returned in response. </p>
<h1 id="rfc.section.5.11.2"><a href="#rfc.section.5.11.2">5.11.2.</a> <a href="#prop-debug-ncp-log-level" id="prop-debug-ncp-log-level">PROP 16385: PROP_DEBUG_NCP_LOG_LEVEL</a></h1>
<p/>
<ul>
<li>Type: Read-Write</li>
<li>Packed-Encoding: <samp>C</samp></li>
</ul>
<p> </p>
<p id="rfc.section.5.11.2.p.2">Provides access to the NCP log level. Currently defined values are (which follows the RFC 5424): </p>
<p/>
<ul>
<li>0: Emergency (emerg).</li>
<li>1: Alert (alert).</li>
<li>2: Critical (crit).</li>
<li>3: Error (err).</li>
<li>4: Warning (warn).</li>
<li>5: Notice (notice).</li>
<li>6: Information (info).</li>
<li>7: Debug (debug).</li>
</ul>
<p> </p>
<p id="rfc.section.5.11.2.p.4">If the NCP supports dynamic log level control, setting this property changes the log level accordingly. Getting the value returns the current log level. If the dynamic log level control is not supported, setting this property returns a <samp>PROP_LAST_STATUS</samp> with <samp>STATUS_INVALID_COMMAND_FOR_PROP</samp>. </p>
<h1 id="rfc.section.6"><a href="#rfc.section.6">6.</a> <a href="#status-codes" id="status-codes">Status Codes</a></h1>
<p id="rfc.section.6.p.1">Status codes are sent from the NCP to the host via <samp>PROP_LAST_STATUS</samp> using the <samp>CMD_VALUE_IS</samp> command to indicate the return status of a previous command. As with any response, the TID field of the FLAG byte is used to correlate the response with the request. </p>
<p id="rfc.section.6.p.2">Note that most successfully executed commands do not indicate a last status of <samp>STATUS_OK</samp>. The usual way the NCP indicates a successful command is to mirror the property change back to the host. For example, if you do a <samp>CMD_VALUE_SET</samp> on <samp>PROP_PHY_ENABLED</samp>, the NCP would indicate success by responding with a <samp>CMD_VALUE_IS</samp> for <samp>PROP_PHY_ENABLED</samp>. If the command failed, <samp>PROP_LAST_STATUS</samp> would be emitted instead. </p>
<p id="rfc.section.6.p.3">See <a href="#prop-last-status">Section 5.5.1</a> for more information on <samp>PROP_LAST_STATUS</samp>. </p>
<p/>
<ul>
<li>0: <samp>STATUS_OK</samp>: Operation has completed successfully.</li>
<li>1: <samp>STATUS_FAILURE</samp>: Operation has failed for some undefined reason.</li>
<li>2: <samp>STATUS_UNIMPLEMENTED</samp>: The given operation has not been implemented.</li>
<li>3: <samp>STATUS_INVALID_ARGUMENT</samp>: An argument to the given operation is invalid.</li>
<li>4: <samp>STATUS_INVALID_STATE</samp> : The given operation is invalid for the current state of the device.</li>
<li>5: <samp>STATUS_INVALID_COMMAND</samp>: The given command is not recognized.</li>
<li>6: <samp>STATUS_INVALID_INTERFACE</samp>: The given Spinel interface is not supported.</li>
<li>7: <samp>STATUS_INTERNAL_ERROR</samp>: An internal runtime error has occurred.</li>
<li>8: <samp>STATUS_SECURITY_ERROR</samp>: A security or authentication error has occurred.</li>
<li>9: <samp>STATUS_PARSE_ERROR</samp>: An error has occurred while parsing the command.</li>
<li>10: <samp>STATUS_IN_PROGRESS</samp>: The operation is in progress and will be completed asynchronously.</li>
<li>11: <samp>STATUS_NOMEM</samp>: The operation has been prevented due to memory pressure.</li>
<li>12: <samp>STATUS_BUSY</samp>: The device is currently performing a mutually exclusive operation.</li>
<li>13: <samp>STATUS_PROP_NOT_FOUND</samp>: The given property is not recognized.</li>
<li>14: <samp>STATUS_PACKET_DROPPED</samp>: The packet was dropped.</li>
<li>15: <samp>STATUS_EMPTY</samp>: The result of the operation is empty.</li>
<li>16: <samp>STATUS_CMD_TOO_BIG</samp>: The command was too large to fit in the internal buffer.</li>
<li>17: <samp>STATUS_NO_ACK</samp>: The packet was not acknowledged.</li>
<li>18: <samp>STATUS_CCA_FAILURE</samp>: The packet was not sent due to a CCA failure.</li>
<li>19: <samp>STATUS_ALREADY</samp>: The operation is already in progress or the property was already set to the given value.</li>
<li>20: <samp>STATUS_ITEM_NOT_FOUND</samp>: The given item could not be found in the property.</li>
<li>21: <samp>STATUS_INVALID_COMMAND_FOR_PROP</samp>: The given command cannot be performed on this property.</li>
<li>22-111: RESERVED</li>
<li>112-127: Reset Causes <ul><li>112: <samp>STATUS_RESET_POWER_ON</samp></li><li>113: <samp>STATUS_RESET_EXTERNAL</samp></li><li>114: <samp>STATUS_RESET_SOFTWARE</samp></li><li>115: <samp>STATUS_RESET_FAULT</samp></li><li>116: <samp>STATUS_RESET_CRASH</samp></li><li>117: <samp>STATUS_RESET_ASSERT</samp></li><li>118: <samp>STATUS_RESET_OTHER</samp></li><li>119: <samp>STATUS_RESET_UNKNOWN</samp></li><li>120: <samp>STATUS_RESET_WATCHDOG</samp></li><li>121-127: RESERVED-RESET-CODES</li></ul></li>
<li>128 - 15,359: UNALLOCATED</li>
<li>15,360 - 16,383: Vendor-specific</li>
<li>16,384 - 1,999,999: UNALLOCATED</li>
<li>2,000,000 - 2,097,151: Experimental Use Only (MUST NEVER be used in production!)</li>
</ul>
<p> </p>
<h1 id="rfc.section.7"><a href="#rfc.section.7">7.</a> <a href="#tech-thread" id="tech-thread">Technology: Thread(R)</a></h1>
<p id="rfc.section.7.p.1">This section describes all of the properties and semantics required for managing a Thread(R) NCP. </p>
<p id="rfc.section.7.p.2">Thread(R) NCPs have the following requirements: </p>
<p/>
<ul>
<li>The property <samp>PROP_INTERFACE_TYPE</samp> must be 3.</li>
<li>The non-optional properties in the following sections MUST be implemented: CORE, PHY, MAC, NET, and IPV6.</li>
</ul>
<p> </p>
<p id="rfc.section.7.p.4">All serious implementations of an NCP SHOULD also support the network save feature (See <a href="#feature-network-save">Section 8</a>). </p>
<h1 id="rfc.section.7.1"><a href="#rfc.section.7.1">7.1.</a> <a href="#thread-caps" id="thread-caps">Capabilities</a></h1>
<p id="rfc.section.7.1.p.1">The Thread(R) technology defines the following capabilities: </p>
<p/>
<ul>
<li><samp>CAP_NET_THREAD_1_0</samp> - Indicates that the NCP implements v1.0 of the Thread(R) standard.</li>
<li><samp>CAP_NET_THREAD_1_1</samp> - Indicates that the NCP implements v1.1 of the Thread(R) standard.</li>
</ul>
<p> </p>
<h1 id="rfc.section.7.2"><a href="#rfc.section.7.2">7.2.</a> <a href="#thread-properties" id="thread-properties">Properties</a></h1>
<p id="rfc.section.7.2.p.1">Properties for Thread(R) are allocated out of the <samp>Tech</samp> property section (see <a href="#property-sections">Section 5.4</a>). </p>
<h1 id="rfc.section.7.2.1"><a href="#rfc.section.7.2.1">7.2.1.</a> <a href="#prop-80-propthreadleaderaddr" id="prop-80-propthreadleaderaddr">PROP 80: PROP_THREAD_LEADER_ADDR</a></h1>
<p/>
<ul>
<li>Type: Read-Only</li>
<li>Packed-Encoding: <samp>6</samp></li>
</ul>
<p> </p>
<p id="rfc.section.7.2.1.p.2">The IPv6 address of the leader. (Note: May change to long and short address of leader) </p>
<h1 id="rfc.section.7.2.2"><a href="#rfc.section.7.2.2">7.2.2.</a> <a href="#prop-81-propthreadparent" id="prop-81-propthreadparent">PROP 81: PROP_THREAD_PARENT</a></h1>
<p/>
<ul>
<li>Type: Read-Only</li>
<li>Packed-Encoding: <samp>ES</samp></li>
<li>LADDR, SADDR</li>
</ul>
<p> </p>
<p id="rfc.section.7.2.2.p.2">The long address and short address of the parent of this node. </p>
<h1 id="rfc.section.7.2.3"><a href="#rfc.section.7.2.3">7.2.3.</a> <a href="#prop-82-propthreadchildtable" id="prop-82-propthreadchildtable">PROP 82: PROP_THREAD_CHILD_TABLE</a></h1>
<p/>
<ul>
<li>Type: Read-Only</li>
<li>Packed-Encoding: <samp>A(t(ES))</samp></li>
</ul>
<p> </p>
<p id="rfc.section.7.2.3.p.2">Table containing the long and short addresses of all the children of this node. </p>
<h1 id="rfc.section.7.2.4"><a href="#rfc.section.7.2.4">7.2.4.</a> <a href="#prop-83-propthreadleaderrid" id="prop-83-propthreadleaderrid">PROP 83: PROP_THREAD_LEADER_RID</a></h1>
<p/>
<ul>
<li>Type: Read-Only</li>
<li>Packed-Encoding: <samp>C</samp></li>
</ul>
<p> </p>
<p id="rfc.section.7.2.4.p.2">The router-id of the current leader. </p>
<h1 id="rfc.section.7.2.5"><a href="#rfc.section.7.2.5">7.2.5.</a> <a href="#prop-84-propthreadleaderweight" id="prop-84-propthreadleaderweight">PROP 84: PROP_THREAD_LEADER_WEIGHT</a></h1>
<p/>
<ul>
<li>Type: Read-Only</li>
<li>Packed-Encoding: <samp>C</samp></li>
</ul>
<p> </p>
<p id="rfc.section.7.2.5.p.2">The leader weight of the current leader. </p>
<h1 id="rfc.section.7.2.6"><a href="#rfc.section.7.2.6">7.2.6.</a> <a href="#prop-85-propthreadlocalleaderweight" id="prop-85-propthreadlocalleaderweight">PROP 85: PROP_THREAD_LOCAL_LEADER_WEIGHT</a></h1>
<p/>
<ul>
<li>Type: Read-Write</li>
<li>Packed-Encoding: <samp>C</samp></li>
</ul>
<p> </p>
<p id="rfc.section.7.2.6.p.2">The leader weight for this node. </p>
<h1 id="rfc.section.7.2.7"><a href="#rfc.section.7.2.7">7.2.7.</a> <a href="#prop-86-propthreadnetworkdata" id="prop-86-propthreadnetworkdata">PROP 86: PROP_THREAD_NETWORK_DATA</a></h1>
<p/>
<ul>
<li>Type: Read-Only</li>
<li>Packed-Encoding: <samp>D</samp></li>
</ul>
<p> </p>
<p id="rfc.section.7.2.7.p.2">The local network data. </p>
<h1 id="rfc.section.7.2.8"><a href="#rfc.section.7.2.8">7.2.8.</a> <a href="#prop-87-propthreadnetworkdataversion" id="prop-87-propthreadnetworkdataversion">PROP 87: PROP_THREAD_NETWORK_DATA_VERSION</a></h1>
<p/>
<ul>
<li>Type: Read-Only</li>
<li>Packed-Encoding: <samp>S</samp></li>
</ul>
<p> </p>
<h1 id="rfc.section.7.2.9"><a href="#rfc.section.7.2.9">7.2.9.</a> <a href="#prop-88-propthreadstablenetworkdata" id="prop-88-propthreadstablenetworkdata">PROP 88: PROP_THREAD_STABLE_NETWORK_DATA</a></h1>
<p/>
<ul>
<li>Type: Read-Only</li>
<li>Packed-Encoding: <samp>D</samp></li>
</ul>
<p> </p>
<p id="rfc.section.7.2.9.p.2">The local stable network data. </p>
<h1 id="rfc.section.7.2.10"><a href="#rfc.section.7.2.10">7.2.10.</a> <a href="#prop-89-propthreadstablenetworkdataversion" id="prop-89-propthreadstablenetworkdataversion">PROP 89: PROP_THREAD_STABLE_NETWORK_DATA_VERSION</a></h1>
<p/>
<ul>
<li>Type: Read-Only</li>
<li>Packed-Encoding: <samp>S</samp></li>
</ul>
<p> </p>
<h1 id="rfc.section.7.2.11"><a href="#rfc.section.7.2.11">7.2.11.</a> <a href="#prop-90-propthreadonmeshnets" id="prop-90-propthreadonmeshnets">PROP 90: PROP_THREAD_ON_MESH_NETS</a></h1>
<p/>
<ul>
<li>Type: Read-Write</li>
<li>Packed-Encoding: <samp>A(t(6CbCb))</samp></li>
</ul>
<p> </p>
<p id="rfc.section.7.2.11.p.2">Data per item is: </p>
<p/>
<ul>
<li><samp>6</samp>: IPv6 Prefix</li>
<li><samp>C</samp>: Prefix length in bits</li>
<li><samp>b</samp>: Stable flag</li>
<li><samp>C</samp>: TLV flags</li>
<li><samp>b</samp>: "Is defined locally" flag. Set if this network was locally defined. Assumed to be true for set, insert and replace. Clear if the on mesh network was defined by another node.</li>
</ul>
<p> </p>
<h1 id="rfc.section.7.2.12"><a href="#rfc.section.7.2.12">7.2.12.</a> <a href="#prop-91-propthreadoffmeshroutes" id="prop-91-propthreadoffmeshroutes">PROP 91: PROP_THREAD_OFF_MESH_ROUTES</a></h1>
<p/>
<ul>
<li>Type: Read-Write</li>
<li>Packed-Encoding: <samp>A(t(6CbCbb))</samp></li>
</ul>
<p> </p>
<p id="rfc.section.7.2.12.p.2">Data per item is: </p>
<p/>
<ul>
<li><samp>6</samp>: Route Prefix</li>
<li><samp>C</samp>: Prefix length in bits</li>
<li><samp>b</samp>: Stable flag</li>
<li><samp>C</samp>: Route preference flags</li>
<li><samp>b</samp>: "Is defined locally" flag. Set if this route info was locally defined as part of local network data. Assumed to be true for set, insert and replace. Clear if the route is part of partition's network data.</li>
<li><samp>b</samp>: "Next hop is this device" flag. Set if the next hop for the route is this device itself (i.e., route was added by this device) This value is ignored when adding an external route. For any added route the next hop is this device.</li>
</ul>
<p> </p>
<h1 id="rfc.section.7.2.13"><a href="#rfc.section.7.2.13">7.2.13.</a> <a href="#prop-92-propthreadassistingports" id="prop-92-propthreadassistingports">PROP 92: PROP_THREAD_ASSISTING_PORTS</a></h1>
<p/>
<ul>
<li>Type: Read-Write</li>
<li>Packed-Encoding: <samp>A(S)</samp></li>
</ul>
<p> </p>
<h1 id="rfc.section.7.2.14"><a href="#rfc.section.7.2.14">7.2.14.</a> <a href="#prop-93-propthreadallowlocalnetdatachange" id="prop-93-propthreadallowlocalnetdatachange">PROP 93: PROP_THREAD_ALLOW_LOCAL_NET_DATA_CHANGE</a></h1>
<p/>
<ul>
<li>Type: Read-Write</li>
<li>Packed-Encoding: <samp>b</samp></li>
</ul>
<p> </p>
<p id="rfc.section.7.2.14.p.2">Set to true before changing local net data. Set to false when finished. This allows changes to be aggregated into single events. </p>
<h1 id="rfc.section.7.2.15"><a href="#rfc.section.7.2.15">7.2.15.</a> <a href="#prop-94-propthreadmode" id="prop-94-propthreadmode">PROP 94: PROP_THREAD_MODE</a></h1>
<p/>
<ul>
<li>Type: Read-Write</li>
<li>Packed-Encoding: <samp>C</samp></li>
</ul>
<p> </p>
<p id="rfc.section.7.2.15.p.2">This property contains the value of the mode TLV for this node. The meaning of the bits in this bitfield are defined by section 4.5.2 of the Thread(R) specification. </p>
<h1 id="rfc.section.7.2.16"><a href="#rfc.section.7.2.16">7.2.16.</a> <a href="#prop-5376-propthreadchildtimeout" id="prop-5376-propthreadchildtimeout">PROP 5376: PROP_THREAD_CHILD_TIMEOUT</a></h1>
<p/>
<ul>
<li>Type: Read-Write</li>
<li>Packed-Encoding: <samp>L</samp></li>
</ul>
<p> </p>
<p id="rfc.section.7.2.16.p.2">Used when operating in the Child role. </p>
<h1 id="rfc.section.7.2.17"><a href="#rfc.section.7.2.17">7.2.17.</a> <a href="#prop-5377-propthreadrloc16" id="prop-5377-propthreadrloc16">PROP 5377: PROP_THREAD_RLOC16</a></h1>
<p/>
<ul>
<li>Type: Read-Write</li>
<li>Packed-Encoding: <samp>S</samp></li>
</ul>
<p> </p>
<h1 id="rfc.section.7.2.18"><a href="#rfc.section.7.2.18">7.2.18.</a> <a href="#prop-5378-propthreadrouterupgradethreshold" id="prop-5378-propthreadrouterupgradethreshold">PROP 5378: PROP_THREAD_ROUTER_UPGRADE_THRESHOLD</a></h1>
<p/>
<ul>
<li>Type: Read-Write</li>
<li>Packed-Encoding: <samp>C</samp></li>
</ul>
<p> </p>
<h1 id="rfc.section.7.2.19"><a href="#rfc.section.7.2.19">7.2.19.</a> <a href="#prop-5379-propthreadcontextreusedelay" id="prop-5379-propthreadcontextreusedelay">PROP 5379: PROP_THREAD_CONTEXT_REUSE_DELAY</a></h1>
<p/>
<ul>
<li>Type: Read-Write</li>
<li>Packed-Encoding: <samp>L</samp></li>
</ul>
<p> </p>
<h1 id="rfc.section.7.2.20"><a href="#rfc.section.7.2.20">7.2.20.</a> <a href="#prop-5380-propthreadnetworkidtimeout" id="prop-5380-propthreadnetworkidtimeout">PROP 5380: PROP_THREAD_NETWORK_ID_TIMEOUT</a></h1>
<p/>
<ul>
<li>Type: Read-Write</li>
<li>Packed-Encoding: <samp>C</samp></li>
</ul>
<p> </p>
<p id="rfc.section.7.2.20.p.2">Allows you to get or set the Thread(R) <samp>NETWORK_ID_TIMEOUT</samp> constant, as defined by the Thread(R) specification. </p>
<h1 id="rfc.section.7.2.21"><a href="#rfc.section.7.2.21">7.2.21.</a> <a href="#prop-5381-propthreadactiverouterids" id="prop-5381-propthreadactiverouterids">PROP 5381: PROP_THREAD_ACTIVE_ROUTER_IDS</a></h1>
<p/>
<ul>
<li>Type: Read-Write/Write-Only</li>
<li>Packed-Encoding: <samp>A(C)</samp> (List of active thread router ids)</li>
</ul>
<p> </p>
<p id="rfc.section.7.2.21.p.2">Note that some implementations may not support <samp>CMD_GET_VALUE</samp> router ids, but may support <samp>CMD_REMOVE_VALUE</samp> when the node is a leader. </p>
<h1 id="rfc.section.7.2.22"><a href="#rfc.section.7.2.22">7.2.22.</a> <a href="#prop-5382-propthreadrloc16debugpassthru" id="prop-5382-propthreadrloc16debugpassthru">PROP 5382: PROP_THREAD_RLOC16_DEBUG_PASSTHRU</a></h1>
<p/>
<ul>
<li>Type: Read-Write</li>
<li>Packed-Encoding: <samp>b</samp></li>
</ul>
<p> </p>
<p id="rfc.section.7.2.22.p.2">Allow the HOST to directly observe all IPv6 packets received by the NCP, including ones sent to the RLOC16 address. </p>
<p id="rfc.section.7.2.22.p.3">Default value is <samp>false</samp>. </p>
<h1 id="rfc.section.7.2.23"><a href="#rfc.section.7.2.23">7.2.23.</a> <a href="#prop-5383-propthreadrouterroleenabled" id="prop-5383-propthreadrouterroleenabled">PROP 5383: PROP_THREAD_ROUTER_ROLE_ENABLED</a></h1>
<p/>
<ul>
<li>Type: Read-Write</li>
<li>Packed-Encoding: <samp>b</samp></li>
</ul>
<p> </p>
<p id="rfc.section.7.2.23.p.2">Allow the HOST to indicate whether or not the router role is enabled. If current role is a router, setting this property to <samp>false</samp> starts a re-attach process as an end-device. </p>
<h1 id="rfc.section.7.2.24"><a href="#rfc.section.7.2.24">7.2.24.</a> <a href="#prop-5384-propthreadrouterdowngradethreshold" id="prop-5384-propthreadrouterdowngradethreshold">PROP 5384: PROP_THREAD_ROUTER_DOWNGRADE_THRESHOLD</a></h1>
<p/>
<ul>
<li>Type: Read-Write</li>
<li>Packed-Encoding: <samp>C</samp></li>
</ul>
<p> </p>
<h1 id="rfc.section.7.2.25"><a href="#rfc.section.7.2.25">7.2.25.</a> <a href="#prop-5385-propthreadrouterselectionjitter" id="prop-5385-propthreadrouterselectionjitter">PROP 5385: PROP_THREAD_ROUTER_SELECTION_JITTER</a></h1>
<p/>
<ul>
<li>Type: Read-Write</li>
<li>Packed-Encoding: <samp>C</samp></li>
</ul>
<p> </p>
<p id="rfc.section.7.2.25.p.2">Specifies the self imposed random delay in seconds a REED waits before registering to become an Active Router. </p>
<h1 id="rfc.section.7.2.26"><a href="#rfc.section.7.2.26">7.2.26.</a> <a href="#prop-5386-propthreadpreferredrouterid" id="prop-5386-propthreadpreferredrouterid">PROP 5386: PROP_THREAD_PREFERRED_ROUTER_ID</a></h1>
<p/>
<ul>
<li>Type: Write-Only</li>
<li>Packed-Encoding: <samp>C</samp></li>
</ul>
<p> </p>
<p id="rfc.section.7.2.26.p.2">Specifies 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. </p>
<h1 id="rfc.section.7.2.27"><a href="#rfc.section.7.2.27">7.2.27.</a> <a href="#prop-5387-propthreadneighbortable" id="prop-5387-propthreadneighbortable">PROP 5387: PROP_THREAD_NEIGHBOR_TABLE</a></h1>
<p/>
<ul>
<li>Type: Read-Only</li>
<li>Packed-Encoding: <samp>A(t(ESLCcCbLL))</samp></li>
</ul>
<p> </p>
<p id="rfc.section.7.2.27.p.2">Data per item is: </p>
<p/>
<ul>
<li><samp>E</samp>: Extended/long address</li>
<li><samp>S</samp>: RLOC16</li>
<li><samp>L</samp>: Age</li>
<li><samp>C</samp>: Link Quality In</li>
<li><samp>c</samp>: Average RSS</li>
<li><samp>C</samp>: Mode (bit-flags)</li>
<li><samp>b</samp>: <samp>true</samp> if neighbor is a child, <samp>false</samp> otherwise.</li>
<li><samp>L</samp>: Link Frame Counter</li>
<li><samp>L</samp>: MLE Frame Counter</li>
</ul>
<p> </p>
<h1 id="rfc.section.7.2.28"><a href="#rfc.section.7.2.28">7.2.28.</a> <a href="#prop-5388-propthreadchildcountmax" id="prop-5388-propthreadchildcountmax">PROP 5388: PROP_THREAD_CHILD_COUNT_MAX</a></h1>
<p/>
<ul>
<li>Type: Read-Write</li>
<li>Packed-Encoding: <samp>C</samp></li>
</ul>
<p> </p>
<p id="rfc.section.7.2.28.p.2">Specifies the maximum number of children currently allowed. This parameter can only be set when Thread(R) protocol operation has been stopped. </p>
<h1 id="rfc.section.7.2.29"><a href="#rfc.section.7.2.29">7.2.29.</a> <a href="#prop-5389-propthreadleadernetworkdata" id="prop-5389-propthreadleadernetworkdata">PROP 5389: PROP_THREAD_LEADER_NETWORK_DATA</a></h1>
<p/>
<ul>
<li>Type: Read-Only</li>
<li>Packed-Encoding: <samp>D</samp></li>
</ul>
<p> </p>
<p id="rfc.section.7.2.29.p.2">The leader network data. </p>
<h1 id="rfc.section.7.2.30"><a href="#rfc.section.7.2.30">7.2.30.</a> <a href="#prop-5390-propthreadstableleadernetworkdata" id="prop-5390-propthreadstableleadernetworkdata">PROP 5390: PROP_THREAD_STABLE_LEADER_NETWORK_DATA</a></h1>
<p/>
<ul>
<li>Type: Read-Only</li>
<li>Packed-Encoding: <samp>D</samp></li>
</ul>
<p> </p>
<p id="rfc.section.7.2.30.p.2">The stable leader network data. </p>
<h1 id="rfc.section.7.2.31"><a href="#rfc.section.7.2.31">7.2.31.</a> <a href="#prop-thread-joiners" id="prop-thread-joiners">PROP 5391: PROP_THREAD_JOINERS</a></h1>
<p/>
<ul>
<li>Type: Insert/Remove Only (optionally Read-Write)</li>
<li>Packed-Encoding: <samp>A(t(ULE))</samp></li>
<li>Required capability: <samp>CAP_THREAD_COMMISSIONER</samp></li>
</ul>
<p> </p>
<p id="rfc.section.7.2.31.p.2">Data per item is: </p>
<p/>
<ul>
<li><samp>U</samp>: PSKd</li>
<li><samp>L</samp>: Timeout in seconds</li>
<li><samp>E</samp>: Extended/long address (optional)</li>
</ul>
<p> </p>
<p id="rfc.section.7.2.31.p.4">Passess Pre-Shared Key for the Device to the NCP in the commissioning process. When the Extended address is ommited all Devices which provided a valid PSKd are allowed to join the Thread(R) Network. </p>
<h1 id="rfc.section.7.2.32"><a href="#rfc.section.7.2.32">7.2.32.</a> <a href="#prop-thread-commissioner-enabled" id="prop-thread-commissioner-enabled">PROP 5392: PROP_THREAD_COMMISSIONER_ENABLED</a></h1>
<p/>
<ul>
<li>Type: Write only (optionally Read-Write)</li>
<li>Packed-Encoding: <samp>b</samp></li>
<li>Required capability: <samp>CAP_THREAD_COMMISSIONER</samp></li>
</ul>
<p> </p>
<p id="rfc.section.7.2.32.p.2">Set to true to enable the native commissioner. It is mandatory before adding the joiner to the network. </p>
<h1 id="rfc.section.7.2.33"><a href="#rfc.section.7.2.33">7.2.33.</a> <a href="#prop-thread-tmf-proxy-enabled" id="prop-thread-tmf-proxy-enabled">PROP 5393: PROP_THREAD_TMF_PROXY_ENABLED</a></h1>
<p/>
<ul>
<li>Type: Read-Write</li>
<li>Packed-Encoding: <samp>b</samp></li>
<li>Required capability: <samp>CAP_THREAD_TMF_PROXY</samp></li>
</ul>
<p> </p>
<p id="rfc.section.7.2.33.p.2">Set to true to enable the TMF proxy. </p>
<h1 id="rfc.section.7.2.34"><a href="#rfc.section.7.2.34">7.2.34.</a> <a href="#prop-thread-tmf-proxy-stream" id="prop-thread-tmf-proxy-stream">PROP 5394: PROP_THREAD_TMF_PROXY_STREAM</a></h1>
<p/>
<ul>
<li>Type: Read-Write-Stream</li>
<li>Packed-Encoding: <samp>dSS</samp></li>
<li>Required capability: <samp>CAP_THREAD_TMF_PROXY</samp></li>
</ul>
<p> </p>
<p id="rfc.section.7.2.34.p.2">Data per item is: </p>
<p/>
<ul>
<li><samp>d</samp>: CoAP frame</li>
<li><samp>S</samp>: source/destination RLOC/ALOC</li>
<li><samp>S</samp>: source/destination port</li>
</ul>
<p> </p>
<table cellpadding="3" cellspacing="0" class="tt full center">
<thead>
<tr>
<th class="center">Octects:</th>
<th class="center">2</th>
<th class="center">n</th>
<th class="center">2</th>
<th class="center">2</th>
</tr>
</thead>
<tbody>
<tr>
<td class="center">Fields:</td>
<td class="center">Length</td>
<td class="center">CoAP</td>
<td class="center">locator</td>
<td class="center">port</td>
</tr>
</tbody>
</table>
<p id="rfc.section.7.2.34.p.4">This property allows the host to send and receive TMF messages from the NCP's RLOC address and support Thread-specific border router functions. </p>
<h1 id="rfc.section.7.2.35"><a href="#rfc.section.7.2.35">7.2.35.</a> <a href="#prop-thread-discovery-scan-joiner-flag" id="prop-thread-discovery-scan-joiner-flag">PROP 5395: PROP_THREAD_DISOVERY_SCAN_JOINER_FLAG</a></h1>
<p/>
<ul>
<li>Type: Read-Write</li>
<li>Packed-Encoding:: <samp>b</samp></li>
</ul>
<p> </p>
<p id="rfc.section.7.2.35.p.2">This property specifies the value used in Thread(R) MLE Discovery Request TLV during discovery scan operation. Default value is <samp>false</samp>. </p>
<h1 id="rfc.section.7.2.36"><a href="#rfc.section.7.2.36">7.2.36.</a> <a href="#prop-thread-discovery-scan-enable-filtering" id="prop-thread-discovery-scan-enable-filtering">PROP 5396: PROP_THREAD_DISCOVERY_SCAN_ENABLE_FILTERING</a></h1>
<p/>
<ul>
<li>Type: Read-Write</li>
<li>Packed-Encoding:: <samp>b</samp></li>
</ul>
<p> </p>
<p id="rfc.section.7.2.36.p.2">This property is used to enable/disable EUI64 filtering during discovery scan operation. Default value is <samp>false</samp>. </p>
<h1 id="rfc.section.7.2.37"><a href="#rfc.section.7.2.37">7.2.37.</a> <a href="#prop-thread-discovery-scan-panid" id="prop-thread-discovery-scan-panid">PROP 5397: PROP_THREAD_DISCOVERY_SCAN_PANID</a></h1>
<p/>
<ul>
<li>Type: Read-write</li>
<li>Packed-Encoding:: <samp>S</samp></li>
</ul>
<p> </p>
<p id="rfc.section.7.2.37.p.2">This property specifies the PANID used for filtering during discovery scan operation. Default value is <samp>0xffff</samp> (broadcast PANID) which disables PANID filtering. </p>
<h1 id="rfc.section.7.2.38"><a href="#rfc.section.7.2.38">7.2.38.</a> <a href="#prop-thread-steering-data" id="prop-thread-steering-data">PROP 5398: PROP_THREAD_STEERING_DATA</a></h1>
<p/>
<ul>
<li>Type: Write-Only</li>
<li>Packed-Encoding: <samp>E</samp></li>
<li>Required capability: <samp>CAP_OOB_STEERING_DATA</samp></li>
</ul>
<p> </p>
<p id="rfc.section.7.2.38.p.2">This property can be used to set the steering data for MLE Discovery Response messages. </p>
<p/>
<ul>
<li>All zeros to clear the steering data (indicating no steering data).</li>
<li>All 0xFFs to set the steering data (bloom filter) to accept/allow all.</li>
<li>A specific EUI64 which is then added to steering data/bloom filter.</li>
</ul>
<p> </p>
<h1 id="rfc.section.8"><a href="#rfc.section.8">8.</a> <a href="#feature-network-save" id="feature-network-save">Feature: Network Save</a></h1>
<p id="rfc.section.8.p.1">The network save/recall feature is an optional NCP capability that, when present, allows the host to save and recall network credentials and state to and from nonvolatile storage. </p>
<p id="rfc.section.8.p.2">The presence of the save/recall feature can be detected by checking for the presence of the <samp>CAP_NET_SAVE</samp> capability in <samp>PROP_CAPS</samp>. </p>
<p id="rfc.section.8.p.3">Network clear feature allows host to erase all network credentials and state from non-volatile memory. </p>
<h1 id="rfc.section.8.1"><a href="#rfc.section.8.1">8.1.</a> <a href="#commands-1" id="commands-1">Commands</a></h1>
<h1 id="rfc.section.8.1.1"><a href="#rfc.section.8.1.1">8.1.1.</a> <a href="#cmd-9-hostncp-cmdnetsave" id="cmd-9-hostncp-cmdnetsave">CMD 9: (Host-&gt;NCP) CMD_NET_SAVE</a></h1>
<table cellpadding="3" cellspacing="0" class="tt full center">
<thead>
<tr>
<th class="center">Octets:</th>
<th class="center">1</th>
<th class="center">1</th>
</tr>
</thead>
<tbody>
<tr>
<td class="center">Fields:</td>
<td class="center">HEADER</td>
<td class="center">CMD_NET_SAVE</td>
</tr>
</tbody>
</table>
<p id="rfc.section.8.1.1.p.1">Save network state command. Saves any current network credentials and state necessary to reconnect to the current network to non-volatile memory. </p>
<p id="rfc.section.8.1.1.p.2">This operation affects non-volatile memory only. The current network information stored in volatile memory is unaffected. </p>
<p id="rfc.section.8.1.1.p.3">The response to this command is always a <samp>CMD_PROP_VALUE_IS</samp> for <samp>PROP_LAST_STATUS</samp>, indicating the result of the operation. </p>
<p id="rfc.section.8.1.1.p.4">This command is only available if the <samp>CAP_NET_SAVE</samp> capability is set. </p>
<h1 id="rfc.section.8.1.2"><a href="#rfc.section.8.1.2">8.1.2.</a> <a href="#cmd-10-hostncp-cmdnetclear" id="cmd-10-hostncp-cmdnetclear">CMD 10: (Host-&gt;NCP) CMD_NET_CLEAR</a></h1>
<table cellpadding="3" cellspacing="0" class="tt full center">
<thead>
<tr>
<th class="center">Octets:</th>
<th class="center">1</th>
<th class="center">1</th>
</tr>
</thead>
<tbody>
<tr>
<td class="center">Fields:</td>
<td class="center">HEADER</td>
<td class="center">CMD_NET_CLEAR</td>
</tr>
</tbody>
</table>
<p id="rfc.section.8.1.2.p.1">Clear saved network settings command. Erases all network credentials and state from non-volatile memory. The erased settings include any data saved automatically by the network stack firmware and/or data saved by <samp>CMD_NET_SAVE</samp> operation. </p>
<p id="rfc.section.8.1.2.p.2">This operation affects non-volatile memory only. The current network information stored in volatile memory is unaffected. </p>
<p id="rfc.section.8.1.2.p.3">The response to this command is always a <samp>CMD_PROP_VALUE_IS</samp> for <samp>PROP_LAST_STATUS</samp>, indicating the result of the operation. </p>
<p id="rfc.section.8.1.2.p.4">This command is always available independent of the value of <samp>CAP_NET_SAVE</samp> capability. </p>
<h1 id="rfc.section.8.1.3"><a href="#rfc.section.8.1.3">8.1.3.</a> <a href="#cmd-11-hostncp-cmdnetrecall" id="cmd-11-hostncp-cmdnetrecall">CMD 11: (Host-&gt;NCP) CMD_NET_RECALL</a></h1>
<table cellpadding="3" cellspacing="0" class="tt full center">
<thead>
<tr>
<th class="center">Octets:</th>
<th class="center">1</th>
<th class="center">1</th>
</tr>
</thead>
<tbody>
<tr>
<td class="center">Fields:</td>
<td class="center">HEADER</td>
<td class="center">CMD_NET_RECALL</td>
</tr>
</tbody>
</table>
<p id="rfc.section.8.1.3.p.1">Recall saved network state command. Recalls any previously saved network credentials and state previously stored by <samp>CMD_NET_SAVE</samp> from non-volatile memory. </p>
<p id="rfc.section.8.1.3.p.2">This command will typically generated several unsolicited property updates as the network state is loaded. At the conclusion of loading, the authoritative response to this command is always a <samp>CMD_PROP_VALUE_IS</samp> for <samp>PROP_LAST_STATUS</samp>, indicating the result of the operation. </p>
<p id="rfc.section.8.1.3.p.3">This command is only available if the <samp>CAP_NET_SAVE</samp> capability is set. </p>
<h1 id="rfc.section.9"><a href="#rfc.section.9">9.</a> <a href="#feature-host-buffer-offload" id="feature-host-buffer-offload">Feature: Host Buffer Offload</a></h1>
<p id="rfc.section.9.p.1">The memory on an NCP may be much more limited than the memory on the host processor. In such situations, it is sometimes useful for the NCP to offload buffers to the host processor temporarily so that it can perform other operations. </p>
<p id="rfc.section.9.p.2">Host buffer offload is an optional NCP capability that, when present, allows the NCP to store data buffers on the host processor that can be recalled at a later time. </p>
<p id="rfc.section.9.p.3">The presence of this feature can be detected by the host by checking for the presence of the <samp>CAP_HBO</samp> capability in <samp>PROP_CAPS</samp>. </p>
<h1 id="rfc.section.9.1"><a href="#rfc.section.9.1">9.1.</a> <a href="#commands-2" id="commands-2">Commands</a></h1>
<h1 id="rfc.section.9.1.1"><a href="#rfc.section.9.1.1">9.1.1.</a> <a href="#cmd-12-ncphost-cmdhbooffload" id="cmd-12-ncphost-cmdhbooffload">CMD 12: (NCP-&gt;Host) CMD_HBO_OFFLOAD</a></h1>
<p/>
<ul>
<li>Argument-Encoding: <samp>LscD</samp> <ul><li><samp>OffloadId</samp>: 32-bit unique block identifier</li><li><samp>Expiration</samp>: In seconds-from-now</li><li><samp>Priority</samp>: Critical, High, Medium, Low</li><li><samp>Data</samp>: Data to offload</li></ul></li>
</ul>
<p> </p>
<h1 id="rfc.section.9.1.2"><a href="#rfc.section.9.1.2">9.1.2.</a> <a href="#cmd-13-ncphost-cmdhboreclaim" id="cmd-13-ncphost-cmdhboreclaim">CMD 13: (NCP-&gt;Host) CMD_HBO_RECLAIM</a></h1>
<p/>
<ul>
<li>Argument-Encoding: <samp>Lb</samp> <ul><li><samp>OffloadId</samp>: 32-bit unique block identifier</li><li><samp>KeepAfterReclaim</samp>: If not set to true, the block will be dropped by the host after it is sent to the NCP.</li></ul></li>
</ul>
<p> </p>
<h1 id="rfc.section.9.1.3"><a href="#rfc.section.9.1.3">9.1.3.</a> <a href="#cmd-14-ncphost-cmdhbodrop" id="cmd-14-ncphost-cmdhbodrop">CMD 14: (NCP-&gt;Host) CMD_HBO_DROP</a></h1>
<p/>
<ul>
<li>Argument-Encoding: <samp>L</samp> <ul><li><samp>OffloadId</samp>: 32-bit unique block identifier</li></ul></li>
</ul>
<p> </p>
<h1 id="rfc.section.9.1.4"><a href="#rfc.section.9.1.4">9.1.4.</a> <a href="#cmd-15-hostncp-cmdhbooffloaded" id="cmd-15-hostncp-cmdhbooffloaded">CMD 15: (Host-&gt;NCP) CMD_HBO_OFFLOADED</a></h1>
<p/>
<ul>
<li>Argument-Encoding: <samp>Li</samp> <ul><li><samp>OffloadId</samp>: 32-bit unique block identifier</li><li><samp>Status</samp>: Status code for the result of the operation.</li></ul></li>
</ul>
<p> </p>
<h1 id="rfc.section.9.1.5"><a href="#rfc.section.9.1.5">9.1.5.</a> <a href="#cmd-16-hostncp-cmdhboreclaimed" id="cmd-16-hostncp-cmdhboreclaimed">CMD 16: (Host-&gt;NCP) CMD_HBO_RECLAIMED</a></h1>
<p/>
<ul>
<li>Argument-Encoding: <samp>LiD</samp> <ul><li><samp>OffloadId</samp>: 32-bit unique block identifier</li><li><samp>Status</samp>: Status code for the result of the operation.</li><li><samp>Data</samp>: Data that was previously offloaded (if any)</li></ul></li>
</ul>
<p> </p>
<h1 id="rfc.section.9.1.6"><a href="#rfc.section.9.1.6">9.1.6.</a> <a href="#cmd-17-hostncp-cmdhbodropped" id="cmd-17-hostncp-cmdhbodropped">CMD 17: (Host-&gt;NCP) CMD_HBO_DROPPED</a></h1>
<p/>
<ul>
<li>Argument-Encoding: <samp>Li</samp> <ul><li><samp>OffloadId</samp>: 32-bit unique block identifier</li><li><samp>Status</samp>: Status code for the result of the operation.</li></ul></li>
</ul>
<p> </p>
<h1 id="rfc.section.9.2"><a href="#rfc.section.9.2">9.2.</a> <a href="#properties-1" id="properties-1">Properties</a></h1>
<h1 id="rfc.section.9.2.1"><a href="#rfc.section.9.2.1">9.2.1.</a> <a href="#prop-hbo-mem-max" id="prop-hbo-mem-max">PROP 10: PROP_HBO_MEM_MAX</a></h1>
<p/>
<ul>
<li>Type: Read-Write</li>
<li>Packed-Encoding: <samp>L</samp></li>
</ul>
<p> </p>
<table cellpadding="3" cellspacing="0" class="tt full center">
<thead>
<tr>
<th class="center">Octets:</th>
<th class="center">4</th>
</tr>
</thead>
<tbody>
<tr>
<td class="center">Fields:</td>
<td class="center">
<samp>PROP_HBO_MEM_MAX</samp>
</td>
</tr>
</tbody>
</table>
<p id="rfc.section.9.2.1.p.2">Describes the number of bytes that may be offloaded from the NCP to the host. Default value is zero, so this property must be set by the host to a non-zero value before the NCP will begin offloading blocks. </p>
<p id="rfc.section.9.2.1.p.3">This value is encoded as an unsigned 32-bit integer. </p>
<p id="rfc.section.9.2.1.p.4">This property is only available if the <samp>CAP_HBO</samp> capability is present in <samp>PROP_CAPS</samp>. </p>
<h1 id="rfc.section.9.2.2"><a href="#rfc.section.9.2.2">9.2.2.</a> <a href="#prop-hbo-block-max" id="prop-hbo-block-max">PROP 11: PROP_HBO_BLOCK_MAX</a></h1>
<p/>
<ul>
<li>Type: Read-Write</li>
<li>Packed-Encoding: <samp>S</samp></li>
</ul>
<p> </p>
<table cellpadding="3" cellspacing="0" class="tt full center">
<thead>
<tr>
<th class="center">Octets:</th>
<th class="center">2</th>
</tr>
</thead>
<tbody>
<tr>
<td class="center">Fields:</td>
<td class="center">
<samp>PROP_HBO_BLOCK_MAX</samp>
</td>
</tr>
</tbody>
</table>
<p id="rfc.section.9.2.2.p.2">Describes the number of blocks that may be offloaded from the NCP to the host. Default value is 32. Setting this value to zero will cause host block offload to be effectively disabled. </p>
<p id="rfc.section.9.2.2.p.3">This value is encoded as an unsigned 16-bit integer. </p>
<p id="rfc.section.9.2.2.p.4">This property is only available if the <samp>CAP_HBO</samp> capability is present in <samp>PROP_CAPS</samp>. </p>
<h1 id="rfc.section.10"><a href="#rfc.section.10">10.</a> <a href="#feature-jam-detect" id="feature-jam-detect">Feature: Jam Detection</a></h1>
<p id="rfc.section.10.p.1">Jamming detection is a feature that allows the NCP to report when it detects high levels of interference that are characteristic of intentional signal jamming. </p>
<p id="rfc.section.10.p.2">The presence of this feature can be detected by checking for the presence of the <samp>CAP_JAM_DETECT</samp> (value 6) capability in <samp>PROP_CAPS</samp>. </p>
<h1 id="rfc.section.10.1"><a href="#rfc.section.10.1">10.1.</a> <a href="#properties-2" id="properties-2">Properties</a></h1>
<h1 id="rfc.section.10.1.1"><a href="#rfc.section.10.1.1">10.1.1.</a> <a href="#prop-jam-detect-enable" id="prop-jam-detect-enable">PROP 4608: PROP_JAM_DETECT_ENABLE</a></h1>
<p/>
<ul>
<li>Type: Read-Write</li>
<li>Packed-Encoding: <samp>b</samp></li>
<li>Default Value: false</li>
<li>REQUIRED for <samp>CAP_JAM_DETECT</samp></li>
</ul>
<p> </p>
<table cellpadding="3" cellspacing="0" class="tt full center">
<thead>
<tr>
<th class="center">Octets:</th>
<th class="center">1</th>
</tr>
</thead>
<tbody>
<tr>
<td class="center">Fields:</td>
<td class="center">
<samp>PROP_JAM_DETECT_ENABLE</samp>
</td>
</tr>
</tbody>
</table>
<p id="rfc.section.10.1.1.p.2">Indicates if jamming detection is enabled or disabled. Set to true to enable jamming detection. </p>
<p id="rfc.section.10.1.1.p.3">This property is only available if the <samp>CAP_JAM_DETECT</samp> capability is present in <samp>PROP_CAPS</samp>. </p>
<h1 id="rfc.section.10.1.2"><a href="#rfc.section.10.1.2">10.1.2.</a> <a href="#prop-jam-detected" id="prop-jam-detected">PROP 4609: PROP_JAM_DETECTED</a></h1>
<p/>
<ul>
<li>Type: Read-Only</li>
<li>Packed-Encoding: <samp>b</samp></li>
<li>REQUIRED for <samp>CAP_JAM_DETECT</samp></li>
</ul>
<p> </p>
<table cellpadding="3" cellspacing="0" class="tt full center">
<thead>
<tr>
<th class="center">Octets:</th>
<th class="center">1</th>
</tr>
</thead>
<tbody>
<tr>
<td class="center">Fields:</td>
<td class="center">
<samp>PROP_JAM_DETECTED</samp>
</td>
</tr>
</tbody>
</table>
<p id="rfc.section.10.1.2.p.2">Set to true if radio jamming is detected. Set to false otherwise. </p>
<p id="rfc.section.10.1.2.p.3">When jamming detection is enabled, changes to the value of this property are emitted asynchronously via <samp>CMD_PROP_VALUE_IS</samp>. </p>
<p id="rfc.section.10.1.2.p.4">This property is only available if the <samp>CAP_JAM_DETECT</samp> capability is present in <samp>PROP_CAPS</samp>. </p>
<h1 id="rfc.section.10.1.3"><a href="#rfc.section.10.1.3">10.1.3.</a> <a href="#prop-4610-propjamdetectrssithreshold" id="prop-4610-propjamdetectrssithreshold">PROP 4610: PROP_JAM_DETECT_RSSI_THRESHOLD</a></h1>
<p/>
<ul>
<li>Type: Read-Write</li>
<li>Packed-Encoding: <samp>c</samp></li>
<li>Units: dBm</li>
<li>Default Value: Implementation-specific</li>
<li>RECOMMENDED for <samp>CAP_JAM_DETECT</samp></li>
</ul>
<p> </p>
<p id="rfc.section.10.1.3.p.2">This parameter describes the threshold RSSI level (measured in dBm) above which the jamming detection will consider the channel blocked. </p>
<h1 id="rfc.section.10.1.4"><a href="#rfc.section.10.1.4">10.1.4.</a> <a href="#prop-4611-propjamdetectwindow" id="prop-4611-propjamdetectwindow">PROP 4611: PROP_JAM_DETECT_WINDOW</a></h1>
<p/>
<ul>
<li>Type: Read-Write</li>
<li>Packed-Encoding: <samp>c</samp></li>
<li>Units: Seconds (1-64)</li>
<li>Default Value: Implementation-specific</li>
<li>RECOMMENDED for <samp>CAP_JAM_DETECT</samp></li>
</ul>
<p> </p>
<p id="rfc.section.10.1.4.p.2">This parameter describes the window period for signal jamming detection. </p>
<h1 id="rfc.section.10.1.5"><a href="#rfc.section.10.1.5">10.1.5.</a> <a href="#prop-4612-propjamdetectbusy" id="prop-4612-propjamdetectbusy">PROP 4612: PROP_JAM_DETECT_BUSY</a></h1>
<p/>
<ul>
<li>Type: Read-Write</li>
<li>Packed-Encoding: <samp>i</samp></li>
<li>Units: Seconds (1-64)</li>
<li>Default Value: Implementation-specific</li>
<li>RECOMMENDED for <samp>CAP_JAM_DETECT</samp></li>
</ul>
<p> </p>
<p id="rfc.section.10.1.5.p.2">This parameter describes the number of aggregate seconds within the detection window where the RSSI must be above <samp>PROP_JAM_DETECT_RSSI_THRESHOLD</samp> to trigger detection. </p>
<p id="rfc.section.10.1.5.p.3">The behavior of the jamming detection feature when <samp>PROP_JAM_DETECT_BUSY</samp> is larger than <samp>PROP_JAM_DETECT_WINDOW</samp> is undefined. </p>
<h1 id="rfc.section.10.1.6"><a href="#rfc.section.10.1.6">10.1.6.</a> <a href="#prop-4613-propjamdetecthistorybitmap" id="prop-4613-propjamdetecthistorybitmap">PROP 4613: PROP_JAM_DETECT_HISTORY_BITMAP</a></h1>
<p/>
<ul>
<li>Type: Read-Only</li>
<li>Packed-Encoding: <samp>LL</samp></li>
<li>Default Value: Implementation-specific</li>
<li>RECOMMENDED for <samp>CAP_JAM_DETECT</samp></li>
</ul>
<p> </p>
<p id="rfc.section.10.1.6.p.2">This value provides information about current state of jamming detection module for monitoring/debugging purpose. It returns a 64-bit value where each bit corresponds to one second interval starting with bit 0 for the most recent interval and bit 63 for the oldest intervals (63 sec earlier). The bit is set to 1 if the jamming detection module observed/detected high signal level during the corresponding one second interval. The value is read-only and is encoded as two <samp>L</samp> (uint32) values in little-endian format (first <samp>L</samp> (uint32) value gives the lower bits corresponding to more recent history). </p>
<h1 id="rfc.section.11"><a href="#rfc.section.11">11.</a> <a href="#feature-gpio-access" id="feature-gpio-access">Feature: GPIO Access</a></h1>
<p id="rfc.section.11.p.1">This feature allows the host to have control over some or all of the GPIO pins on the NCP. The host can determine which GPIOs are available by examining <samp>PROP_GPIO_CONFIG</samp>, described below. This API supports a maximum of 256 individual GPIO pins. </p>
<p id="rfc.section.11.p.2">Support for this feature can be determined by the presence of <samp>CAP_GPIO</samp>. </p>
<h1 id="rfc.section.11.1"><a href="#rfc.section.11.1">11.1.</a> <a href="#properties-3" id="properties-3">Properties</a></h1>
<h1 id="rfc.section.11.1.1"><a href="#rfc.section.11.1.1">11.1.1.</a> <a href="#prop-4096-propgpioconfig" id="prop-4096-propgpioconfig">PROP 4096: PROP_GPIO_CONFIG</a></h1>
<p/>
<ul>
<li>Argument-Encoding: <samp>A(t(CCU))</samp></li>
<li>Type: Read-write (Writable only using <samp>CMD_PROP_VALUE_INSERT</samp>, <a href="#cmd-prop-value-insert">Section 4.5</a>)</li>
</ul>
<p> </p>
<p id="rfc.section.11.1.1.p.2">An array of structures which contain the following fields: </p>
<p/>
<ul>
<li><samp>C</samp>: GPIO Number</li>
<li><samp>C</samp>: GPIO Configuration Flags</li>
<li><samp>U</samp>: Human-readable GPIO name</li>
</ul>
<p> </p>
<p id="rfc.section.11.1.1.p.4">GPIOs which do not have a corresponding entry are not supported. </p>
<p id="rfc.section.11.1.1.p.5">The configuration parameter contains the configuration flags for the GPIO: </p>
<pre>
0 1 2 3 4 5 6 7
+---+---+---+---+---+---+---+---+
|DIR|PUP|PDN|TRIGGER| RESERVED |
+---+---+---+---+---+---+---+---+
|O/D|
+---+
</pre>
<p/>
<ul>
<li><samp>DIR</samp>: Pin direction. Clear (0) for input, set (1) for output.</li>
<li><samp>PUP</samp>: Pull-up enabled flag.</li>
<li><samp>PDN</samp>/<samp>O/D</samp>: Flag meaning depends on pin direction: <ul><li>Input: Pull-down enabled.</li><li>Output: Output is an open-drain.</li></ul></li>
<li><samp>TRIGGER</samp>: Enumeration describing how pin changes generate asynchronous notification commands (TBD) from the NCP to the host. <ul><li>0: Feature disabled for this pin</li><li>1: Trigger on falling edge</li><li>2: Trigger on rising edge</li><li>3: Trigger on level change</li></ul></li>
<li><samp>RESERVED</samp>: Bits reserved for future use. Always cleared to zero and ignored when read.</li>
</ul>
<p> </p>
<p id="rfc.section.11.1.1.p.7">As an optional feature, the configuration of individual pins may be modified using the <samp>CMD_PROP_VALUE_INSERT</samp> command. Only the GPIO number and flags fields MUST be present, the GPIO name (if present) would be ignored. This command can only be used to modify the configuration of GPIOs which are already exposed---it cannot be used by the host to add addional GPIOs. </p>
<h1 id="rfc.section.11.1.2"><a href="#rfc.section.11.1.2">11.1.2.</a> <a href="#prop-4098-propgpiostate" id="prop-4098-propgpiostate">PROP 4098: PROP_GPIO_STATE</a></h1>
<p/>
<ul>
<li>Type: Read-Write</li>
</ul>
<p> </p>
<p id="rfc.section.11.1.2.p.2">Contains a bit field identifying the state of the GPIOs. The length of the data associated with these properties depends on the number of GPIOs. If you have 10 GPIOs, you'd have two bytes. GPIOs are numbered from most significant bit to least significant bit, so 0x80 is GPIO 0, 0x40 is GPIO 1, etc. </p>
<p id="rfc.section.11.1.2.p.3">For GPIOs configured as inputs: </p>
<p/>
<ul>
<li><samp>CMD_PROP_VAUE_GET</samp>: The value of the associated bit describes the logic level read from the pin.</li>
<li><samp>CMD_PROP_VALUE_SET</samp>: The value of the associated bit is ignored for these pins.</li>
</ul>
<p> </p>
<p id="rfc.section.11.1.2.p.5">For GPIOs configured as outputs: </p>
<p/>
<ul>
<li><samp>CMD_PROP_VAUE_GET</samp>: The value of the associated bit is implementation specific.</li>
<li><samp>CMD_PROP_VALUE_SET</samp>: The value of the associated bit determines the new logic level of the output. If this pin is configured as an open-drain, setting the associated bit to 1 will cause the pin to enter a Hi-Z state.</li>
</ul>
<p> </p>
<p id="rfc.section.11.1.2.p.7">For GPIOs which are not specified in <samp>PROP_GPIO_CONFIG</samp>: </p>
<p/>
<ul>
<li><samp>CMD_PROP_VAUE_GET</samp>: The value of the associated bit is implementation specific.</li>
<li><samp>CMD_PROP_VALUE_SET</samp>: The value of the associated bit MUST be ignored by the NCP.</li>
</ul>
<p> </p>
<p id="rfc.section.11.1.2.p.9">When writing, unspecified bits are assumed to be zero. </p>
<h1 id="rfc.section.11.1.3"><a href="#rfc.section.11.1.3">11.1.3.</a> <a href="#prop-4099-propgpiostateset" id="prop-4099-propgpiostateset">PROP 4099: PROP_GPIO_STATE_SET</a></h1>
<p/>
<ul>
<li>Type: Write-only</li>
</ul>
<p> </p>
<p id="rfc.section.11.1.3.p.2">Allows for the state of various output GPIOs to be set without affecting other GPIO states. Contains a bit field identifying the output GPIOs that should have their state set to 1. </p>
<p id="rfc.section.11.1.3.p.3">When writing, unspecified bits are assumed to be zero. The value of any bits for GPIOs which are not specified in <samp>PROP_GPIO_CONFIG</samp> MUST be ignored. </p>
<h1 id="rfc.section.11.1.4"><a href="#rfc.section.11.1.4">11.1.4.</a> <a href="#prop-4100-propgpiostateclear" id="prop-4100-propgpiostateclear">PROP 4100: PROP_GPIO_STATE_CLEAR</a></h1>
<p/>
<ul>
<li>Type: Write-only</li>
</ul>
<p> </p>
<p id="rfc.section.11.1.4.p.2">Allows for the state of various output GPIOs to be cleared without affecting other GPIO states. Contains a bit field identifying the output GPIOs that should have their state cleared to 0. </p>
<p id="rfc.section.11.1.4.p.3">When writing, unspecified bits are assumed to be zero. The value of any bits for GPIOs which are not specified in <samp>PROP_GPIO_CONFIG</samp> MUST be ignored. </p>
<h1 id="rfc.section.12"><a href="#rfc.section.12">12.</a> <a href="#feature-trng" id="feature-trng">Feature: True Random Number Generation</a></h1>
<p id="rfc.section.12.p.1">This feature allows the host to have access to any strong hardware random number generator that might be present on the NCP, for things like key generation or seeding PRNGs. </p>
<p id="rfc.section.12.p.2">Support for this feature can be determined by the presence of <samp>CAP_TRNG</samp>. </p>
<p id="rfc.section.12.p.3">Note well that implementing a cryptographically-strong software-based true random number generator (that is impervious to things like temperature changes, manufacturing differences across devices, or unexpected output correlations) is non-trivial without a well-designed, dedicated hardware random number generator. Implementors who have little or no experience in this area are encouraged to not advertise this capability. </p>
<h1 id="rfc.section.12.1"><a href="#rfc.section.12.1">12.1.</a> <a href="#properties-4" id="properties-4">Properties</a></h1>
<h1 id="rfc.section.12.1.1"><a href="#rfc.section.12.1.1">12.1.1.</a> <a href="#prop-4101-proptrng32" id="prop-4101-proptrng32">PROP 4101: PROP_TRNG_32</a></h1>
<p/>
<ul>
<li>Argument-Encoding: <samp>L</samp></li>
<li>Type: Read-Only</li>
</ul>
<p> </p>
<p id="rfc.section.12.1.1.p.2">Fetching this property returns a strong random 32-bit integer that is suitable for use as a PRNG seed or for cryptographic use. </p>
<p id="rfc.section.12.1.1.p.3">While the exact mechanism behind the calculation of this value is implementation-specific, the implementation must satisfy the following requirements: </p>
<p/>
<ul>
<li>Data representing at least 32 bits of fresh entropy (extracted from the primary entropy source) MUST be consumed by the calculation of each query.</li>
<li>Each of the 32 bits returned MUST be free of bias and have no statistical correlation to any part of the raw data used for the calculation of any query.</li>
</ul>
<p> </p>
<p id="rfc.section.12.1.1.p.5">Support for this property is REQUIRED if <samp>CAP_TRNG</samp> is included in the device capabilities. </p>
<h1 id="rfc.section.12.1.2"><a href="#rfc.section.12.1.2">12.1.2.</a> <a href="#prop-4102-proptrng128" id="prop-4102-proptrng128">PROP 4102: PROP_TRNG_128</a></h1>
<p/>
<ul>
<li>Argument-Encoding: <samp>D</samp></li>
<li>Type: Read-Only</li>
</ul>
<p> </p>
<p id="rfc.section.12.1.2.p.2">Fetching this property returns 16 bytes of strong random data suitable for direct cryptographic use without further processing(For example, as an AES key). </p>
<p id="rfc.section.12.1.2.p.3">While the exact mechanism behind the calculation of this value is implementation-specific, the implementation must satisfy the following requirements: </p>
<p/>
<ul>
<li>Data representing at least 128 bits of fresh entropy (extracted from the primary entropy source) MUST be consumed by the calculation of each query.</li>
<li>Each of the 128 bits returned MUST be free of bias and have no statistical correlation to any part of the raw data used for the calculation of any query.</li>
</ul>
<p> </p>
<p id="rfc.section.12.1.2.p.5">Support for this property is REQUIRED if <samp>CAP_TRNG</samp> is included in the device capabilities. </p>
<h1 id="rfc.section.12.1.3"><a href="#rfc.section.12.1.3">12.1.3.</a> <a href="#prop-4103-proptrngraw32" id="prop-4103-proptrngraw32">PROP 4103: PROP_TRNG_RAW_32</a></h1>
<p/>
<ul>
<li>Argument-Encoding: <samp>D</samp></li>
<li>Type: Read-Only</li>
</ul>
<p> </p>
<p id="rfc.section.12.1.3.p.2">This property is primarily used to diagnose and debug the behavior of the entropy source used for strong random number generation. </p>
<p id="rfc.section.12.1.3.p.3">When queried, returns the raw output from the entropy source used to generate <samp>PROP_TRNG_32</samp>, prior to any reduction/whitening and/or mixing with prior state. </p>
<p id="rfc.section.12.1.3.p.4">The length of the returned buffer is implementation specific and should be expected to be non-deterministic. </p>
<p id="rfc.section.12.1.3.p.5">Support for this property is RECOMMENDED if <samp>CAP_TRNG</samp> is included in the device capabilities. </p>
<h1 id="rfc.section.13"><a href="#rfc.section.13">13.</a> <a href="#security-considerations" id="security-considerations">Security Considerations</a></h1>
<h1 id="rfc.section.13.1"><a href="#rfc.section.13.1">13.1.</a> <a href="#raw-application-access" id="raw-application-access">Raw Application Access</a></h1>
<p id="rfc.section.13.1.p.1">Spinel MAY be used as an API boundary for allowing processes to configure the NCP. However, such a system MUST NOT give unprivileged processess the ability to send or receive arbitrary command frames to the NCP. Only the specific commands and properties that are required should be allowed to be passed, and then only after being checked for proper format. </p>
<h1 id="rfc.appendix.A"><a href="#rfc.appendix.A">Appendix A.</a> <a href="#framing-protocol" id="framing-protocol">Framing Protocol</a></h1>
<p id="rfc.section.A.p.1">Since this NCP protocol is defined independently of the physical transport or framing, any number of transports and framing protocols could be used successfully. However, in the interests of compatibility, this document provides some recommendations. </p>
<h1 id="rfc.appendix.A.1"><a href="#rfc.appendix.A.1">A.1.</a> <a href="#uart-recommendations" id="uart-recommendations">UART Recommendations</a></h1>
<p id="rfc.section.A.1.p.1">The recommended default UART settings are: </p>
<p/>
<ul>
<li>Bit rate: 115200</li>
<li>Start bits: 1</li>
<li>Data bits: 8</li>
<li>Stop bits: 1</li>
<li>Parity: None</li>
<li>Flow Control: Hardware</li>
</ul>
<p> </p>
<p id="rfc.section.A.1.p.3">These values may be adjusted depending on the individual needs of the application or product, but some sort of flow control MUST be used. Hardware flow control is preferred over software flow control. In the absence of hardware flow control, software flow control (XON/XOFF) MUST be used instead. </p>
<p id="rfc.section.A.1.p.4">We also <strong>RECOMMEND</strong> an Arduino-style hardware reset, where the DTR signal is coupled to the <samp>R&#773;E&#773;S&#773;</samp> pin through a 0.01&#181;F capacitor. This causes the NCP to automatically reset whenever the serial port is opened. At the very least we <strong>RECOMMEND</strong> dedicating one of your host pins to controlling the <samp>R&#773;E&#773;S&#773;</samp> pin on the NCP, so that you can easily perform a hardware reset if necessary. </p>
<h1 id="rfc.appendix.A.1.1"><a href="#rfc.appendix.A.1.1">A.1.1.</a> <a href="#uart-bit-rate-detection" id="uart-bit-rate-detection">UART Bit Rate Detection</a></h1>
<p id="rfc.section.A.1.1.p.1">When using a UART, the issue of an appropriate bit rate must be considered. A bitrate of 115200 bits per second has become a defacto standard baud rate for many serial peripherals. This rate, however, is slower than the theoretical maximum bitrate of the 802.15.4 2.4GHz PHY (250kbit). In most circumstances this mismatch is not significant because the overall bitrate will be much lower than either of these rates, but there are circumstances where a faster UART bitrate is desirable. Thus, this document proposes a simple bitrate detection scheme that can be employed by the host to detect when the attached NCP is initially running at a higher bitrate. </p>
<p id="rfc.section.A.1.1.p.2">The algorithm is to send successive NOOP commands to the NCP at increasing bitrates. When a valid <samp>CMD_LAST_STATUS</samp> response has been received, we have identified the correct bitrate. </p>
<p id="rfc.section.A.1.1.p.3">In order to limit the time spent hunting for the appropriate bitrate, we RECOMMEND that only the following bitrates be checked: </p>
<p/>
<ul>
<li>115200</li>
<li>230400</li>
<li>1000000 (1Mbit)</li>
</ul>
<p> </p>
<p id="rfc.section.A.1.1.p.5">The bitrate MAY also be changed programmatically by adjusting <samp>PROP_UART_BITRATE</samp>, if implemented. </p>
<h1 id="rfc.appendix.A.1.2"><a href="#rfc.appendix.A.1.2">A.1.2.</a> <a href="#hdlc-lite" id="hdlc-lite">HDLC-Lite</a></h1>
<p><em>HDLC-Lite</em> is the recommended framing protocol for transmitting Spinel frames over a UART. HDLC-Lite consists of only the framing, escaping, and CRC parts of the larger HDLC protocol---all other parts of HDLC are omitted. This protocol was chosen because it works well with software flow control and is widely implemented. </p>
<p id="rfc.section.A.1.2.p.2">To transmit a frame with HDLC-lite, the 16-bit CRC must first be appended to the frame. The CRC function is defined to be CRC-16/CCITT, otherwise known as the <a href="http://reveng.sourceforge.net/crc-catalogue/16.htm#crc.cat.kermit">KERMIT CRC</a>. </p>
<p id="rfc.section.A.1.2.p.3">Individual frames are terminated with a frame delimiter octet called the 'flag' octet (<samp>0x7E</samp>). </p>
<p id="rfc.section.A.1.2.p.4">The following octets values are considered <em>special</em> and should be escaped when present in data frames: </p>
<table cellpadding="3" cellspacing="0" class="tt full center">
<thead>
<tr>
<th class="center">Octet Value</th>
<th class="center">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="center">0x7E</td>
<td class="center">Frame Delimiter (Flag)</td>
</tr>
<tr>
<td class="center">0x7D</td>
<td class="center">Escape Byte</td>
</tr>
<tr>
<td class="center">0x11</td>
<td class="center">XON</td>
</tr>
<tr>
<td class="center">0x13</td>
<td class="center">XOFF</td>
</tr>
<tr>
<td class="center">0xF8</td>
<td class="center">Vendor-Specific</td>
</tr>
</tbody>
</table>
<p id="rfc.section.A.1.2.p.5">When present in a data frame, these octet values are escaped by prepending the escape octet (<samp>0x7D</samp>) and XORing the value with <samp>0x20</samp>. </p>
<p id="rfc.section.A.1.2.p.6">When receiving a frame, the CRC must be verified after the frame is unescaped. If the CRC value does not match what is calculated for the frame data, the frame MUST be discarded. The implementation MAY indicate the failure to higher levels to handle as they see fit, but MUST NOT attempt to process the deceived frame. </p>
<p id="rfc.section.A.1.2.p.7">Consecutive flag octets are entirely legal and MUST NOT be treated as a framing error. Consecutive flag octets MAY be used as a way to wake up a sleeping NCP. </p>
<p id="rfc.section.A.1.2.p.8">When first establishing a connection to the NCP, it is customary to send one or more flag octets to ensure that any previously received data is discarded. </p>
<h1 id="rfc.appendix.A.2"><a href="#rfc.appendix.A.2">A.2.</a> <a href="#spi-recommendations" id="spi-recommendations">SPI Recommendations</a></h1>
<p id="rfc.section.A.2.p.1">We RECOMMEND the use of the following standard SPI signals: </p>
<p/>
<ul>
<li><samp>C&#773;S&#773;</samp>: (Host-to-NCP) Chip Select</li>
<li><samp>CLK</samp>: (Host-to-NCP) Clock</li>
<li><samp>MOSI</samp>: Master-Output/Slave-Input</li>
<li><samp>MISO</samp>: Master-Input/Slave-Output</li>
<li><samp>I&#773;N&#773;T&#773;</samp>: (NCP-to-Host) Host Interrupt</li>
<li><samp>R&#773;E&#773;S&#773;</samp>: (Host-to-NCP) NCP Hardware Reset</li>
</ul>
<p> </p>
<p id="rfc.section.A.2.p.3">The <samp>I&#773;N&#773;T&#773;</samp> signal is used by the NCP to indicate to the host that the NCP has frames pending to send to it. When asserted, the host SHOULD initiate a SPI transaction in a timely manner. </p>
<p id="rfc.section.A.2.p.4">We RECOMMEND the following SPI properties: </p>
<p/>
<ul>
<li><samp>C&#773;S&#773;</samp> is active low.</li>
<li><samp>CLK</samp> is active high.</li>
<li><samp>CLK</samp> speed is larger than 500 kHz.</li>
<li>Data is valid on leading edge of <samp>CLK</samp>.</li>
<li>Data is sent in multiples of 8-bits (octets).</li>
<li>Octets are sent most-significant bit first.</li>
</ul>
<p> </p>
<p id="rfc.section.A.2.p.6">This recommended configuration may be adjusted depending on the individual needs of the application or product. </p>
<h1 id="rfc.appendix.A.2.1"><a href="#rfc.appendix.A.2.1">A.2.1.</a> <a href="#spi-framing-protocol" id="spi-framing-protocol">SPI Framing Protocol</a></h1>
<p id="rfc.section.A.2.1.p.1">Each SPI frame starts with a 5-byte frame header: </p>
<table cellpadding="3" cellspacing="0" class="tt full center">
<thead>
<tr>
<th class="center">Octets:</th>
<th class="center">1</th>
<th class="center">2</th>
<th class="center">2</th>
</tr>
</thead>
<tbody>
<tr>
<td class="center">Fields:</td>
<td class="center">HDR</td>
<td class="center">RECV_LEN</td>
<td class="center">DATA_LEN</td>
</tr>
</tbody>
</table>
<p/>
<ul>
<li><samp>HDR</samp>: The first byte is the header byte (defined below)</li>
<li><samp>RECV_LEN</samp>: The second and third bytes indicate the largest frame size that that device is ready to receive. If zero, then the other device must not send any data. (Little endian)</li>
<li><samp>DATA_LEN</samp>: The fourth and fifth bytes indicate the size of the pending data frame to be sent to the other device. If this value is equal-to or less-than the number of bytes that the other device is willing to receive, then the data of the frame is immediately after the header. (Little Endian)</li>
</ul>
<p> </p>
<p id="rfc.section.A.2.1.p.3">The <samp>HDR</samp> byte is defined as: </p>
<pre>
0 1 2 3 4 5 6 7
+---+---+---+---+---+---+---+---+
|RST|CRC|CCF| RESERVED |PATTERN|
+---+---+---+---+---+---+---+---+
</pre>
<p/>
<ul>
<li><samp>RST</samp>: This bit is set when that device has been reset since the last time <samp>C&#773;S&#773;</samp> was asserted.</li>
<li><samp>CRC</samp>: This bit is set when that device supports writing a 16-bit CRC at the end of the data. The CRC length is NOT included in DATA_LEN.</li>
<li><samp>CCF</samp>: "CRC Check Failure". Set if the CRC check on the last received frame failed, cleared to zero otherwise. This bit is only used if both sides support CRC.</li>
<li><samp>RESERVED</samp>: These bits are all reserved for future used. They MUST be cleared to zero and MUST be ignored if set.</li>
<li><samp>PATTERN</samp>: These bits are set to a fixed value to help distinguish valid SPI frames from garbage (by explicitly making <samp>0xFF</samp> and <samp>0x00</samp> invalid values). Bit 6 MUST be set to be one and bit 7 MUST be cleared (0). A frame received that has any other values for these bits MUST be dropped.</li>
</ul>
<p> </p>
<p id="rfc.section.A.2.1.p.5">Prior to a sending or receiving a frame, the master MAY send a 5-octet frame with zeros for both the max receive frame size and the the contained frame length. This will induce the slave device to indicate the length of the frame it wants to send (if any) and indicate the largest frame it is capable of receiving at the moment. This allows the master to calculate the size of the next transaction. Alternatively, if the master has a frame to send it can just go ahead and send a frame of that length and determine if the frame was accepted by checking that the <samp>RECV_LEN</samp> from the slave frame is larger than the frame the master just tried to send. If the <samp>RECV_LEN</samp> is smaller then the frame wasn't accepted and will need to be transmitted again. </p>
<p id="rfc.section.A.2.1.p.6">This protocol can be used either unidirectionally or bidirectionally, determined by the behavior of the master and the slave. </p>
<p id="rfc.section.A.2.1.p.7">If the the master notices <samp>PATTERN</samp> is not set correctly, the master should consider the transaction to have failed and try again after 10 milliseconds, retrying up to 200 times. After unsuccessfully trying 200 times in a row, the master MAY take appropriate remedial action (like a NCP hardware reset, or indicating a communication failure to a user interface). </p>
<p id="rfc.section.A.2.1.p.8">At the end of the data of a frame is an optional 16-bit CRC, support for which is indicated by the <samp>CRC</samp> bit of the <samp>HDR</samp> byte being set. If these bits are set for both the master and slave frames, then CRC checking is enabled on both sides, effectively requiring that frame sizes be two bytes longer than would be otherwise required. The CRC is calculated using the same mechanism used for the CRC calculation in HDLC-Lite (See <a href="#hdlc-lite">Appendix A.1.2</a>). When both of the <samp>CRC</samp> bits are set, both sides must verify that the <samp>CRC</samp> is valid before accepting the frame. If not enough bytes were clocked out for the CRC to be read, then the frame must be ignored. If enough bytes were clocked out to perform a CRC check, but the CRC check fails, then the frame must be rejected and the <samp>CRC_FAIL</samp> bit on the next frame (and ONLY the next frame) MUST be set. </p>
<h1 id="rfc.appendix.A.3"><a href="#rfc.appendix.A.3">A.3.</a> <a href="#i2c-recommendations" id="i2c-recommendations">I&#178;C Recommendations</a></h1>
<p id="rfc.section.A.3.p.1">TBD </p>
<p>
<a id="CREF5" class="info">[CREF5]<span class="info">RQ: It may make sense to have a look at what Bluetooth HCI is doing for native I&#178;C framing and go with that.</span></a>
</p>
<h1 id="rfc.appendix.A.4"><a href="#rfc.appendix.A.4">A.4.</a> <a href="#native-usb-recommendations" id="native-usb-recommendations">Native USB Recommendations</a></h1>
<p id="rfc.section.A.4.p.1">TBD </p>
<p>
<a id="CREF6" class="info">[CREF6]<span class="info">RQ: It may make sense to have a look at what Bluetooth HCI is doing for native USB framing and go with that.</span></a>
</p>
<h1 id="rfc.appendix.B"><a href="#rfc.appendix.B">Appendix B.</a> <a href="#test-vectors" id="test-vectors">Test Vectors</a></h1>
<h1 id="rfc.appendix.B.1"><a href="#rfc.appendix.B.1">B.1.</a> <a href="#test-vector-packed-unsigned-integer" id="test-vector-packed-unsigned-integer">Test Vector: Packed Unsigned Integer</a></h1>
<table cellpadding="3" cellspacing="0" class="tt full center">
<thead>
<tr>
<th class="right">Decimal Value</th>
<th class="left">Packet Octet Encoding</th>
</tr>
</thead>
<tbody>
<tr>
<td class="right">0</td>
<td class="left">
<samp>00</samp>
</td>
</tr>
<tr>
<td class="right">1</td>
<td class="left">
<samp>01</samp>
</td>
</tr>
<tr>
<td class="right">127</td>
<td class="left">
<samp>7F</samp>
</td>
</tr>
<tr>
<td class="right">128</td>
<td class="left">
<samp>80 01</samp>
</td>
</tr>
<tr>
<td class="right">129</td>
<td class="left">
<samp>81 01</samp>
</td>
</tr>
<tr>
<td class="right">1,337</td>
<td class="left">
<samp>B9 0A</samp>
</td>
</tr>
<tr>
<td class="right">16,383</td>
<td class="left">
<samp>FF 7F</samp>
</td>
</tr>
<tr>
<td class="right">16,384</td>
<td class="left">
<samp>80 80 01</samp>
</td>
</tr>
<tr>
<td class="right">16,385</td>
<td class="left">
<samp>81 80 01</samp>
</td>
</tr>
<tr>
<td class="right">2,097,151</td>
<td class="left">
<samp>FF FF 7F</samp>
</td>
</tr>
</tbody>
</table>
<p>
<a id="CREF7" class="info">[CREF7]<span class="info">RQ: The PUI test-vector encodings need to be verified.</span></a>
</p>
<h1 id="rfc.appendix.B.2"><a href="#rfc.appendix.B.2">B.2.</a> <a href="#test-vector-reset-command" id="test-vector-reset-command">Test Vector: Reset Command</a></h1>
<p/>
<ul>
<li>NLI: 0</li>
<li>TID: 0</li>
<li>CMD: 1 (<samp>CMD_RESET</samp>)</li>
</ul>
<p> </p>
<p id="rfc.section.B.2.p.2">Frame: </p>
<pre>
80 01
</pre>
<h1 id="rfc.appendix.B.3"><a href="#rfc.appendix.B.3">B.3.</a> <a href="#test-vector-reset-notification" id="test-vector-reset-notification">Test Vector: Reset Notification</a></h1>
<p/>
<ul>
<li>NLI: 0</li>
<li>TID: 0</li>
<li>CMD: 6 (<samp>CMD_VALUE_IS</samp>)</li>
<li>PROP: 0 (<samp>PROP_LAST_STATUS</samp>)</li>
<li>VALUE: 114 (<samp>STATUS_RESET_SOFTWARE</samp>)</li>
</ul>
<p> </p>
<p id="rfc.section.B.3.p.2">Frame: </p>
<pre>
80 06 00 72
</pre>
<h1 id="rfc.appendix.B.4"><a href="#rfc.appendix.B.4">B.4.</a> <a href="#test-vector-scan-beacon" id="test-vector-scan-beacon">Test Vector: Scan Beacon</a></h1>
<p/>
<ul>
<li>NLI: 0</li>
<li>TID: 0</li>
<li>CMD: 7 (<samp>CMD_VALUE_INSERTED</samp>)</li>
<li>PROP: 51 (<samp>PROP_MAC_SCAN_BEACON</samp>)</li>
<li>VALUE: Structure, encoded as <samp>Cct(ESSc)t(iCUd)</samp> <ul><li>CHAN: 15</li><li>RSSI: -60dBm</li><li>MAC_DATA: (0D 00 B6 40 D4 8C E9 38 F9 52 FF FF D2 04 00) <ul><li>Long address: B6:40:D4:8C:E9:38:F9:52</li><li>Short address: 0xFFFF</li><li>PAN-ID: 0x04D2</li><li>LQI: 0</li></ul></li><li>NET_DATA: (13 00 03 20 73 70 69 6E 65 6C 00 08 00 DE AD 00 BE EF 00 CA FE) <ul><li>Protocol Number: 3</li><li>Flags: 0x20</li><li>Network Name: <samp>spinel</samp></li><li>XPANID: <samp>DE AD 00 BE EF 00 CA FE</samp></li></ul></li></ul></li>
</ul>
<p> </p>
<p id="rfc.section.B.4.p.2">Frame: </p>
<pre>
80 07 33 0F C4 0D 00 B6 40 D4 8C E9 38 F9 52 FF FF D2 04 00
13 00 03 20 73 70 69 6E 65 6C 00 08 00 DE AD 00 BE EF 00 CA
FE
</pre>
<h1 id="rfc.appendix.B.5"><a href="#rfc.appendix.B.5">B.5.</a> <a href="#test-vector-inbound-ipv6-packet" id="test-vector-inbound-ipv6-packet">Test Vector: Inbound IPv6 Packet</a></h1>
<p id="rfc.section.B.5.p.1">CMD_VALUE_IS(PROP_STREAM_NET) </p>
<p>
<a id="CREF8" class="info">[CREF8]<span class="info">RQ: FIXME: This test vector is incomplete.</span></a>
</p>
<h1 id="rfc.appendix.B.6"><a href="#rfc.appendix.B.6">B.6.</a> <a href="#test-vector-outbound-ipv6-packet" id="test-vector-outbound-ipv6-packet">Test Vector: Outbound IPv6 Packet</a></h1>
<p id="rfc.section.B.6.p.1">CMD_VALUE_SET(PROP_STREAM_NET) </p>
<p>
<a id="CREF9" class="info">[CREF9]<span class="info">RQ: FIXME: This test vector is incomplete.</span></a>
</p>
<h1 id="rfc.appendix.B.7"><a href="#rfc.appendix.B.7">B.7.</a> <a href="#test-vector-fetch-list-of-onmesh-networks" id="test-vector-fetch-list-of-onmesh-networks">Test Vector: Fetch list of on-mesh networks</a></h1>
<p/>
<ul>
<li>NLI: 0</li>
<li>TID: 4</li>
<li>CMD: 2 (<samp>CMD_VALUE_GET</samp>)</li>
<li>PROP: 90 (<samp>PROP_THREAD_ON_MESH_NETS</samp>)</li>
</ul>
<p> </p>
<p id="rfc.section.B.7.p.2">Frame: </p>
<pre>
84 02 5A
</pre>
<h1 id="rfc.appendix.B.8"><a href="#rfc.appendix.B.8">B.8.</a> <a href="#test-vector-returned-list-of-onmesh-networks" id="test-vector-returned-list-of-onmesh-networks">Test Vector: Returned list of on-mesh networks</a></h1>
<p/>
<ul>
<li>NLI: 0</li>
<li>TID: 4</li>
<li>CMD: 6 (<samp>CMD_VALUE_IS</samp>)</li>
<li>PROP: 90 (<samp>PROP_THREAD_ON_MESH_NETS</samp>)</li>
<li>VALUE: Array of structures, encoded as <samp>A(t(6CbC))</samp></li>
</ul>
<p> </p>
<table cellpadding="3" cellspacing="0" class="tt full center">
<thead>
<tr>
<th class="center">IPv6 Prefix</th>
<th class="center">Prefix Length</th>
<th class="center">Stable Flag</th>
<th class="center">Other Flags</th>
</tr>
</thead>
<tbody>
<tr>
<td class="center">2001:DB8:1::</td>
<td class="center">64</td>
<td class="center">True</td>
<td class="center">??</td>
</tr>
<tr>
<td class="center">2001:DB8:2::</td>
<td class="center">64</td>
<td class="center">False</td>
<td class="center">??</td>
</tr>
</tbody>
</table>
<p id="rfc.section.B.8.p.2">Frame: </p>
<pre>
84 06 5A 13 00 20 01 0D B8 00 01 00 00 00 00 00 00 00 00 00
00 40 01 ?? 13 00 20 01 0D B8 00 02 00 00 00 00 00 00 00 00
00 00 40 00 ??
</pre>
<h1 id="rfc.appendix.B.9"><a href="#rfc.appendix.B.9">B.9.</a> <a href="#test-vector-adding-an-onmesh-network" id="test-vector-adding-an-onmesh-network">Test Vector: Adding an on-mesh network</a></h1>
<p/>
<ul>
<li>NLI: 0</li>
<li>TID: 5</li>
<li>CMD: 4 (<samp>CMD_VALUE_INSERT</samp>)</li>
<li>PROP: 90 (<samp>PROP_THREAD_ON_MESH_NETS</samp>)</li>
<li>VALUE: Structure, encoded as <samp>6CbCb</samp></li>
</ul>
<p> </p>
<table cellpadding="3" cellspacing="0" class="tt full center">
<thead>
<tr>
<th class="center">IPv6 Prefix</th>
<th class="center">Prefix Length</th>
<th class="center">Stable Flag</th>
<th class="center">Other Flags</th>
</tr>
</thead>
<tbody>
<tr>
<td class="center">2001:DB8:3::</td>
<td class="center">64</td>
<td class="center">True</td>
<td class="center">??</td>
</tr>
</tbody>
</table>
<p id="rfc.section.B.9.p.2">Frame: </p>
<pre>
85 03 5A 20 01 0D B8 00 03 00 00 00 00 00 00 00 00 00 00 40
01 ?? 01
</pre>
<p>
<a id="CREF10" class="info">[CREF10]<span class="info">RQ: FIXME: This test vector is incomplete.</span></a>
</p>
<h1 id="rfc.appendix.B.10"><a href="#rfc.appendix.B.10">B.10.</a> <a href="#test-vector-insertion-notification-of-an-onmesh-network" id="test-vector-insertion-notification-of-an-onmesh-network">Test Vector: Insertion notification of an on-mesh network</a></h1>
<p/>
<ul>
<li>NLI: 0</li>
<li>TID: 5</li>
<li>CMD: 7 (<samp>CMD_VALUE_INSERTED</samp>)</li>
<li>PROP: 90 (<samp>PROP_THREAD_ON_MESH_NETS</samp>)</li>
<li>VALUE: Structure, encoded as <samp>6CbCb</samp></li>
</ul>
<p> </p>
<table cellpadding="3" cellspacing="0" class="tt full center">
<thead>
<tr>
<th class="center">IPv6 Prefix</th>
<th class="center">Prefix Length</th>
<th class="center">Stable Flag</th>
<th class="center">Other Flags</th>
</tr>
</thead>
<tbody>
<tr>
<td class="center">2001:DB8:3::</td>
<td class="center">64</td>
<td class="center">True</td>
<td class="center">??</td>
</tr>
</tbody>
</table>
<p id="rfc.section.B.10.p.2">Frame: </p>
<pre>
85 07 5A 20 01 0D B8 00 03 00 00 00 00 00 00 00 00 00 00 40
01 ?? 01
</pre>
<p>
<a id="CREF11" class="info">[CREF11]<span class="info">RQ: FIXME: This test vector is incomplete.</span></a>
</p>
<h1 id="rfc.appendix.B.11"><a href="#rfc.appendix.B.11">B.11.</a> <a href="#test-vector-removing-a-local-onmesh-network" id="test-vector-removing-a-local-onmesh-network">Test Vector: Removing a local on-mesh network</a></h1>
<p/>
<ul>
<li>NLI: 0</li>
<li>TID: 6</li>
<li>CMD: 5 (<samp>CMD_VALUE_REMOVE</samp>)</li>
<li>PROP: 90 (<samp>PROP_THREAD_ON_MESH_NETS</samp>)</li>
<li>VALUE: IPv6 Prefix <samp>2001:DB8:3::</samp></li>
</ul>
<p> </p>
<p id="rfc.section.B.11.p.2">Frame: </p>
<pre>
86 05 5A 20 01 0D B8 00 03 00 00 00 00 00 00 00 00 00 00
</pre>
<h1 id="rfc.appendix.B.12"><a href="#rfc.appendix.B.12">B.12.</a> <a href="#test-vector-removal-notification-of-an-onmesh-network" id="test-vector-removal-notification-of-an-onmesh-network">Test Vector: Removal notification of an on-mesh network</a></h1>
<p/>
<ul>
<li>NLI: 0</li>
<li>TID: 6</li>
<li>CMD: 8 (<samp>CMD_VALUE_REMOVED</samp>)</li>
<li>PROP: 90 (<samp>PROP_THREAD_ON_MESH_NETS</samp>)</li>
<li>VALUE: IPv6 Prefix <samp>2001:DB8:3::</samp></li>
</ul>
<p> </p>
<p id="rfc.section.B.12.p.2">Frame: </p>
<pre>
86 08 5A 20 01 0D B8 00 03 00 00 00 00 00 00 00 00 00 00
</pre>
<h1 id="rfc.appendix.C"><a href="#rfc.appendix.C">Appendix C.</a> <a href="#example-sessions" id="example-sessions">Example Sessions</a></h1>
<h1 id="rfc.appendix.C.1"><a href="#rfc.appendix.C.1">C.1.</a> <a href="#ncp-initialization" id="ncp-initialization">NCP Initialization</a></h1>
<p>
<a id="CREF12" class="info">[CREF12]<span class="info">RQ: FIXME: This example session is incomplete.</span></a>
</p>
<p id="rfc.section.C.1.p.2">Check the protocol version to see if it is supported: </p>
<p/>
<ul>
<li>CMD_VALUE_GET:PROP_PROTOCOL_VERSION</li>
<li>CMD_VALUE_IS:PROP_PROTOCOL_VERSION</li>
</ul>
<p> </p>
<p id="rfc.section.C.1.p.4">Check the NCP version to see if a firmware update may be necessary: </p>
<p/>
<ul>
<li>CMD_VALUE_GET:PROP_NCP_VERSION</li>
<li>CMD_VALUE_IS:PROP_NCP_VERSION</li>
</ul>
<p> </p>
<p id="rfc.section.C.1.p.6">Check interface type to make sure that it is what we expect: </p>
<p/>
<ul>
<li>CMD_VALUE_GET:PROP_INTERFACE_TYPE</li>
<li>CMD_VALUE_IS:PROP_INTERFACE_TYPE</li>
</ul>
<p> </p>
<p id="rfc.section.C.1.p.8">If the host supports using vendor-specific commands, the vendor should be verified before using them: </p>
<p/>
<ul>
<li>CMD_VALUE_GET:PROP_VENDOR_ID</li>
<li>CMD_VALUE_IS:PROP_VENDOR_ID</li>
</ul>
<p> </p>
<p id="rfc.section.C.1.p.10">Fetch the capability list so that we know what features this NCP supports: </p>
<p/>
<ul>
<li>CMD_VALUE_GET:PROP_CAPS</li>
<li>CMD_VALUE_IS:PROP_CAPS</li>
</ul>
<p> </p>
<p id="rfc.section.C.1.p.12">If the NCP supports CAP_NET_SAVE, then we go ahead and recall the network: </p>
<p/>
<ul>
<li>CMD_NET_RECALL</li>
</ul>
<p> </p>
<h1 id="rfc.appendix.C.2"><a href="#rfc.appendix.C.2">C.2.</a> <a href="#attaching-to-a-network" id="attaching-to-a-network">Attaching to a network</a></h1>
<p>
<a id="CREF13" class="info">[CREF13]<span class="info">RQ: FIXME: This example session is incomplete.</span></a>
</p>
<p id="rfc.section.C.2.p.2">We make the assumption that the NCP is not currently associated with a network. </p>
<p id="rfc.section.C.2.p.3">Set the network properties, if they were not already set: </p>
<p/>
<ul>
<li>CMD_VALUE_SET:PROP_PHY_CHAN</li>
<li>CMD_VALUE_IS:PROP_PHY_CHAN</li>
<li>CMD_VALUE_SET:PROP_NET_XPANID</li>
<li>CMD_VALUE_IS:PROP_NET_XPANID</li>
<li>CMD_VALUE_SET:PROP_MAC_15_4_PANID</li>
<li>CMD_VALUE_IS:PROP_MAC_15_4_PANID</li>
<li>CMD_VALUE_SET:PROP_NET_NETWORK_NAME</li>
<li>CMD_VALUE_IS:PROP_NET_NETWORK_NAME</li>
<li>CMD_VALUE_SET:PROP_NET_MASTER_KEY</li>
<li>CMD_VALUE_IS:PROP_NET_MASTER_KEY</li>
<li>CMD_VALUE_SET:PROP_NET_KEY_SEQUENCE_COUNTER</li>
<li>CMD_VALUE_IS:PROP_NET_KEY_SEQUENCE_COUNTER</li>
<li>CMD_VALUE_SET:PROP_NET_KEY_SWITCH_GUARDTIME</li>
<li>CMD_VALUE_IS:PROP_NET_KEY_SWITCH_GUARDTIME</li>
</ul>
<p> </p>
<p id="rfc.section.C.2.p.5">Bring the network interface up: </p>
<p/>
<ul>
<li>CMD_VALUE_SET:PROP_NET_IF_UP:TRUE</li>
<li>CMD_VALUE_IS:PROP_NET_IF_UP:TRUE</li>
</ul>
<p> </p>
<p id="rfc.section.C.2.p.7">Bring the routing stack up: </p>
<p/>
<ul>
<li>CMD_VALUE_SET:PROP_NET_STACK_UP:TRUE</li>
<li>CMD_VALUE_IS:PROP_NET_STACK_UP:TRUE</li>
</ul>
<p> </p>
<p id="rfc.section.C.2.p.9">Some asynchronous events from the NCP: </p>
<p/>
<ul>
<li>CMD_VALUE_IS:PROP_NET_ROLE</li>
<li>CMD_VALUE_IS:PROP_NET_PARTITION_ID</li>
<li>CMD_VALUE_IS:PROP_THREAD_ON_MESH_NETS</li>
</ul>
<p> </p>
<h1 id="rfc.appendix.C.3"><a href="#rfc.appendix.C.3">C.3.</a> <a href="#successfully-joining-a-preexisting-network" id="successfully-joining-a-preexisting-network">Successfully joining a pre-existing network</a></h1>
<p>
<a id="CREF14" class="info">[CREF14]<span class="info">RQ: FIXME: This example session is incomplete.</span></a>
</p>
<p id="rfc.section.C.3.p.2">This example session is identical to the above session up to the point where we set PROP_NET_IF_UP to true. From there, the behavior changes. </p>
<p/>
<ul>
<li>CMD_VALUE_SET:PROP_NET_REQUIRE_JOIN_EXISTING:TRUE</li>
<li>CMD_VALUE_IS:PROP_NET_REQUIRE_JOIN_EXISTING:TRUE</li>
</ul>
<p> </p>
<p id="rfc.section.C.3.p.4">Bring the routing stack up: </p>
<p/>
<ul>
<li>CMD_VALUE_SET:PROP_NET_STACK_UP:TRUE</li>
<li>CMD_VALUE_IS:PROP_NET_STACK_UP:TRUE</li>
</ul>
<p> </p>
<p id="rfc.section.C.3.p.6">Some asynchronous events from the NCP: </p>
<p/>
<ul>
<li>CMD_VALUE_IS:PROP_NET_ROLE</li>
<li>CMD_VALUE_IS:PROP_NET_PARTITION_ID</li>
<li>CMD_VALUE_IS:PROP_THREAD_ON_MESH_NETS</li>
</ul>
<p> </p>
<p id="rfc.section.C.3.p.8">Now let's save the network settings to NVRAM: </p>
<p/>
<ul>
<li>CMD_NET_SAVE</li>
</ul>
<p> </p>
<h1 id="rfc.appendix.C.4"><a href="#rfc.appendix.C.4">C.4.</a> <a href="#unsuccessfully-joining-a-preexisting-network" id="unsuccessfully-joining-a-preexisting-network">Unsuccessfully joining a pre-existing network</a></h1>
<p id="rfc.section.C.4.p.1">This example session is identical to the above session up to the point where we set PROP_NET_IF_UP to true. From there, the behavior changes. </p>
<p/>
<ul>
<li>CMD_VALUE_SET:PROP_NET_REQUIRE_JOIN_EXISTING:TRUE</li>
<li>CMD_VALUE_IS:PROP_NET_REQUIRE_JOIN_EXISTING:TRUE</li>
</ul>
<p> </p>
<p id="rfc.section.C.4.p.3">Bring the routing stack up: </p>
<p/>
<ul>
<li>CMD_VALUE_SET:PROP_NET_STACK_UP:TRUE</li>
<li>CMD_VALUE_IS:PROP_NET_STACK_UP:TRUE</li>
</ul>
<p> </p>
<p id="rfc.section.C.4.p.5">Some asynchronous events from the NCP: </p>
<p/>
<ul>
<li>CMD_VALUE_IS:PROP_LAST_STATUS:STATUS_JOIN_NO_PEERS</li>
<li>CMD_VALUE_IS:PROP_NET_STACK_UP:FALSE</li>
</ul>
<p> </p>
<h1 id="rfc.appendix.C.5"><a href="#rfc.appendix.C.5">C.5.</a> <a href="#detaching-from-a-network" id="detaching-from-a-network">Detaching from a network</a></h1>
<p id="rfc.section.C.5.p.1">TBD </p>
<h1 id="rfc.appendix.C.6"><a href="#rfc.appendix.C.6">C.6.</a> <a href="#attaching-to-a-saved-network" id="attaching-to-a-saved-network">Attaching to a saved network</a></h1>
<p>
<a id="CREF15" class="info">[CREF15]<span class="info">RQ: FIXME: This example session is incomplete.</span></a>
</p>
<p id="rfc.section.C.6.p.2">Recall the saved network if you haven't already done so: </p>
<p/>
<ul>
<li>CMD_NET_RECALL</li>
</ul>
<p> </p>
<p id="rfc.section.C.6.p.4">Bring the network interface up: </p>
<p/>
<ul>
<li>CMD_VALUE_SET:PROP_NET_IF_UP:TRUE</li>
<li>CMD_VALUE_IS:PROP_NET_IF_UP:TRUE</li>
</ul>
<p> </p>
<p id="rfc.section.C.6.p.6">Bring the routing stack up: </p>
<p/>
<ul>
<li>CMD_VALUE_SET:PROP_NET_STACK_UP:TRUE</li>
<li>CMD_VALUE_IS:PROP_NET_STACK_UP:TRUE</li>
</ul>
<p> </p>
<p id="rfc.section.C.6.p.8">Some asynchronous events from the NCP: </p>
<p/>
<ul>
<li>CMD_VALUE_IS:PROP_NET_ROLE</li>
<li>CMD_VALUE_IS:PROP_NET_PARTITION_ID</li>
<li>CMD_VALUE_IS:PROP_THREAD_ON_MESH_NETS</li>
</ul>
<p> </p>
<h1 id="rfc.appendix.C.7"><a href="#rfc.appendix.C.7">C.7.</a> <a href="#ncp-software-reset" id="ncp-software-reset">NCP Software Reset</a></h1>
<p>
<a id="CREF16" class="info">[CREF16]<span class="info">RQ: FIXME: This example session is incomplete.</span></a>
</p>
<p/>
<ul>
<li>CMD_RESET</li>
<li>CMD_VALUE_IS:PROP_LAST_STATUS:STATUS_RESET_SOFTWARE</li>
</ul>
<p> </p>
<p id="rfc.section.C.7.p.3">Then jump to <a href="#ncp-initialization">Appendix C.1</a>. </p>
<h1 id="rfc.appendix.C.8"><a href="#rfc.appendix.C.8">C.8.</a> <a href="#adding-an-onmesh-prefix" id="adding-an-onmesh-prefix">Adding an on-mesh prefix</a></h1>
<p id="rfc.section.C.8.p.1">TBD </p>
<h1 id="rfc.appendix.C.9"><a href="#rfc.appendix.C.9">C.9.</a> <a href="#entering-lowpower-modes" id="entering-lowpower-modes">Entering low-power modes</a></h1>
<p id="rfc.section.C.9.p.1">TBD </p>
<h1 id="rfc.appendix.C.10"><a href="#rfc.appendix.C.10">C.10.</a> <a href="#sniffing-raw-packets" id="sniffing-raw-packets">Sniffing raw packets</a></h1>
<p>
<a id="CREF17" class="info">[CREF17]<span class="info">RQ: FIXME: This example session is incomplete.</span></a>
</p>
<p id="rfc.section.C.10.p.2">This assumes that the NCP has been initialized. </p>
<p id="rfc.section.C.10.p.3">Optionally set the channel: </p>
<p/>
<ul>
<li>CMD_VALUE_SET:PROP_PHY_CHAN:x</li>
<li>CMD_VALUE_IS:PROP_PHY_CHAN</li>
</ul>
<p> </p>
<p id="rfc.section.C.10.p.5">Set the filter mode: </p>
<p/>
<ul>
<li>CMD_VALUE_SET:PROP_MAC_PROMISCUOUS_MODE:MAC_PROMISCUOUS_MODE_MONITOR</li>
<li>CMD_VALUE_IS:PROP_MAC_PROMISCUOUS_MODE:MAC_PROMISCUOUS_MODE_MONITOR</li>
</ul>
<p> </p>
<p id="rfc.section.C.10.p.7">Enable the raw stream: </p>
<p/>
<ul>
<li>CMD_VALUE_SET:PROP_MAC_RAW_STREAM_ENABLED:TRUE</li>
<li>CMD_VALUE_IS:PROP_MAC_RAW_STREAM_ENABLED:TRUE</li>
</ul>
<p> </p>
<p id="rfc.section.C.10.p.9">Enable the PHY directly: </p>
<p/>
<ul>
<li>CMD_VALUE_SET:PROP_PHY_ENABLED:TRUE</li>
<li>CMD_VALUE_IS:PROP_PHY_ENABLED:TRUE</li>
</ul>
<p> </p>
<p id="rfc.section.C.10.p.11">Now we will get raw 802.15.4 packets asynchronously on PROP_STREAM_RAW: </p>
<p/>
<ul>
<li>CMD_VALUE_IS:PROP_STREAM_RAW:...</li>
<li>CMD_VALUE_IS:PROP_STREAM_RAW:...</li>
<li>CMD_VALUE_IS:PROP_STREAM_RAW:...</li>
</ul>
<p> </p>
<p id="rfc.section.C.10.p.13">This mode may be entered even when associated with a network. In that case, you should set <samp>PROP_MAC_PROMISCUOUS_MODE</samp> to <samp>MAC_PROMISCUOUS_MODE_PROMISCUOUS</samp> or <samp>MAC_PROMISCUOUS_MODE_NORMAL</samp>, so that you can avoid receiving packets from other networks or that are destined for other nodes. </p>
<h1 id="rfc.appendix.D"><a href="#rfc.appendix.D">Appendix D.</a> <a href="#glossary" id="glossary">Glossary</a></h1>
<p>
<a id="CREF18" class="info">[CREF18]<span class="info">RQ: Alphabetize before finalization.</span></a>
</p>
<p/>
<dl>
<dt>FCS</dt>
<dd style="margin-left: 8"><br/> Final Checksum. Bytes added to the end of a packet to help determine if the packet was received without corruption.</dd>
<dt>NCP</dt>
<dd style="margin-left: 8"><br/> Network Control Processor.</dd>
<dt>NLI</dt>
<dd style="margin-left: 8"><br/> Network Link Identifier. May be a value between zero and three. See <a href="#nli-network-link-identifier">Section 2.1.2</a> for more information.</dd>
<dt>OS</dt>
<dd style="margin-left: 8"><br/> Operating System, i.e. the IPv6 node using Spinel to control and manage one or more of its IPv6 network interfaces.</dd>
<dt>PHY</dt>
<dd style="margin-left: 8"><br/> Physical layer. Refers to characteristics and parameters related to the physical implementation and operation of a networking medium.</dd>
<dt>PUI</dt>
<dd style="margin-left: 8"><br/> Packed Unsigned Integer. A way to serialize an unsigned integer using one, two, or three bytes. Used throughout the Spinel protocol. See <a href="#packed-unsigned-integer">Section 3.2</a> for more information.</dd>
<dt>TID</dt>
<dd style="margin-left: 8"><br/> Transaction Identifier. May be a value between zero and fifteen. See <a href="#tid-transaction-identifier">Section 2.1.3</a> for more information.</dd>
</dl>
<p> </p>
<h1 id="rfc.appendix.E"><a href="#rfc.appendix.E">Appendix E.</a> <a href="#acknowledgments" id="acknowledgments">Acknowledgments</a></h1>
<p id="rfc.section.E.p.1">Thread is a registered trademark of The Thread Group, Inc. </p>
<p id="rfc.section.E.p.2">Special thanks to Nick Banks, Jonathan Hui, Abtin Keshavarzian, Yakun Xu, Piotr Szkotak, Arjuna Sivasithambaresan and Martin Turon for their substantial contributions and feedback related to this document. </p>
<p id="rfc.section.E.p.3">This document was prepared using <a href="https://github.com/miekg/mmark">mmark</a> by (Miek Gieben) and <a href="http://xml2rfc.ietf.org/">xml2rfc (version 2)</a>. </p>
<h1 id="rfc.authors">
<a href="#rfc.authors">Authors' Addresses</a>
</h1>
<div class="avoidbreak">
<address class="vcard">
<span class="vcardline">
<span class="fn">Robert S. Quattlebaum</span>
<span class="n hidden">
<span class="family-name">Quattlebaum</span>
</span>
</span>
<span class="org vcardline">Nest Labs, Inc.</span>
<span class="adr">
<span class="vcardline">3400 Hillview Ave.</span>
<span class="vcardline">
<span class="locality">Palo Alto</span>,
<span class="region">California</span>
<span class="code">94304</span>
</span>
<span class="country-name vcardline">USA</span>
</span>
<span class="vcardline">EMail: <a href="mailto:rquattle@nestlabs.com">rquattle@nestlabs.com</a></span>
</address>
</div><div class="avoidbreak">
<address class="vcard">
<span class="vcardline">
<span class="fn">James Woodyatt</span> (editor)
<span class="n hidden">
<span class="family-name">Woodyatt</span>
</span>
</span>
<span class="org vcardline">Nest Labs, Inc.</span>
<span class="adr">
<span class="vcardline">3400 Hillview Ave.</span>
<span class="vcardline">
<span class="locality">Palo Alto</span>,
<span class="region">California</span>
<span class="code">94304</span>
</span>
<span class="country-name vcardline">USA</span>
</span>
<span class="vcardline">EMail: <a href="mailto:jhw@nestlabs.com">jhw@nestlabs.com</a></span>
</address>
</div>
</body>
</html>