From bd531379a7465075664d8871fb661369cdec9d01 Mon Sep 17 00:00:00 2001 From: Robert Quattlebaum Date: Mon, 28 Nov 2016 18:07:03 -0800 Subject: [PATCH] spinel-protocol: Section reorganization, added GPIO cmds (#1015) Also added `CAP_WRITABLE_RAW_STREAM`, to indicate that the raw stream is writable. --- doc/draft-spinel-protocol.html | 1796 +++++++------- doc/draft-spinel-protocol.txt | 2098 +++++++++-------- .../draft-spinel-protocol.md.in | 34 +- .../spinel-feature-gpio.md | 47 + doc/spinel-protocol-src/spinel-prop-core.md | 10 +- src/ncp/spinel.h | 54 + 6 files changed, 2162 insertions(+), 1877 deletions(-) create mode 100644 doc/spinel-protocol-src/spinel-feature-gpio.md diff --git a/doc/draft-spinel-protocol.html b/doc/draft-spinel-protocol.html index b37c6b993..fe36f65c6 100644 --- a/doc/draft-spinel-protocol.html +++ b/doc/draft-spinel-protocol.html @@ -464,9 +464,68 @@ - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -475,84 +534,32 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -560,8 +567,8 @@ - - + + @@ -582,7 +589,7 @@ - November 4, 2016 + November 28, 2016 @@ -590,7 +597,7 @@

Spinel Host-Controller Protocol
- draft-spinel-protocol-f9bf43254

+ draft-spinel-protocol-05367497d

Abstract @@ -715,10 +722,69 @@
  • 5.7.4. PROP 99: PROP_IPV6_ADDRESS_TABLE
  • 5.7.5. PROP 101: PROP_IPv6_ICMP_PING_OFFLOAD
  • 6. Status Codes
  • -
  • 7. Security Considerations
  • -
  • 8. Acknowledgments
  • -
  • Appendix A. Framing Protocol
  • +
  • 7. Technology: Thread
  • +
  • 8. Feature: Network Save
  • +
  • 9. Feature: Host Buffer Offload
  • +
  • 10. Feature: Jam Detection
  • +
  • 11. Feature: Basic GPIO Access
  • +
  • 12. Security Considerations
  • +
  • Appendix A. Framing Protocol
  • Appendix B. Test Vectors
  • +
  • Appendix C. Example Sessions
  • +
  • Appendix D. Acknowledgments
  • +
  • Appendix E. Glossary
  • Author's Address
  • @@ -852,7 +866,7 @@

    This would likely be implemented as a part of the renumbering effort (Section 1.1.1).

    1.2. Property Overview

    Spinel is largely a property-based protocol, with a property defined for every attribute that needs to be set, changed, or known by the host. 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 change an additional property.

    -

    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" (Appendix C) and "Network Save" (Appendix B).

    +

    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" (Section 9) and "Network Save" (Section 8).

    In Spinel, properties are keyed by an unsigned integer between 0 and 2,097,151 (See Section 3.2).

    1.2.1. Property Methods

    Properties may support one or more of the following methods:

    @@ -1455,7 +1469,7 @@

    This command allows the NCP to fetch values from the RAM of the NCP for debugging purposes. Upon success, CMD_PEEK_RET is sent from the NCP to the host. Upon failure, PROP_LAST_STATUS is emitted with the appropriate error indication.

    Due to the low-level nature of this command, certain error conditions may induce the NCP to reset.

    The NCP MAY prevent certain regions of memory from being accessed.

    -

    The implementation of this command has security implications. See Section 7 for more information.

    +

    The implementation of this command has security implications. See Section 12 for more information.

    This command requires the capability CAP_PEEK_POKE to be present.

    4.11. CMD 19: (NCP->Host) CMD_PEEK_RET

    @@ -1507,7 +1521,7 @@

    This command writes the bytes to the specified memory address for debugging purposes.

    Due to the low-level nature of this command, certain error conditions may induce the NCP to reset.

    -

    The implementation of this command has security implications. See Section 7 for more information.

    +

    The implementation of this command has security implications. See Section 12 for more information.

    This command requires the capability CAP_PEEK_POKE to be present.

    5. Properties

    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.

    @@ -1806,11 +1820,12 @@ STACK-NAME/STACK-VERSION[BUILD_INFO][; OTHER_INFO]; BUILD_DATE_AND_TIME

    -

    7. Security Considerations

    -

    7.1. Raw Application Access

    -

    Spinel MAY be used as an API boundary for allowing processes to configure the NCP. However, such a system MUST NOT give unprivileged processess the ability to send or receive arbitrary command frames to the NCP. Only the specific commands and properties that are required should be allowed to be passed, and then only after being checked for proper format.

    -

    8. Acknowledgments

    -

    Special thanks to Abtin Keshavarzian, Martin Turon, Arjuna Sivasithambaresan and Jonathan Hui for their substantial contributions and feedback related to this document.

    -

    - [CREF3]RQ: If I have missed anyone who has contributed to this document, please let me know ASAP. -

    -

    This document was prepared using mmark by (Miek Gieben) and xml2rfc (version 2).

    +

    7. Technology: Thread

    +

    This section describes all of the properties and semantics required for managing a Thread NCP.

    +

    Thread NCPs have the following requirements:

    +

    + +

    + +

    +

    All serious implementations of an NCP SHOULD also support the network save feature (See Section 8).

    +

    7.1. Thread Capabilities

    +

    The Thread technology defines the following capabilities:

    +

    + +

    + +

    +

    7.2. Thread Properties

    +

    Properties for Thread are allocated out of the Tech property section (see Section 5.1).

    +

    7.2.1. PROP 80: PROP_THREAD_LEADER_ADDR

    +

    + +

    + +

    +

    The IPv6 address of the leader. (Note: May change to long and short address of leader)

    +

    7.2.2. PROP 81: PROP_THREAD_PARENT

    +

    + +

    + +

    +

    The long address and short address of the parent of this node.

    +

    7.2.3. PROP 82: PROP_THREAD_CHILD_TABLE

    +

    + +

    + +

    +

    Table containing the long and short addresses of all the children of this node.

    +

    7.2.4. PROP 83: PROP_THREAD_LEADER_RID

    +

    + +

    + +

    +

    The router-id of the current leader.

    +

    7.2.5. PROP 84: PROP_THREAD_LEADER_WEIGHT

    +

    + +

    + +

    +

    The leader weight of the current leader.

    +

    7.2.6. PROP 85: PROP_THREAD_LOCAL_LEADER_WEIGHT

    +

    + +

    + +

    +

    The leader weight for this node.

    +

    7.2.7. PROP 86: PROP_THREAD_NETWORK_DATA

    +

    + +

    + +

    +

    7.2.8. PROP 87: PROP_THREAD_NETWORK_DATA_VERSION

    +

    + +

    + +

    +

    7.2.9. PROP 88: PROP_THREAD_STABLE_NETWORK_DATA

    +

    + +

    + +

    +

    7.2.10. PROP 89: PROP_THREAD_STABLE_NETWORK_DATA_VERSION

    +

    + +

    + +

    +

    7.2.11. PROP 90: PROP_THREAD_ON_MESH_NETS

    +

    + +

    + +

    +

    Data per item is:

    +

    + +

    + +

    +

    7.2.12. PROP 91: PROP_THREAD_LOCAL_ROUTES

    +

    + +

    + +

    +

    Data per item is:

    +

    + +

    + +

    +

    7.2.13. PROP 92: PROP_THREAD_ASSISTING_PORTS

    +

    + +

    + +

    +

    7.2.14. PROP 93: PROP_THREAD_ALLOW_LOCAL_NET_DATA_CHANGE

    +

    + +

    + +

    +

    Set to true before changing local net data. Set to false when finished. This allows changes to be aggregated into single events.

    +

    7.2.15. PROP 94: PROP_THREAD_MODE

    +

    + +

    + +

    +

    This property contains the value of the mode TLV for this node. The meaning of the bits in this bitfield are defined by section 4.5.2 of the Thread specification.

    +

    7.2.16. PROP 5376: PROP_THREAD_CHILD_TIMEOUT

    +

    + +

    + +

    +

    Used when operating in the Child role.

    +

    7.2.17. PROP 5377: PROP_THREAD_RLOC16

    +

    + +

    + +

    +

    7.2.18. PROP 5378: PROP_THREAD_ROUTER_UPGRADE_THRESHOLD

    +

    + +

    + +

    +

    7.2.19. PROP 5379: PROP_THREAD_CONTEXT_REUSE_DELAY

    +

    + +

    + +

    +

    7.2.20. PROP 5380: PROP_THREAD_NETWORK_ID_TIMEOUT

    +

    + +

    + +

    +

    Allows you to get or set the Thread NETWORK_ID_TIMEOUT constant, as defined by the Thread specification.

    +

    7.2.21. PROP 5381: PROP_THREAD_ACTIVE_ROUTER_IDS

    +

    + +

    + +

    +

    Note that some implementations may not support CMD_GET_VALUE router ids, but may support CMD_REMOVE_VALUE when the node is a leader.

    +

    7.2.22. PROP 5382: PROP_THREAD_RLOC16_DEBUG_PASSTHRU

    +

    + +

    + +

    +

    Allow the HOST to directly observe all IPv6 packets received by the NCP, including ones sent to the RLOC16 address.

    +

    Default value is false.

    +

    7.2.23. PROP 5383: SPINEL_PROP_THREAD_ROUTER_ROLE_ENABLED

    +

    + +

    + +

    +

    Allow the HOST to indicate whether or not the router role is enabled. If current role is a router, setting this property to false starts a re-attach process as an end-device.

    +

    7.2.24. PROP 5384: PROP_THREAD_ROUTER_DOWNGRADE_THRESHOLD

    +

    + +

    + +

    +

    7.2.25. PROP 5385: PROP_THREAD_ROUTER_SELECTION_JITTER

    +

    + +

    + +

    +

    Specifies the self imposed random delay in seconds a REED waits before registering to become an Active Router.

    +

    7.2.26. PROP 5386: PROP_THREAD_PREFERRED_ROUTER_ID

    +

    + +

    + +

    +

    Specifies the preferred Router Id. Upon becoming a router/leader the node attempts to use this Router Id. If the preferred Router Id is not set or if it can not be used, a randomly generated router id is picked. This property can be set only when the device role is either detached or disabled.

    +

    7.2.27. PROP 5387: SPINEL_PROP_THREAD_NEIGHBOR_TABLE

    +

    + +

    + +

    +

    Data per item is:

    +

    + +

    + +

    +

    8. Feature: Network Save

    +

    The network save feature is an optional NCP capability that, when present, allows the host to save and recall network credentials and state to and from nonvolatile storage.

    +

    The presence of this feature can be detected by checking for the presence of the CAP_NET_SAVE capability in PROP_CAPS.

    +

    8.1. Commands

    +

    8.1.1. CMD 9: (Host->NCP) CMD_NET_SAVE

    + + + + + + + + + + + + + + + +
    Octets:11
    Fields:HEADERCMD_NET_SAVE
    +

    Save network state command. Saves any current network credentials and state necessary to reconnect to the current network to non-volatile memory.

    +

    This operation affects non-volatile memory only. The current network information stored in volatile memory is unaffected.

    +

    The response to this command is always a CMD_PROP_VALUE_IS for PROP_LAST_STATUS, indicating the result of the operation.

    +

    This command is only available if the CAP_NET_SAVE capability is set.

    +

    8.1.2. CMD 10: (Host->NCP) CMD_NET_CLEAR

    + + + + + + + + + + + + + + + +
    Octets:11
    Fields:HEADERCMD_NET_CLEAR
    +

    Clear saved network state command. Clears any previously saved network credentials and state previously stored by CMD_NET_SAVE from non-volatile memory.

    +

    This operation affects non-volatile memory only. The current network information stored in volatile memory is unaffected.

    +

    The response to this command is always a CMD_PROP_VALUE_IS for PROP_LAST_STATUS, indicating the result of the operation.

    +

    This command is only available if the CAP_NET_SAVE capability is set.

    +

    8.1.3. CMD 11: (Host->NCP) CMD_NET_RECALL

    + + + + + + + + + + + + + + + +
    Octets:11
    Fields:HEADERCMD_NET_RECALL
    +

    Recall saved network state command. Recalls any previously saved network credentials and state previously stored by CMD_NET_SAVE from non-volatile memory.

    +

    This command will typically generated several unsolicited property updates as the network state is loaded. At the conclusion of loading, the authoritative response to this command is always a CMD_PROP_VALUE_IS for PROP_LAST_STATUS, indicating the result of the operation.

    +

    This command is only available if the CAP_NET_SAVE capability is set.

    +

    9. Feature: Host Buffer Offload

    +

    The memory on an NCP may be much more limited than the memory on the host processor. In such situations, it is sometimes useful for the NCP to offload buffers to the host processor temporarily so that it can perform other operations.

    +

    Host buffer offload is an optional NCP capability that, when present, allows the NCP to store data buffers on the host processor that can be recalled at a later time.

    +

    The presence of this feature can be detected by the host by checking for the presence of the CAP_HBO capability in PROP_CAPS.

    +

    9.1. Commands

    +

    9.1.1. CMD 12: (NCP->Host) CMD_HBO_OFFLOAD

    +

    + +

    + +

    +

    9.1.2. CMD 13: (NCP->Host) CMD_HBO_RECLAIM

    +

    + +

    + +

    +

    9.1.3. CMD 14: (NCP->Host) CMD_HBO_DROP

    +

    + +

    + +

    +

    9.1.4. CMD 15: (Host->NCP) CMD_HBO_OFFLOADED

    +

    + +

    + +

    +

    9.1.5. CMD 16: (Host->NCP) CMD_HBO_RECLAIMED

    +

    + +

    + +

    +

    9.1.6. CMD 17: (Host->NCP) CMD_HBO_DROPPED

    +

    + +

    + +

    +

    9.2. Properties

    +

    9.2.1. PROP 10: PROP_HBO_MEM_MAX

    +

    + +

    + +

    + + + + + + + + + + + + + +
    Octets:4
    Fields: + PROP_HBO_MEM_MAX +
    +

    Describes the number of bytes that may be offloaded from the NCP to the host. Default value is zero, so this property must be set by the host to a non-zero value before the NCP will begin offloading blocks.

    +

    This value is encoded as an unsigned 32-bit integer.

    +

    This property is only available if the CAP_HBO capability is present in PROP_CAPS.

    +

    9.2.2. PROP 11: PROP_HBO_BLOCK_MAX

    +

    + +

    + +

    + + + + + + + + + + + + + +
    Octets:2
    Fields: + PROP_HBO_BLOCK_MAX +
    +

    Describes the number of blocks that may be offloaded from the NCP to the host. Default value is 32. Setting this value to zero will cause host block offload to be effectively disabled.

    +

    This value is encoded as an unsigned 16-bit integer.

    +

    This property is only available if the CAP_HBO capability is present in PROP_CAPS.

    +

    10. Feature: Jam Detection

    +

    Jamming detection is a feature that allows the NCP to report when it detects high levels of interference that are characteristic of intentional signal jamming.

    +

    The presence of this feature can be detected by checking for the presence of the CAP_JAM_DETECT (value 6) capability in PROP_CAPS.

    +

    10.1. Properties

    +

    10.1.1. PROP 4608: PROP_JAM_DETECT_ENABLE

    +

    + +

    + +

    + + + + + + + + + + + + + +
    Octets:1
    Fields: + PROP_JAM_DETECT_ENABLE +
    +

    Indicates if jamming detection is enabled or disabled. Set to true to enable jamming detection.

    +

    This property is only available if the CAP_JAM_DETECT capability is present in PROP_CAPS.

    +

    10.1.2. PROP 4609: PROP_JAM_DETECTED

    +

    + +

    + +

    + + + + + + + + + + + + + +
    Octets:1
    Fields: + PROP_JAM_DETECTED +
    +

    Set to true if radio jamming is detected. Set to false otherwise.

    +

    When jamming detection is enabled, changes to the value of this property are emitted asynchronously via CMD_PROP_VALUE_IS.

    +

    This property is only available if the CAP_JAM_DETECT capability is present in PROP_CAPS.

    +

    10.1.3. PROP 4610: PROP_JAM_DETECT_RSSI_THRESHOLD

    +

    + +

    + +

    +

    This parameter describes the threshold RSSI level (measured in dBm) above which the jamming detection will consider the channel blocked.

    +

    10.1.4. PROP 4611: PROP_JAM_DETECT_WINDOW

    +

    + +

    + +

    +

    This parameter describes the window period for signal jamming detection.

    +

    10.1.5. PROP 4612: PROP_JAM_DETECT_BUSY

    +

    + +

    + +

    +

    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.

    +

    11. Feature: Basic GPIO Access

    +

    The length of the data associated with these properties depends on the number of GPIOs. If you have 10 GPIOs, you'd have two bytes. You determine the number of GPIOs available by examining PROP_GPIO_AVAILABLE, described below. This API isn't intended to support every possible GPIO state, it is intended for basic reading and writing.

    +

    11.1. Properties

    +

    11.1.1. PROP 4096: PROP_GPIO_AVAILABLE

    +

    + +

    + +

    +

    Contains a bit field identifying which GPIOs are supported. Cleared bits are not supported. Set bits are supported.

    +

    11.1.2. PROP 4097: PROP_GPIO_DIRECTION

    +

    + +

    + +

    +

    Contains a bit field identifying which GPIOs are configured as outputs. Cleared bits are inputs. Set bits are outputs.

    +

    11.1.3. PROP 4098: PROP_GPIO_STATE

    +

    + +

    + +

    +

    Contains a bit field identifying the state of the GPIOs. For GPIOs configured as inputs, this is the read logic level. For GPIOs configured as outputs, this is the logic level of the output.

    +

    11.1.4. PROP 4099: PROP_GPIO_STATE_SET

    +

    + +

    + +

    +

    Allows for the state of various output GPIOs to be set without affecting other GPIO states. Contains a bit field identifying the output GPIOs that should have their state set to 1.

    +

    11.1.5. PROP 4100: PROP_GPIO_STATE_CLEAR

    +

    + +

    + +

    +

    Allows for the state of various output GPIOs to be cleared without affecting other GPIO states. Contains a bit field identifying the output GPIOs that should have their state cleared to 0.

    +

    12. Security Considerations

    +

    12.1. Raw Application Access

    +

    Spinel MAY be used as an API boundary for allowing processes to configure the NCP. However, such a system MUST NOT give unprivileged processess the ability to send or receive arbitrary command frames to the NCP. Only the specific commands and properties that are required should be allowed to be passed, and then only after being checked for proper format.

    Appendix A. Framing Protocol

    Since this NCP protocol is defined independently of the physical transport or framing, any number of transports and framing protocols could be used successfully. However, in the interests of compatibility, this document provides some recommendations.

    A.1. UART Recommendations

    @@ -2848,616 +3507,15 @@ STACK-NAME/STACK-VERSION[BUILD_INFO][; OTHER_INFO]; BUILD_DATE_AND_TIME

    A.3. I²C Recommendations

    TBD

    - [CREF4]RQ: It may make sense to have a look at what Bluetooth HCI is doing for native I²C framing and go with that. + [CREF3]RQ: It may make sense to have a look at what Bluetooth HCI is doing for native I²C framing and go with that.

    A.4. Native USB Recommendations

    TBD

    - [CREF5]RQ: It may make sense to have a look at what Bluetooth HCI is doing for native USB framing and go with that. + [CREF4]RQ: It may make sense to have a look at what Bluetooth HCI is doing for native USB framing and go with that.

    -

    Appendix B. Feature: Network Save

    -

    The network save feature is an optional NCP capability that, when present, allows the host to save and recall network credentials and state to and from nonvolatile storage.

    -

    The presence of this feature can be detected by checking for the presence of the CAP_NET_SAVE capability in PROP_CAPS.

    -

    B.1. Commands

    -

    B.1.1. CMD 9: (Host->NCP) CMD_NET_SAVE

    - - - - - - - - - - - - - - - -
    Octets:11
    Fields:HEADERCMD_NET_SAVE
    -

    Save network state command. Saves any current network credentials and state necessary to reconnect to the current network to non-volatile memory.

    -

    This operation affects non-volatile memory only. The current network information stored in volatile memory is unaffected.

    -

    The response to this command is always a CMD_PROP_VALUE_IS for PROP_LAST_STATUS, indicating the result of the operation.

    -

    This command is only available if the CAP_NET_SAVE capability is set.

    -

    B.1.2. CMD 10: (Host->NCP) CMD_NET_CLEAR

    - - - - - - - - - - - - - - - -
    Octets:11
    Fields:HEADERCMD_NET_CLEAR
    -

    Clear saved network state command. Clears any previously saved network credentials and state previously stored by CMD_NET_SAVE from non-volatile memory.

    -

    This operation affects non-volatile memory only. The current network information stored in volatile memory is unaffected.

    -

    The response to this command is always a CMD_PROP_VALUE_IS for PROP_LAST_STATUS, indicating the result of the operation.

    -

    This command is only available if the CAP_NET_SAVE capability is set.

    -

    B.1.3. CMD 11: (Host->NCP) CMD_NET_RECALL

    - - - - - - - - - - - - - - - -
    Octets:11
    Fields:HEADERCMD_NET_RECALL
    -

    Recall saved network state command. Recalls any previously saved network credentials and state previously stored by CMD_NET_SAVE from non-volatile memory.

    -

    This command will typically generated several unsolicited property updates as the network state is loaded. At the conclusion of loading, the authoritative response to this command is always a CMD_PROP_VALUE_IS for PROP_LAST_STATUS, indicating the result of the operation.

    -

    This command is only available if the CAP_NET_SAVE capability is set.

    -

    Appendix C. Feature: Host Buffer Offload

    -

    The memory on an NCP may be much more limited than the memory on the host processor. In such situations, it is sometimes useful for the NCP to offload buffers to the host processor temporarily so that it can perform other operations.

    -

    Host buffer offload is an optional NCP capability that, when present, allows the NCP to store data buffers on the host processor that can be recalled at a later time.

    -

    The presence of this feature can be detected by the host by checking for the presence of the CAP_HBO capability in PROP_CAPS.

    -

    C.1. Commands

    -

    C.1.1. CMD 12: (NCP->Host) CMD_HBO_OFFLOAD

    -

    - -

    - -

    -

    C.1.2. CMD 13: (NCP->Host) CMD_HBO_RECLAIM

    -

    - -

    - -

    -

    C.1.3. CMD 14: (NCP->Host) CMD_HBO_DROP

    -

    - -

    - -

    -

    C.1.4. CMD 15: (Host->NCP) CMD_HBO_OFFLOADED

    -

    - -

    - -

    -

    C.1.5. CMD 16: (Host->NCP) CMD_HBO_RECLAIMED

    -

    - -

    - -

    -

    C.1.6. CMD 17: (Host->NCP) CMD_HBO_DROPPED

    -

    - -

    - -

    -

    C.2. Properties

    -

    C.2.1. PROP 10: PROP_HBO_MEM_MAX

    -

    - -

    - -

    - - - - - - - - - - - - - -
    Octets:4
    Fields: - PROP_HBO_MEM_MAX -
    -

    Describes the number of bytes that may be offloaded from the NCP to the host. Default value is zero, so this property must be set by the host to a non-zero value before the NCP will begin offloading blocks.

    -

    This value is encoded as an unsigned 32-bit integer.

    -

    This property is only available if the CAP_HBO capability is present in PROP_CAPS.

    -

    C.2.2. PROP 11: PROP_HBO_BLOCK_MAX

    -

    - -

    - -

    - - - - - - - - - - - - - -
    Octets:2
    Fields: - PROP_HBO_BLOCK_MAX -
    -

    Describes the number of blocks that may be offloaded from the NCP to the host. Default value is 32. Setting this value to zero will cause host block offload to be effectively disabled.

    -

    This value is encoded as an unsigned 16-bit integer.

    -

    This property is only available if the CAP_HBO capability is present in PROP_CAPS.

    -

    Appendix D. Feature: Jam Detection

    -

    Jamming detection is a feature that allows the NCP to report when it detects high levels of interference that are characteristic of intentional signal jamming.

    -

    The presence of this feature can be detected by checking for the presence of the CAP_JAM_DETECT (value 6) capability in PROP_CAPS.

    -

    D.1. Properties

    -

    D.1.1. PROP 4608: PROP_JAM_DETECT_ENABLE

    -

    - -

    - -

    - - - - - - - - - - - - - -
    Octets:1
    Fields: - PROP_JAM_DETECT_ENABLE -
    -

    Indicates if jamming detection is enabled or disabled. Set to true to enable jamming detection.

    -

    This property is only available if the CAP_JAM_DETECT capability is present in PROP_CAPS.

    -

    D.1.2. PROP 4609: PROP_JAM_DETECTED

    -

    - -

    - -

    - - - - - - - - - - - - - -
    Octets:1
    Fields: - PROP_JAM_DETECTED -
    -

    Set to true if radio jamming is detected. Set to false otherwise.

    -

    When jamming detection is enabled, changes to the value of this property are emitted asynchronously via CMD_PROP_VALUE_IS.

    -

    This property is only available if the CAP_JAM_DETECT capability is present in PROP_CAPS.

    -

    D.1.3. PROP 4610: PROP_JAM_DETECT_RSSI_THRESHOLD

    -

    - -

    - -

    -

    This parameter describes the threshold RSSI level (measured in dBm) above which the jamming detection will consider the channel blocked.

    -

    D.1.4. PROP 4611: PROP_JAM_DETECT_WINDOW

    -

    - -

    - -

    -

    This parameter describes the window period for signal jamming detection.

    -

    D.1.5. PROP 4612: PROP_JAM_DETECT_BUSY

    -

    - -

    - -

    -

    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.

    -

    Appendix E. Technology: Thread

    -

    This section describes all of the properties and semantics required for managing a Thread NCP.

    -

    Thread NCPs have the following requirements:

    -

    - -

    - -

    -

    All serious implementations of an NCP SHOULD also support the network save feature (See Appendix B).

    -

    E.1. Thread Capabilities

    -

    The Thread technology defines the following capabilities:

    -

    - -

    - -

    -

    E.2. Thread Properties

    -

    Properties for Thread are allocated out of the Tech property section (see Section 5.1).

    -

    E.2.1. PROP 80: PROP_THREAD_LEADER_ADDR

    -

    - -

    - -

    -

    The IPv6 address of the leader. (Note: May change to long and short address of leader)

    -

    E.2.2. PROP 81: PROP_THREAD_PARENT

    -

    - -

    - -

    -

    The long address and short address of the parent of this node.

    -

    E.2.3. PROP 82: PROP_THREAD_CHILD_TABLE

    -

    - -

    - -

    -

    Table containing the long and short addresses of all the children of this node.

    -

    E.2.4. PROP 83: PROP_THREAD_LEADER_RID

    -

    - -

    - -

    -

    The router-id of the current leader.

    -

    E.2.5. PROP 84: PROP_THREAD_LEADER_WEIGHT

    -

    - -

    - -

    -

    The leader weight of the current leader.

    -

    E.2.6. PROP 85: PROP_THREAD_LOCAL_LEADER_WEIGHT

    -

    - -

    - -

    -

    The leader weight for this node.

    -

    E.2.7. PROP 86: PROP_THREAD_NETWORK_DATA

    -

    - -

    - -

    -

    E.2.8. PROP 87: PROP_THREAD_NETWORK_DATA_VERSION

    -

    - -

    - -

    -

    E.2.9. PROP 88: PROP_THREAD_STABLE_NETWORK_DATA

    -

    - -

    - -

    -

    E.2.10. PROP 89: PROP_THREAD_STABLE_NETWORK_DATA_VERSION

    -

    - -

    - -

    -

    E.2.11. PROP 90: PROP_THREAD_ON_MESH_NETS

    -

    - -

    - -

    -

    Data per item is:

    -

    - -

    - -

    -

    E.2.12. PROP 91: PROP_THREAD_LOCAL_ROUTES

    -

    - -

    - -

    -

    Data per item is:

    -

    - -

    - -

    -

    E.2.13. PROP 92: PROP_THREAD_ASSISTING_PORTS

    -

    - -

    - -

    -

    E.2.14. PROP 93: PROP_THREAD_ALLOW_LOCAL_NET_DATA_CHANGE

    -

    - -

    - -

    -

    Set to true before changing local net data. Set to false when finished. This allows changes to be aggregated into single events.

    -

    E.2.15. PROP 94: PROP_THREAD_MODE

    -

    - -

    - -

    -

    This property contains the value of the mode TLV for this node. The meaning of the bits in this bitfield are defined by section 4.5.2 of the Thread specification.

    -

    E.2.16. PROP 5376: PROP_THREAD_CHILD_TIMEOUT

    -

    - -

    - -

    -

    Used when operating in the Child role.

    -

    E.2.17. PROP 5377: PROP_THREAD_RLOC16

    -

    - -

    - -

    -

    E.2.18. PROP 5378: PROP_THREAD_ROUTER_UPGRADE_THRESHOLD

    -

    - -

    - -

    -

    E.2.19. PROP 5379: PROP_THREAD_CONTEXT_REUSE_DELAY

    -

    - -

    - -

    -

    E.2.20. PROP 5380: PROP_THREAD_NETWORK_ID_TIMEOUT

    -

    - -

    - -

    -

    Allows you to get or set the Thread NETWORK_ID_TIMEOUT constant, as defined by the Thread specification.

    -

    E.2.21. PROP 5381: PROP_THREAD_ACTIVE_ROUTER_IDS

    -

    - -

    - -

    -

    Note that some implementations may not support CMD_GET_VALUE router ids, but may support CMD_REMOVE_VALUE when the node is a leader.

    -

    E.2.22. PROP 5382: PROP_THREAD_RLOC16_DEBUG_PASSTHRU

    -

    - -

    - -

    -

    Allow the HOST to directly observe all IPv6 packets received by the NCP, including ones sent to the RLOC16 address.

    -

    Default value is false.

    -

    E.2.23. PROP 5383: SPINEL_PROP_THREAD_ROUTER_ROLE_ENABLED

    -

    - -

    - -

    -

    Allow the HOST to indicate whether or not the router role is enabled. If current role is a router, setting this property to false starts a re-attach process as an end-device.

    -

    E.2.24. PROP 5384: PROP_THREAD_ROUTER_DOWNGRADE_THRESHOLD

    -

    - -

    - -

    -

    E.2.25. PROP 5385: PROP_THREAD_ROUTER_SELECTION_JITTER

    -

    - -

    - -

    -

    Specifies the self imposed random delay in seconds a REED waits before registering to become an Active Router.

    -

    E.2.26. PROP 5386: PROP_THREAD_PREFERRED_ROUTER_ID

    -

    - -

    - -

    -

    Specifies the preferred Router Id. Upon becoming a router/leader the node attempts to use this Router Id. If the preferred Router Id is not set or if it can not be used, a randomly generated router id is picked. This property can be set only when the device role is either detached or disabled.

    -

    E.2.27. PROP 5387: SPINEL_PROP_THREAD_NEIGHBOR_TABLE

    -

    - -

    - -

    -

    Data per item is:

    -

    - -

    - -

    -

    Appendix F. Test Vectors

    -

    F.1. Test Vector: Packed Unsigned Integer

    +

    Appendix B. Test Vectors

    +

    B.1. Test Vector: Packed Unsigned Integer

    @@ -3529,9 +3587,9 @@ STACK-NAME/STACK-VERSION[BUILD_INFO][; OTHER_INFO]; BUILD_DATE_AND_TIME

    - [CREF6]RQ: The PUI test-vector encodings need to be verified. + [CREF5]RQ: The PUI test-vector encodings need to be verified.

    -

    F.2. Test Vector: Reset Command

    +

    B.2. Test Vector: Reset Command

    -

    Frame:

    +

    Frame:

     80 01
     
    -

    F.3. Test Vector: Reset Notification

    +

    B.3. Test Vector: Reset Notification

    -

    Frame:

    +

    Frame:

     80 06 00 72
     
    -

    F.4. Test Vector: Scan Beacon

    +

    B.4. Test Vector: Scan Beacon

    -

    Frame:

    +

    Frame:

     80 07 33 0F C4 0D 00 B6 40 D4 8C E9 38 F9 52 FF FF D2 04 00
     13 00 03 20 73 70 69 6E 65 6C 00 08 00 DE AD 00 BE EF 00 CA
     FE
     
    -

    F.5. Test Vector: Inbound IPv6 Packet

    -

    CMD_VALUE_IS(PROP_STREAM_NET)

    +

    B.5. Test Vector: Inbound IPv6 Packet

    +

    CMD_VALUE_IS(PROP_STREAM_NET)

    +

    + [CREF6]RQ: FIXME: This test vector is incomplete. +

    +

    B.6. Test Vector: Outbound IPv6 Packet

    +

    CMD_VALUE_SET(PROP_STREAM_NET)

    [CREF7]RQ: FIXME: This test vector is incomplete.

    -

    F.6. Test Vector: Outbound IPv6 Packet

    -

    CMD_VALUE_SET(PROP_STREAM_NET)

    -

    - [CREF8]RQ: FIXME: This test vector is incomplete. -

    -

    F.7. Test Vector: Fetch list of on-mesh networks

    +

    B.7. Test Vector: Fetch list of on-mesh networks

    -

    Frame:

    +

    Frame:

     84 02 5A
     
    -

    F.8. Test Vector: Returned list of on-mesh networks

    +

    B.8. Test Vector: Returned list of on-mesh networks