The way the FCS was handled previously was based on assumptions (Like
the `mLength` field of `RadioPacket` didn't include a CRC) that were incorrect.
This change fixes that issue and also simplifies how the protocol handles the
FCS bytes for `PROP_STREAM_RAW`.
This commit addresses #808.
This change is attempting to address two issues:
1. Returning `kThreadError_Busy`, when `kThreadError_Already`,
`kThreadError_InvalidState`, or even the lazy
`kThreadError_Failed` would be more-appropriate/less-misleading.
2. Setters returning an error when the value to be changed is already
set to the requested value.
Number one hurts debuggability. Number two makes the code more fragile.
The cases where both intersect can be maddening.
This change replaces cases inappropriately returning
`kThreadError_Busy` with a better, more specific error code. It also
makes some "setter" functions (Including `otInterfaceUp()` and
`otThreadStart()`) return success if the value is already set.
This commit updates the raw packet reporting mechanism to use
the [new Spinel metadata format][1] with `PROP_STREAM_RAW`.
To do this, a new boolean was needed for the `RadioPacket` structure
to allow us to differentiate packets that we received over the
air versus packets we have transmitted.
Since the format of the 802.15.4-PHY-specific metadata hasn't yet
been defined, that field (Along with the vendor data field) is left
unspecified.
[1]: https://cdn.rawgit.com/darconeous/openthread/5b887f3a4e7df5c0c806ca1ba80fb1d9619cf8f2/doc/draft-spinel-protocol.html#frame-metadata-format
This commit adds a new ot API to set preferred Router Id for the
node. Upon becoming a router/leader the node attempts to use the
preferred Router Id. If it is not set or if it can not be used,
a randomly generated Router Id is picked.
Adds support for routerselectionjitter, routerdowngradethreshold, and masterkey to fixe the slew of ncp-sim failures from recent thread-cert test updates. Also added missing otInstance parameter to the new APIs..
Added otInstance to new APIs.
* Delay a random jitter period prior to request a Router ID for REED.
* Update Cert_5_1_09_REEDAttachConnectivity.py to pass Travis check.
* Add CLI to set/get the ROUTER_SELECTION_JITTER and update Certification scripts.
- add 'posix-ncp' to allow failure list in .travis.yml.
* Add Joiner UDP Port feature
- Add 'joinerport' cli for configuration
- Include Joiner UDP Port TLV in discovery response message
- Joiner use it as destination port during commissioning process
* - Add support for MGMT_COMMISSIONER_GET and MGMT_COMMISSIONER_SET
- Add CLI for sending this two commands
* - Move MGMT_COMMISSIONER_GET and MGMT_COMMISSIONER_SET to MeshCoP::commissioner
* ncp: Add support for `PROP_STREAM_RAW`
This change allows the NCP to be a packet sniffer when used with host
software that supports this feature.
See the section of the Spinel protocol document titled ["Sniffing Raw
Packets"][1] for an example of how this property is intended to be
used.
[1]: https://cdn.rawgit.com/openthread/openthread/654f953fdaf34e457bee61eb674908141d0a5f8e/doc/draft-spinel-protocol.html#rfc.appendix.F.10
* Allow sniffer to see raw outbound packets on the Pcap interface.
* Remove some of the metadata from the raw frames until the format can be better thought out
* Add optional support for 802.15.4 FCS reporting.
This commits makes the following changes:
- It add the implementation of energy scan operation at mac layer.
- It modifies the `openthread.cpp` to pipe through and expose the
energy scan related APIs.
- It also fixes the get handler for the property `MAC_SCAN_STATE`
in `Ncp` class to return the proper state if an energy scan
operation is ongoing.