diff --git a/doc/draft-spinel-protocol.html b/doc/draft-spinel-protocol.html index 5fc2247c9..a5fe7d028 100644 --- a/doc/draft-spinel-protocol.html +++ b/doc/draft-spinel-protocol.html @@ -517,6 +517,7 @@ + @@ -566,8 +567,8 @@ - - + + @@ -588,7 +589,7 @@
Spinel Host-Controller Protocol
- draft-spinel-protocol-29f5b2c82
This parameter describes the number of aggregate seconds within the detection window where the RSSI must be above PROP_JAM_DETECT_RSSI_THRESHOLD to trigger detection.
The behavior of the jamming detection feature when PROP_JAM_DETECT_BUSY is larger than PROP_JAM_DETECT_WINDOW is undefined.
++
This value provides information about current state of jamming detection module for monitoring/debugging purpose. It returns a 64-bit value where each bit corresponds to one second interval starting with bit 0 for the most recent interval and bit 63 for the oldest intervals (63 sec earlier). The bit is set to 1 if the jamming detection module observed/detected high signal level during the corresponding one second interval. The value is read-only and is encoded as two L (uint32) values in little-endian format (first L (uint32) value gives the lower bits corresponding to more recent history).
This feature allows the host to have control over some or all of the GPIO pins on the NCP. The host can determine which GPIOs are available by examining PROP_GPIO_CONFIG, described below. This API supports a maximum of 256 individual GPIO pins.
Support for this feature can be determined by the presence of CAP_GPIO.
diff --git a/doc/draft-spinel-protocol.txt b/doc/draft-spinel-protocol.txt index 18f14a4aa..5cc878e5b 100644 --- a/doc/draft-spinel-protocol.txt +++ b/doc/draft-spinel-protocol.txt @@ -4,11 +4,11 @@ R. Quattlebaum Nest Labs - November 30, 2016 + December 2, 2016 Spinel Host-Controller Protocol - draft-spinel-protocol-29f5b2c82 + draft-spinel-protocol-3df876d Abstract @@ -53,9 +53,9 @@ Copyright Notice -Quattlebaum Expires June 3, 2017 [Page 1] +Quattlebaum Expires June 5, 2017 [Page 1] - Spinel Protocol (29f5b2c82) November 2016 + Spinel Protocol (3df876d) December 2016 BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS @@ -109,9 +109,9 @@ Table of Contents -Quattlebaum Expires June 3, 2017 [Page 2] +Quattlebaum Expires June 5, 2017 [Page 2] - Spinel Protocol (29f5b2c82) November 2016 + Spinel Protocol (3df876d) December 2016 5.2.3. PROP 2: PROP_NCP_VERSION . . . . . . . . . . . . . . 23 @@ -165,9 +165,9 @@ Quattlebaum Expires June 3, 2017 [Page 2] -Quattlebaum Expires June 3, 2017 [Page 3] +Quattlebaum Expires June 5, 2017 [Page 3] - Spinel Protocol (29f5b2c82) November 2016 + Spinel Protocol (3df876d) December 2016 5.7.4. PROP 99: PROP_IPV6_ADDRESS_TABLE . . . . . . . . . . 37 @@ -221,9 +221,9 @@ Quattlebaum Expires June 3, 2017 [Page 3] -Quattlebaum Expires June 3, 2017 [Page 4] +Quattlebaum Expires June 5, 2017 [Page 4] - Spinel Protocol (29f5b2c82) November 2016 + Spinel Protocol (3df876d) December 2016 9.2.2. PROP 11: PROP_HBO_BLOCK_MAX . . . . . . . . . . . . . 48 @@ -234,56 +234,57 @@ Quattlebaum Expires June 3, 2017 [Page 4] 10.1.3. PROP 4610: PROP_JAM_DETECT_RSSI_THRESHOLD . . . . . 49 10.1.4. PROP 4611: PROP_JAM_DETECT_WINDOW . . . . . . . . . 49 10.1.5. PROP 4612: PROP_JAM_DETECT_BUSY . . . . . . . . . . 50 + 10.1.6. PROP 4613: SPINEL_PROP_JAM_DETECT_HISTORY_BITMAP . . 50 11. Feature: GPIO Access . . . . . . . . . . . . . . . . . . . . 50 - 11.1. Properties . . . . . . . . . . . . . . . . . . . . . . . 50 - 11.1.1. PROP 4096: PROP_GPIO_CONFIG . . . . . . . . . . . . 50 - 11.1.2. PROP 4098: PROP_GPIO_STATE . . . . . . . . . . . . . 51 + 11.1. Properties . . . . . . . . . . . . . . . . . . . . . . . 51 + 11.1.1. PROP 4096: PROP_GPIO_CONFIG . . . . . . . . . . . . 51 + 11.1.2. PROP 4098: PROP_GPIO_STATE . . . . . . . . . . . . . 52 11.1.3. PROP 4099: PROP_GPIO_STATE_SET . . . . . . . . . . . 52 - 11.1.4. PROP 4100: PROP_GPIO_STATE_CLEAR . . . . . . . . . . 52 + 11.1.4. PROP 4100: PROP_GPIO_STATE_CLEAR . . . . . . . . . . 53 12. Security Considerations . . . . . . . . . . . . . . . . . . . 53 12.1. Raw Application Access . . . . . . . . . . . . . . . . . 53 13.1. URIs . . . . . . . . . . . . . . . . . . . . . . . . . . 53 Appendix A. Framing Protocol . . . . . . . . . . . . . . . . . . 53 - A.1. UART Recommendations . . . . . . . . . . . . . . . . . . 53 + A.1. UART Recommendations . . . . . . . . . . . . . . . . . . 54 A.1.1. UART Bit Rate Detection . . . . . . . . . . . . . . . 54 - A.1.2. HDLC-Lite . . . . . . . . . . . . . . . . . . . . . . 54 - A.2. SPI Recommendations . . . . . . . . . . . . . . . . . . . 55 + A.1.2. HDLC-Lite . . . . . . . . . . . . . . . . . . . . . . 55 + A.2. SPI Recommendations . . . . . . . . . . . . . . . . . . . 56 A.2.1. SPI Framing Protocol . . . . . . . . . . . . . . . . 56 A.3. I^2C Recommendations . . . . . . . . . . . . . . . . . . 58 A.4. Native USB Recommendations . . . . . . . . . . . . . . . 58 Appendix B. Test Vectors . . . . . . . . . . . . . . . . . . . . 58 B.1. Test Vector: Packed Unsigned Integer . . . . . . . . . . 58 - B.2. Test Vector: Reset Command . . . . . . . . . . . . . . . 58 + B.2. Test Vector: Reset Command . . . . . . . . . . . . . . . 59 B.3. Test Vector: Reset Notification . . . . . . . . . . . . . 59 B.4. Test Vector: Scan Beacon . . . . . . . . . . . . . . . . 59 - B.5. Test Vector: Inbound IPv6 Packet . . . . . . . . . . . . 59 + B.5. Test Vector: Inbound IPv6 Packet . . . . . . . . . . . . 60 B.6. Test Vector: Outbound IPv6 Packet . . . . . . . . . . . . 60 B.7. Test Vector: Fetch list of on-mesh networks . . . . . . . 60 B.8. Test Vector: Returned list of on-mesh networks . . . . . 60 - B.9. Test Vector: Adding an on-mesh network . . . . . . . . . 60 + B.9. Test Vector: Adding an on-mesh network . . . . . . . . . 61 B.10. Test Vector: Insertion notification of an on-mesh network 61 - B.11. Test Vector: Removing a local on-mesh network . . . . . . 61 + B.11. Test Vector: Removing a local on-mesh network . . . . . . 62 B.12. Test Vector: Removal notification of an on-mesh network . 62 Appendix C. Example Sessions . . . . . . . . . . . . . . . . . . 62 C.1. NCP Initialization . . . . . . . . . . . . . . . . . . . 62 C.2. Attaching to a network . . . . . . . . . . . . . . . . . 63 - C.3. Successfully joining a pre-existing network . . . . . . . 63 + C.3. Successfully joining a pre-existing network . . . . . . . 64 C.4. Unsuccessfully joining a pre-existing network . . . . . . 64 - C.5. Detaching from a network . . . . . . . . . . . . . . . . 64 + C.5. Detaching from a network . . . . . . . . . . . . . . . . 65 C.6. Attaching to a saved network . . . . . . . . . . . . . . 65 C.7. NCP Software Reset . . . . . . . . . . . . . . . . . . . 65 C.8. Adding an on-mesh prefix . . . . . . . . . . . . . . . . 65 - C.9. Entering low-power modes . . . . . . . . . . . . . . . . 65 -Quattlebaum Expires June 3, 2017 [Page 5] +Quattlebaum Expires June 5, 2017 [Page 5] - Spinel Protocol (29f5b2c82) November 2016 + Spinel Protocol (3df876d) December 2016 - C.10. Sniffing raw packets . . . . . . . . . . . . . . . . . . 65 - Appendix D. Acknowledgments . . . . . . . . . . . . . . . . . . 66 + C.9. Entering low-power modes . . . . . . . . . . . . . . . . 66 + C.10. Sniffing raw packets . . . . . . . . . . . . . . . . . . 66 + Appendix D. Acknowledgments . . . . . . . . . . . . . . . . . . 67 Appendix E. Glossary . . . . . . . . . . . . . . . . . . . . . . 67 Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 68 @@ -328,16 +329,17 @@ Quattlebaum Expires June 3, 2017 [Page 5] the host and the NCP, the following commands and properties are already considered to be "baked" and will not change: + + + + +Quattlebaum Expires June 5, 2017 [Page 6] + + Spinel Protocol (3df876d) December 2016 + + o Command IDs zero through eight. (Reset, No-op, and Property-Value Commands) - - - -Quattlebaum Expires June 3, 2017 [Page 6] - - Spinel Protocol (29f5b2c82) November 2016 - - o Property IDs zero through two. (Last status, Protocol Version, and NCP Version) @@ -383,17 +385,18 @@ Quattlebaum Expires June 3, 2017 [Page 6] Since there can be more than one application that is using the API at a time, the "PROP_LOCK" property (Section 5.2.10) would be used to + + + + +Quattlebaum Expires June 5, 2017 [Page 7] + + Spinel Protocol (3df876d) December 2016 + + ensure exclusive access to the NCP by an application. Only one process would be allowed to enable the lock at a time. - - - -Quattlebaum Expires June 3, 2017 [Page 7] - - Spinel Protocol (29f5b2c82) November 2016 - - Such a IPC mechanism would be desirable because it is, from a spinel perspective, future proof. New features can be added and new properties assigned and the IPC protocol would not need to be @@ -440,16 +443,16 @@ Quattlebaum Expires June 3, 2017 [Page 7] exceptions include "Host Buffer Offload" (Section 9) and "Network Save" (Section 8). + + +Quattlebaum Expires June 5, 2017 [Page 8] + + Spinel Protocol (3df876d) December 2016 + + In Spinel, properties are keyed by an unsigned integer between 0 and 2,097,151 (See Section 3.2). - - -Quattlebaum Expires June 3, 2017 [Page 8] - - Spinel Protocol (29f5b2c82) November 2016 - - 1.2.1. Property Methods Properties may support one or more of the following methods: @@ -496,16 +499,16 @@ Quattlebaum Expires June 3, 2017 [Page 8] o List of IPv6 addresses assigned to the interface. o List of capabilities supported by the NCP. + + +Quattlebaum Expires June 5, 2017 [Page 9] + + Spinel Protocol (3df876d) December 2016 + + The valid operations on these sorts of properties are "VALUE_GET", "VALUE_SET", "VALUE_INSERT", and "VALUE_REMOVE". - - -Quattlebaum Expires June 3, 2017 [Page 9] - - Spinel Protocol (29f5b2c82) November 2016 - - When the value is fetched using "VALUE_GET", 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 @@ -554,12 +557,9 @@ Quattlebaum Expires June 3, 2017 [Page 9] - - - -Quattlebaum Expires June 3, 2017 [Page 10] +Quattlebaum Expires June 5, 2017 [Page 10] - Spinel Protocol (29f5b2c82) November 2016 + Spinel Protocol (3df876d) December 2016 +---------+--------+-----+-------------+ @@ -613,9 +613,9 @@ Quattlebaum Expires June 3, 2017 [Page 10] -Quattlebaum Expires June 3, 2017 [Page 11] +Quattlebaum Expires June 5, 2017 [Page 11] - Spinel Protocol (29f5b2c82) November 2016 + Spinel Protocol (3df876d) December 2016 The TID value of zero (0) is used for commands to which a correlated @@ -669,9 +669,9 @@ Quattlebaum Expires June 3, 2017 [Page 11] -Quattlebaum Expires June 3, 2017 [Page 12] +Quattlebaum Expires June 5, 2017 [Page 12] - Spinel Protocol (29f5b2c82) November 2016 + Spinel Protocol (3df876d) December 2016 o "C6U": A single unsigned byte, followed by a 128-bit IPv6 address, @@ -725,9 +725,9 @@ Quattlebaum Expires June 3, 2017 [Page 12] -Quattlebaum Expires June 3, 2017 [Page 13] +Quattlebaum Expires June 5, 2017 [Page 13] - Spinel Protocol (29f5b2c82) November 2016 + Spinel Protocol (3df876d) December 2016 The packed unsigned integer format is based on the unsigned integer @@ -781,9 +781,9 @@ Quattlebaum Expires June 3, 2017 [Page 13] -Quattlebaum Expires June 3, 2017 [Page 14] +Quattlebaum Expires June 5, 2017 [Page 14] - Spinel Protocol (29f5b2c82) November 2016 + Spinel Protocol (3df876d) December 2016 However, things are a little different with "CLDL". Since our data @@ -837,9 +837,9 @@ Quattlebaum Expires June 3, 2017 [Page 14] -Quattlebaum Expires June 3, 2017 [Page 15] +Quattlebaum Expires June 5, 2017 [Page 15] - Spinel Protocol (29f5b2c82) November 2016 + Spinel Protocol (3df876d) December 2016 3.5. Arrays @@ -893,9 +893,9 @@ Quattlebaum Expires June 3, 2017 [Page 15] -Quattlebaum Expires June 3, 2017 [Page 16] +Quattlebaum Expires June 5, 2017 [Page 16] - Spinel Protocol (29f5b2c82) November 2016 + Spinel Protocol (3df876d) December 2016 If an error occurs, the value of "PROP_LAST_STATUS" will be emitted @@ -949,9 +949,9 @@ Quattlebaum Expires June 3, 2017 [Page 16] -Quattlebaum Expires June 3, 2017 [Page 17] +Quattlebaum Expires June 5, 2017 [Page 17] - Spinel Protocol (29f5b2c82) November 2016 + Spinel Protocol (3df876d) December 2016 Insert value into property command. Instructs the NCP to insert the @@ -1005,9 +1005,9 @@ Quattlebaum Expires June 3, 2017 [Page 17] -Quattlebaum Expires June 3, 2017 [Page 18] +Quattlebaum Expires June 5, 2017 [Page 18] - Spinel Protocol (29f5b2c82) November 2016 + Spinel Protocol (3df876d) December 2016 The payload for this command is the property identifier encoded in @@ -1061,9 +1061,9 @@ Quattlebaum Expires June 3, 2017 [Page 18] -Quattlebaum Expires June 3, 2017 [Page 19] +Quattlebaum Expires June 5, 2017 [Page 19] - Spinel Protocol (29f5b2c82) November 2016 + Spinel Protocol (3df876d) December 2016 4.10. CMD 18: (Host->NCP) CMD_PEEK @@ -1117,9 +1117,9 @@ Quattlebaum Expires June 3, 2017 [Page 19] -Quattlebaum Expires June 3, 2017 [Page 20] +Quattlebaum Expires June 5, 2017 [Page 20] - Spinel Protocol (29f5b2c82) November 2016 + Spinel Protocol (3df876d) December 2016 Due to the low-level nature of this command, certain error conditions @@ -1173,9 +1173,9 @@ Quattlebaum Expires June 3, 2017 [Page 20] -Quattlebaum Expires June 3, 2017 [Page 21] +Quattlebaum Expires June 5, 2017 [Page 21] - Spinel Protocol (29f5b2c82) November 2016 + Spinel Protocol (3df876d) December 2016 Note that each property section has two reserved ranges: a primary @@ -1229,9 +1229,9 @@ Quattlebaum Expires June 3, 2017 [Page 21] -Quattlebaum Expires June 3, 2017 [Page 22] +Quattlebaum Expires June 5, 2017 [Page 22] - Spinel Protocol (29f5b2c82) November 2016 + Spinel Protocol (3df876d) December 2016 5.2.2.1. Major Version Number @@ -1285,9 +1285,9 @@ Quattlebaum Expires June 3, 2017 [Page 22] -Quattlebaum Expires June 3, 2017 [Page 23] +Quattlebaum Expires June 5, 2017 [Page 23] - Spinel Protocol (29f5b2c82) November 2016 + Spinel Protocol (3df876d) December 2016 +---------+----------------+ @@ -1341,9 +1341,9 @@ Quattlebaum Expires June 3, 2017 [Page 23] -Quattlebaum Expires June 3, 2017 [Page 24] +Quattlebaum Expires June 5, 2017 [Page 24] - Spinel Protocol (29f5b2c82) November 2016 + Spinel Protocol (3df876d) December 2016 o 1: "CAP_LOCK" @@ -1397,9 +1397,9 @@ Quattlebaum Expires June 3, 2017 [Page 24] -Quattlebaum Expires June 3, 2017 [Page 25] +Quattlebaum Expires June 5, 2017 [Page 25] - Spinel Protocol (29f5b2c82) November 2016 + Spinel Protocol (3df876d) December 2016 Describes the number of concurrent interfaces supported by this NCP. @@ -1453,9 +1453,9 @@ Quattlebaum Expires June 3, 2017 [Page 25] -Quattlebaum Expires June 3, 2017 [Page 26] +Quattlebaum Expires June 5, 2017 [Page 26] - Spinel Protocol (29f5b2c82) November 2016 + Spinel Protocol (3df876d) December 2016 The static EUI64 address of the device, used as a serial number. @@ -1509,9 +1509,9 @@ Quattlebaum Expires June 3, 2017 [Page 26] -Quattlebaum Expires June 3, 2017 [Page 27] +Quattlebaum Expires June 5, 2017 [Page 27] - Spinel Protocol (29f5b2c82) November 2016 + Spinel Protocol (3df876d) December 2016 To receive the debugging stream, you wait for "CMD_PROP_VALUE_IS" @@ -1565,9 +1565,9 @@ Quattlebaum Expires June 3, 2017 [Page 27] -Quattlebaum Expires June 3, 2017 [Page 28] +Quattlebaum Expires June 5, 2017 [Page 28] - Spinel Protocol (29f5b2c82) November 2016 + Spinel Protocol (3df876d) December 2016 +----------+-----------------------+------------+-----+---------+ @@ -1621,9 +1621,9 @@ Quattlebaum Expires June 3, 2017 [Page 28] -Quattlebaum Expires June 3, 2017 [Page 29] +Quattlebaum Expires June 5, 2017 [Page 29] - Spinel Protocol (29f5b2c82) November 2016 + Spinel Protocol (3df876d) December 2016 +---------+----------------+------------+----------------+ @@ -1677,9 +1677,9 @@ Quattlebaum Expires June 3, 2017 [Page 29] -Quattlebaum Expires June 3, 2017 [Page 30] +Quattlebaum Expires June 5, 2017 [Page 30] - Spinel Protocol (29f5b2c82) November 2016 + Spinel Protocol (3df876d) December 2016 Any data past the end of "FRAME_DATA_LEN" is considered metadata, the @@ -1733,9 +1733,9 @@ Quattlebaum Expires June 3, 2017 [Page 30] -Quattlebaum Expires June 3, 2017 [Page 31] +Quattlebaum Expires June 5, 2017 [Page 31] - Spinel Protocol (29f5b2c82) November 2016 + Spinel Protocol (3df876d) December 2016 When setting, the value will be rounded down to a value that is @@ -1789,9 +1789,9 @@ Quattlebaum Expires June 3, 2017 [Page 31] -Quattlebaum Expires June 3, 2017 [Page 32] +Quattlebaum Expires June 5, 2017 [Page 32] - Spinel Protocol (29f5b2c82) November 2016 + Spinel Protocol (3df876d) December 2016 5.5.2. PROP 49: PROP_MAC_SCAN_MASK @@ -1845,9 +1845,9 @@ Quattlebaum Expires June 3, 2017 [Page 32] -Quattlebaum Expires June 3, 2017 [Page 33] +Quattlebaum Expires June 5, 2017 [Page 33] - Spinel Protocol (29f5b2c82) November 2016 + Spinel Protocol (3df876d) December 2016 5.5.5. PROP 52: PROP_MAC_15_4_LADDR @@ -1901,9 +1901,9 @@ Quattlebaum Expires June 3, 2017 [Page 33] -Quattlebaum Expires June 3, 2017 [Page 34] +Quattlebaum Expires June 5, 2017 [Page 34] - Spinel Protocol (29f5b2c82) November 2016 + Spinel Protocol (3df876d) December 2016 +----+--------------------------------+-----------------------------+ @@ -1957,9 +1957,9 @@ Quattlebaum Expires June 3, 2017 [Page 34] -Quattlebaum Expires June 3, 2017 [Page 35] +Quattlebaum Expires June 5, 2017 [Page 35] - Spinel Protocol (29f5b2c82) November 2016 + Spinel Protocol (3df876d) December 2016 Network interface up/down status. Non-zero (set to 1) indicates up, @@ -2013,9 +2013,9 @@ Quattlebaum Expires June 3, 2017 [Page 35] -Quattlebaum Expires June 3, 2017 [Page 36] +Quattlebaum Expires June 5, 2017 [Page 36] - Spinel Protocol (29f5b2c82) November 2016 + Spinel Protocol (3df876d) December 2016 5.6.9. PROP 72: PROP_NET_PARTITION_ID @@ -2069,9 +2069,9 @@ Quattlebaum Expires June 3, 2017 [Page 36] -Quattlebaum Expires June 3, 2017 [Page 37] +Quattlebaum Expires June 5, 2017 [Page 37] - Spinel Protocol (29f5b2c82) November 2016 + Spinel Protocol (3df876d) December 2016 5.7.5. PROP 101: PROP_IPv6_ICMP_PING_OFFLOAD @@ -2125,9 +2125,9 @@ Quattlebaum Expires June 3, 2017 [Page 37] -Quattlebaum Expires June 3, 2017 [Page 38] +Quattlebaum Expires June 5, 2017 [Page 38] - Spinel Protocol (29f5b2c82) November 2016 + Spinel Protocol (3df876d) December 2016 o 11: "STATUS_NOMEM": The operation has been prevented due to memory @@ -2181,9 +2181,9 @@ Quattlebaum Expires June 3, 2017 [Page 38] -Quattlebaum Expires June 3, 2017 [Page 39] +Quattlebaum Expires June 5, 2017 [Page 39] - Spinel Protocol (29f5b2c82) November 2016 + Spinel Protocol (3df876d) December 2016 7.1. Thread Capabilities @@ -2237,9 +2237,9 @@ Quattlebaum Expires June 3, 2017 [Page 39] -Quattlebaum Expires June 3, 2017 [Page 40] +Quattlebaum Expires June 5, 2017 [Page 40] - Spinel Protocol (29f5b2c82) November 2016 + Spinel Protocol (3df876d) December 2016 7.2.5. PROP 84: PROP_THREAD_LEADER_WEIGHT @@ -2293,9 +2293,9 @@ Quattlebaum Expires June 3, 2017 [Page 40] -Quattlebaum Expires June 3, 2017 [Page 41] +Quattlebaum Expires June 5, 2017 [Page 41] - Spinel Protocol (29f5b2c82) November 2016 + Spinel Protocol (3df876d) December 2016 7.2.12. PROP 91: PROP_THREAD_LOCAL_ROUTES @@ -2349,9 +2349,9 @@ Quattlebaum Expires June 3, 2017 [Page 41] -Quattlebaum Expires June 3, 2017 [Page 42] +Quattlebaum Expires June 5, 2017 [Page 42] - Spinel Protocol (29f5b2c82) November 2016 + Spinel Protocol (3df876d) December 2016 7.2.18. PROP 5378: PROP_THREAD_ROUTER_UPGRADE_THRESHOLD @@ -2405,9 +2405,9 @@ Quattlebaum Expires June 3, 2017 [Page 42] -Quattlebaum Expires June 3, 2017 [Page 43] +Quattlebaum Expires June 5, 2017 [Page 43] - Spinel Protocol (29f5b2c82) November 2016 + Spinel Protocol (3df876d) December 2016 7.2.24. PROP 5384: PROP_THREAD_ROUTER_DOWNGRADE_THRESHOLD @@ -2461,9 +2461,9 @@ Quattlebaum Expires June 3, 2017 [Page 43] -Quattlebaum Expires June 3, 2017 [Page 44] +Quattlebaum Expires June 5, 2017 [Page 44] - Spinel Protocol (29f5b2c82) November 2016 + Spinel Protocol (3df876d) December 2016 The presence of this feature can be detected by checking for the @@ -2517,9 +2517,9 @@ Quattlebaum Expires June 3, 2017 [Page 44] -Quattlebaum Expires June 3, 2017 [Page 45] +Quattlebaum Expires June 5, 2017 [Page 45] - Spinel Protocol (29f5b2c82) November 2016 + Spinel Protocol (3df876d) December 2016 8.1.3. CMD 11: (Host->NCP) CMD_NET_RECALL @@ -2573,9 +2573,9 @@ Quattlebaum Expires June 3, 2017 [Page 45] -Quattlebaum Expires June 3, 2017 [Page 46] +Quattlebaum Expires June 5, 2017 [Page 46] - Spinel Protocol (29f5b2c82) November 2016 + Spinel Protocol (3df876d) December 2016 9.1.2. CMD 13: (NCP->Host) CMD_HBO_RECLAIM @@ -2629,9 +2629,9 @@ Quattlebaum Expires June 3, 2017 [Page 46] -Quattlebaum Expires June 3, 2017 [Page 47] +Quattlebaum Expires June 5, 2017 [Page 47] - Spinel Protocol (29f5b2c82) November 2016 + Spinel Protocol (3df876d) December 2016 Describes the number of bytes that may be offloaded from the NCP to @@ -2685,9 +2685,9 @@ Quattlebaum Expires June 3, 2017 [Page 47] -Quattlebaum Expires June 3, 2017 [Page 48] +Quattlebaum Expires June 5, 2017 [Page 48] - Spinel Protocol (29f5b2c82) November 2016 + Spinel Protocol (3df876d) December 2016 +---------+--------------------------+ @@ -2741,9 +2741,9 @@ Quattlebaum Expires June 3, 2017 [Page 48] -Quattlebaum Expires June 3, 2017 [Page 49] +Quattlebaum Expires June 5, 2017 [Page 49] - Spinel Protocol (29f5b2c82) November 2016 + Spinel Protocol (3df876d) December 2016 o Default Value: Implementation-specific @@ -2768,6 +2768,24 @@ Quattlebaum Expires June 3, 2017 [Page 49] "PROP_JAM_DETECT_BUSY" is larger than "PROP_JAM_DETECT_WINDOW" is undefined. +10.1.6. PROP 4613: SPINEL_PROP_JAM_DETECT_HISTORY_BITMAP + + o Type: Read-Only + o Packed-Encoding: "LL" + o Default Value: Implementation-specific + o RECOMMENDED for "CAP_JAM_DETECT" + + This value provides information about current state of jamming + detection module for monitoring/debugging purpose. It returns a + 64-bit value where each bit corresponds to one second interval + starting with bit 0 for the most recent interval and bit 63 for the + oldest intervals (63 sec earlier). The bit is set to 1 if the + jamming detection module observed/detected high signal level during + the corresponding one second interval. The value is read-only and is + encoded as two "L" (uint32) values in little-endian format (first "L" + (uint32) value gives the lower bits corresponding to more recent + history). + 11. Feature: GPIO Access This feature allows the host to have control over some or all of the @@ -2775,6 +2793,15 @@ Quattlebaum Expires June 3, 2017 [Page 49] available by examining "PROP_GPIO_CONFIG", described below. This API supports a maximum of 256 individual GPIO pins. + + + + +Quattlebaum Expires June 5, 2017 [Page 50] + + Spinel Protocol (3df876d) December 2016 + + Support for this feature can be determined by the presence of "CAP_GPIO". @@ -2794,14 +2821,6 @@ Quattlebaum Expires June 3, 2017 [Page 49] GPIOs which do not have a corresponding entry are not supported. - - - -Quattlebaum Expires June 3, 2017 [Page 50] - - Spinel Protocol (29f5b2c82) November 2016 - - The configuration parameter contains the configuration flags for the GPIO: @@ -2831,6 +2850,14 @@ Quattlebaum Expires June 3, 2017 [Page 50] As an optional feature, the configuration of individual pins may be modified using the "CMD_PROP_VALUE_INSERT" command. Only the GPIO number and flags fields MUST be present, the GPIO name (if present) + + + +Quattlebaum Expires June 5, 2017 [Page 51] + + Spinel Protocol (3df876d) December 2016 + + would be ignored. This command can only be used to modify the configuration of GPIOs which are already exposed---it cannot be used by the host to add addional GPIOs. @@ -2849,15 +2876,6 @@ Quattlebaum Expires June 3, 2017 [Page 50] o "CMD_PROP_VAUE_GET": The value of the associated bit describes the logic level read from the pin. - - - - -Quattlebaum Expires June 3, 2017 [Page 51] - - Spinel Protocol (29f5b2c82) November 2016 - - o "CMD_PROP_VALUE_SET": The value of the associated bit is ignored for these pins. @@ -2887,6 +2905,15 @@ Quattlebaum Expires June 3, 2017 [Page 51] affecting other GPIO states. Contains a bit field identifying the output GPIOs that should have their state set to 1. + + + + +Quattlebaum Expires June 5, 2017 [Page 52] + + Spinel Protocol (3df876d) December 2016 + + When writing, unspecified bits are assumed to be zero. The value of any bits for GPIOs which are not specified in "PROP_GPIO_CONFIG" MUST be ignored. @@ -2903,17 +2930,6 @@ Quattlebaum Expires June 3, 2017 [Page 51] any bits for GPIOs which are not specified in "PROP_GPIO_CONFIG" MUST be ignored. - - - - - - -Quattlebaum Expires June 3, 2017 [Page 52] - - Spinel Protocol (29f5b2c82) November 2016 - - 12. Security Considerations 12.1. Raw Application Access @@ -2945,6 +2961,15 @@ Appendix A. Framing Protocol Since this NCP protocol is defined independently of the physical transport or framing, any number of transports and framing protocols + + + + +Quattlebaum Expires June 5, 2017 [Page 53] + + Spinel Protocol (3df876d) December 2016 + + could be used successfully. However, in the interests of compatibility, this document provides some recommendations. @@ -2962,14 +2987,6 @@ A.1. UART Recommendations These values may be adjusted depending on the individual needs of the application or product, but some sort of flow control MUST be used. Hardware flow control is preferred over software flow control. In - - - -Quattlebaum Expires June 3, 2017 [Page 53] - - Spinel Protocol (29f5b2c82) November 2016 - - the absence of hardware flow control, software flow control (XON/ XOFF) MUST be used instead. @@ -3001,6 +3018,14 @@ A.1.1. UART Bit Rate Detection In order to limit the time spent hunting for the appropriate bitrate, we RECOMMEND that only the following bitrates be checked: + + + +Quattlebaum Expires June 5, 2017 [Page 54] + + Spinel Protocol (3df876d) December 2016 + + o 115200 o 230400 o 1000000 (1Mbit) @@ -3016,16 +3041,6 @@ A.1.2. HDLC-Lite of HDLC are omitted. This protocol was chosen because it works well with software flow control and is widely implemented. - - - - - -Quattlebaum Expires June 3, 2017 [Page 54] - - Spinel Protocol (29f5b2c82) November 2016 - - To transmit a frame with HDLC-lite, the 16-bit CRC must first be appended to the frame. The CRC function is defined to be CRC-16/ CCITT, otherwise known as the KERMIT CRC [4]. @@ -3060,6 +3075,13 @@ Quattlebaum Expires June 3, 2017 [Page 54] a framing error. Consecutive flag octets MAY be used as a way to wake up a sleeping NCP. + + +Quattlebaum Expires June 5, 2017 [Page 55] + + Spinel Protocol (3df876d) December 2016 + + When first establishing a connection to the NCP, it is customary to send one or more flag octets to ensure that any previously received data is discarded. @@ -3075,13 +3097,6 @@ A.2. SPI Recommendations o "I̅N̅T̅": (NCP-to-Host) Host Interrupt o "R̅E̅S̅": (Host-to-NCP) NCP Hardware Reset - - -Quattlebaum Expires June 3, 2017 [Page 55] - - Spinel Protocol (29f5b2c82) November 2016 - - The "I̅N̅T̅" signal is used by the NCP to indicate to the host that the NCP has frames pending to send to it. When asserted, the host SHOULD initiate a SPI transaction in a timely @@ -3115,6 +3130,14 @@ A.2.1. SPI Framing Protocol other device must not send any data. (Little endian) o "DATA_LEN": The fourth and fifth bytes indicate the size of the pending data frame to be sent to the other device. If this value + + + +Quattlebaum Expires June 5, 2017 [Page 56] + + Spinel Protocol (3df876d) December 2016 + + is equal-to or less-than the number of bytes that the other device is willing to receive, then the data of the frame is immediately after the header. (Little Endian) @@ -3128,16 +3151,6 @@ A.2.1. SPI Framing Protocol o "RST": This bit is set when that device has been reset since the last time "C̅S̅" was asserted. - - - - - -Quattlebaum Expires June 3, 2017 [Page 56] - - Spinel Protocol (29f5b2c82) November 2016 - - o "CRC": This bit is set when that device supports writing a 16-bit CRC at the end of the data. The CRC length is NOT included in DATA_LEN. @@ -3172,6 +3185,15 @@ Quattlebaum Expires June 3, 2017 [Page 56] should consider the transaction to have failed and try again after 10 milliseconds, retrying up to 200 times. After unsuccessfully trying 200 times in a row, the master MAY take appropriate remedial action + + + + +Quattlebaum Expires June 5, 2017 [Page 57] + + Spinel Protocol (3df876d) December 2016 + + (like a NCP hardware reset, or indicating a communication failure to a user interface). @@ -3186,14 +3208,6 @@ Quattlebaum Expires June 3, 2017 [Page 56] the frame. If not enough bytes were clocked out for the CRC to be read, then the frame must be ignored. If enough bytes were clocked out to perform a CRC check, but the CRC check fails, then the frame - - - -Quattlebaum Expires June 3, 2017 [Page 57] - - Spinel Protocol (29f5b2c82) November 2016 - - must be rejected and the "CRC_FAIL" bit on the next frame (and ONLY the next frame) MUST be set. @@ -3228,6 +3242,14 @@ B.1. Test Vector: Packed Unsigned Integer | 2,097,151 | "FF FF 7F" | +---------------+-----------------------+ + + + +Quattlebaum Expires June 5, 2017 [Page 58] + + Spinel Protocol (3df876d) December 2016 + + [CREF4] B.2. Test Vector: Reset Command @@ -3240,16 +3262,6 @@ B.2. Test Vector: Reset Command 80 01 - - - - - -Quattlebaum Expires June 3, 2017 [Page 58] - - Spinel Protocol (29f5b2c82) November 2016 - - B.3. Test Vector: Reset Notification o IID: 0 @@ -3286,6 +3298,14 @@ B.4. Test Vector: Scan Beacon + Network Name: "spinel" + XPANID: "DE AD 00 BE EF 00 CA FE" + + + +Quattlebaum Expires June 5, 2017 [Page 59] + + Spinel Protocol (3df876d) December 2016 + + Frame: 80 07 33 0F C4 0D 00 B6 40 D4 8C E9 38 F9 52 FF FF D2 04 00 @@ -3298,14 +3318,6 @@ B.5. Test Vector: Inbound IPv6 Packet [CREF5] - - - -Quattlebaum Expires June 3, 2017 [Page 59] - - Spinel Protocol (29f5b2c82) November 2016 - - B.6. Test Vector: Outbound IPv6 Packet CMD_VALUE_SET(PROP_STREAM_NET) @@ -3340,6 +3352,16 @@ B.8. Test Vector: Returned list of on-mesh networks Frame: + + + + + +Quattlebaum Expires June 5, 2017 [Page 60] + + Spinel Protocol (3df876d) December 2016 + + 84 06 5A 13 00 20 01 0D B8 00 01 00 00 00 00 00 00 00 00 00 00 40 01 ?? 13 00 20 01 0D B8 00 02 00 00 00 00 00 00 00 00 00 00 40 00 ?? @@ -3352,16 +3374,6 @@ B.9. Test Vector: Adding an on-mesh network o PROP: 90 ("PROP_THREAD_ON_MESH_NETS") o VALUE: Structure, encoded as "6CbCb" - - - - - -Quattlebaum Expires June 3, 2017 [Page 60] - - Spinel Protocol (29f5b2c82) November 2016 - - +--------------+---------------+-------------+-------------+ | IPv6 Prefix | Prefix Length | Stable Flag | Other Flags | +--------------+---------------+-------------+-------------+ @@ -3396,6 +3408,16 @@ B.10. Test Vector: Insertion notification of an on-mesh network [CREF8] + + + + + +Quattlebaum Expires June 5, 2017 [Page 61] + + Spinel Protocol (3df876d) December 2016 + + B.11. Test Vector: Removing a local on-mesh network o IID: 0 @@ -3408,16 +3430,6 @@ B.11. Test Vector: Removing a local on-mesh network 86 05 5A 20 01 0D B8 00 03 00 00 00 00 00 00 00 00 00 00 - - - - - -Quattlebaum Expires June 3, 2017 [Page 61] - - Spinel Protocol (29f5b2c82) November 2016 - - B.12. Test Vector: Removal notification of an on-mesh network o IID: 0 @@ -3454,6 +3466,14 @@ C.1. NCP Initialization If the host supports using vendor-specific commands, the vendor should be verified before using them: + + + +Quattlebaum Expires June 5, 2017 [Page 62] + + Spinel Protocol (3df876d) December 2016 + + o CMD_VALUE_GET:PROP_VENDOR_ID o CMD_VALUE_IS:PROP_VENDOR_ID @@ -3466,14 +3486,6 @@ C.1. NCP Initialization If the NCP supports CAP_NET_SAVE, then we go ahead and recall the network: - - - -Quattlebaum Expires June 3, 2017 [Page 62] - - Spinel Protocol (29f5b2c82) November 2016 - - o CMD_NET_RECALL C.2. Attaching to a network @@ -3510,6 +3522,14 @@ C.2. Attaching to a network o CMD_VALUE_SET:PROP_NET_STACK_UP:TRUE o CMD_VALUE_IS:PROP_NET_STACK_UP:TRUE + + + +Quattlebaum Expires June 5, 2017 [Page 63] + + Spinel Protocol (3df876d) December 2016 + + Some asynchronous events from the NCP: o CMD_VALUE_IS:PROP_NET_ROLE @@ -3520,16 +3540,6 @@ C.3. Successfully joining a pre-existing network [CREF11] - - - - - -Quattlebaum Expires June 3, 2017 [Page 63] - - Spinel Protocol (29f5b2c82) November 2016 - - This example session is identical to the above session up to the point where we set PROP_NET_IF_UP to true. From there, the behavior changes. @@ -3568,6 +3578,14 @@ C.4. Unsuccessfully joining a pre-existing network Some asynchronous events from the NCP: + + + +Quattlebaum Expires June 5, 2017 [Page 64] + + Spinel Protocol (3df876d) December 2016 + + o CMD_VALUE_IS:PROP_LAST_STATUS:STATUS_JOIN_NO_PEERS o CMD_VALUE_IS:PROP_NET_STACK_UP:FALSE @@ -3575,17 +3593,6 @@ C.5. Detaching from a network TBD - - - - - - -Quattlebaum Expires June 3, 2017 [Page 64] - - Spinel Protocol (29f5b2c82) November 2016 - - C.6. Attaching to a saved network [CREF12] @@ -3623,6 +3630,18 @@ C.8. Adding an on-mesh prefix TBD + + + + + + + +Quattlebaum Expires June 5, 2017 [Page 65] + + Spinel Protocol (3df876d) December 2016 + + C.9. Entering low-power modes TBD @@ -3635,13 +3654,6 @@ C.10. Sniffing raw packets Optionally set the channel: - - -Quattlebaum Expires June 3, 2017 [Page 65] - - Spinel Protocol (29f5b2c82) November 2016 - - o CMD_VALUE_SET:PROP_PHY_CHAN:x o CMD_VALUE_IS:PROP_PHY_CHAN @@ -3675,6 +3687,17 @@ Quattlebaum Expires June 3, 2017 [Page 65] so that you can avoid receiving packets from other networks or that are destined for other nodes. + + + + + + +Quattlebaum Expires June 5, 2017 [Page 66] + + Spinel Protocol (3df876d) December 2016 + + Appendix D. Acknowledgments Special thanks to Abtin Keshavarzian, Martin Turon, Arjuna @@ -3686,18 +3709,6 @@ Appendix D. Acknowledgments This document was prepared using mmark [5] by (Miek Gieben) and xml2rfc (version 2) [6]. - - - - - - - -Quattlebaum Expires June 3, 2017 [Page 66] - - Spinel Protocol (29f5b2c82) November 2016 - - Appendix E. Glossary [CREF16] @@ -3734,6 +3745,15 @@ Editorial Comments 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | |---|---|---|---|---|---|---|---| | FLG || IID || TID |||| + + + + +Quattlebaum Expires June 5, 2017 [Page 67] + + Spinel Protocol (3df876d) December 2016 + + [CREF2] RQ: It may make sense to have a look at what Bluetooth HCI is doing for native I^2C framing and go with that. @@ -3746,14 +3766,6 @@ Editorial Comments [CREF6] RQ: FIXME: This test vector is incomplete. - - - -Quattlebaum Expires June 3, 2017 [Page 67] - - Spinel Protocol (29f5b2c82) November 2016 - - [CREF7] RQ: FIXME: This test vector is incomplete. [CREF8] RQ: FIXME: This test vector is incomplete. @@ -3793,16 +3805,4 @@ Author's Address - - - - - - - - - - - - -Quattlebaum Expires June 3, 2017 [Page 68] +Quattlebaum Expires June 5, 2017 [Page 68]