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