Spinel: Define properties for discover scan operation (#1703)

This commit define new spinel properties related to Thread's
discover scan operation. It also updates the spinel draft
documentation.
This commit is contained in:
Abtin Keshavarzian
2017-05-08 14:45:10 -07:00
committed by Jonathan Hui
parent 589d02ae7a
commit c28e2ff070
5 changed files with 120 additions and 8 deletions
@@ -149,9 +149,12 @@ Currently defined values are:
* 49: `CAP_ROLE_SLEEPY`
* 52: `CAP_NET_THREAD_1_0`
* 512: `CAP_MAC_WHITELIST`
* 513: `CAP_MAC_RAW`
* 514: `CAP_OOB_STEERING_DATA`
* 1024: `CAP_THREAD_COMMISSIONER`
* 1025: `CAP_THREAD_BA_PROXY`
Additionally, future capability allocations SHALL be made from the
following allocation plan:
+23 -7
View File
@@ -10,15 +10,20 @@ Possible Values:
* 0: `SCAN_STATE_IDLE`
* 1: `SCAN_STATE_BEACON`
* 2: `SCAN_STATE_ENERGY`
* 3: `SCAN_STATE_DISCOVER`
Set to `SCAN_STATE_BEACON` to start an active scan.
Beacons will be emitted from `PROP_MAC_SCAN_BEACON`.
Set to `SCAN_STATE_ENERGY` to start an energy scan.
Channel energy will be reported by alternating emissions
of `PROP_PHY_CHAN` and `PROP_PHY_RSSI`.
Channel energy result will be reported by emissions
of `PROP_MAC_ENERGY_SCAN_RESULT` (per channel).
Values switches to `SCAN_STATE_IDLE` when scan is complete.
Set to `SCAN_STATE_DISOVER` to start a Thread MLE discovery
scan operation. Discovery scan result will be emitted from
`PROP_MAC_SCAN_BEACON`.
Value switches to `SCAN_STATE_IDLE` when scan is complete.
### PROP 49: PROP_MAC_SCAN_MASK {#prop-mac-scan-mask}
* Type: Read-Write
@@ -33,11 +38,11 @@ Values switches to `SCAN_STATE_IDLE` when scan is complete.
### PROP 51: PROP_MAC_SCAN_BEACON {#prop-mac-scan-beacon}
* Type: Read-Only-Stream
* Packed-Encoding: `Ccdd` (or `Cct(ESSc)t(iCUd)`)
* Packed-Encoding: `Ccdd` (or `Cct(ESSc)t(iCUdd)`)
Octets: | 1 | 1 | 2 | *n* | 2 | *n*
--------|----|------|---------|----------|---------|----------
Fields: | CH | RSSI | MAC_LEN | MAC_DATA | NET_LEN | NET_DATA
Octets: | 1 | 1 | 2 | *n* | 2 | *n*
--------|----|------|---------|----------|---------|----------
Fields: | CH | RSSI | MAC_LEN | MAC_DATA | NET_LEN | NET_DATA
Scan beacons have two embedded structures which contain
information about the MAC layer and the NET layer. Their
@@ -56,6 +61,7 @@ The format below is for an 802.15.4 MAC with Thread:
* `C`: Flags
* `U`: Network Name
* `d`: XPANID
* `d`: Steering data
Extra parameters may be added to each of the structures
in the future, so care should be taken to read the length
@@ -106,6 +112,16 @@ Id | Name | Description
See (#prop-stream-raw).
### PROP 57: MAC_ENERGY_SCAN_RESULT {#prop-mac-scan-result}
* Type: Read-Only-Stream
* Packed-Encoding: `Cc`
This property is emitted during energy scan operation
per scanned channel with following format:
* `C`: Channel
* `c`: RSSI (in dBm)
### PROP 4864: PROP_MAC_WHITELIST {#prop-mac-whitelist}
* Type: Read-Write
* Packed-Encoding: `A(T(Ec))`
@@ -287,5 +287,40 @@ CoAP requests/responses from the NCP's RLOC address. This allows the
host driver to implement a Thread border agent.
### PROP 5395: PROP_THREAD_DISOVERY_SCAN_JOINER_FLAG {#prop-thread-discovery-scan-joiner-flag}
* Type: Read-Write
* Packed-Encoding:: `b`
This property specifies the value used in Thread MLE Discovery Request
TLV during discovery scan operation. Default value is `false`.
### PROP 5396: PROP_THREAD_DISCOVERY_SCAN_ENABLE_FILTERING {#prop-thread-discovery-scan-enable-filtering}
* Type: Read-Write
* Packed-Encoding:: `b`
This property is used to enable/disable EUI64 filtering during discovery
scan operation. Default value is `false`.
### PROP 5397: SPINEL_PROP_THREAD_DISCOVERY_SCAN_PANID (#prop-thread-discovery-scan-panid)
* Type: Read-write
* Packed-Encoding:: `S`
This property specifies the PANID used for filtering during discovery
scan operation. Default value is `0xffff` (broadcast PANID) which disables
PANID filtering.
### PROP 5398: SPINEL_PROP_THREAD_STEERING_DATA {#prop-thread-steering-data}
* Type: Write-Only
* Packed-Encoding: `E`
* Required capability: `SPINEL_CAP_OOB_STEERING_DATA`
This property can be used to set the steering data for MLE Discovery
Response messages.
* All zeros to clear the steering data (indicating no steering data).
* All 0xFFs to set the steering data (bloom filter) to accept/allow all.
* A specific EUI64 which is then added to steering data/bloom filter.