This commit fixes a bug in the commissioner when a joiner's expiration
time has alerady elapsed.
This commit also introduces convenience methods for computing time
elapsed and diffs.
- No longer queue 2x 32-byte buffers for UART receive. Upon
investigation, the RAIL library switches these buffers in software
(within the same ISR context as `receiveDone`), so it seems to be
pointless from a performance perspective in queuing multiple
buffers. Instead, now work with 64-byte buffers.
- Refactored `updateReceiveProgress` so that extra variable
`mLastCount` isn't required.
- Extensive testing at higher baud rates revealed race conditions and
some issues with detecting buffer full conditions.
- Added comments to clarify the logic
- Removed asserts after returning from RAIL library
functions. Contrary to my previous arguments, if the behaviour of
the RAIL library functions changes in the future (with regards to
the errors it returns), then somebody would have to remember to
check these asserts were still appropriate.
When a partial dataset is stored, the device will attempt to attach to a
Thread network using the limited parameters available. If the device
successfully attaches, the device will then obtain the complete Active
Dataset from its Parent. If the device is router-capable, it will not
become a Router/Leader until it has successfully retrieved a complete Active
Dataset.
Saving a partial dataset supports out-of-band commissioning scenarios.
This commit ensures that if the passed-in string args (vendor name,
model, sw version, data or provisioning URL) in `Joiner::Start()`
are too long, they are clipped to the max size defined by the
corresponding TLVs.
`BeaconPayload::GetNetworkName()` does not return a NULL-terminated string.
This commit fixes `BeaconPayload::ToInfoString()` to pass a NULL-terminated
string to the string formatter.
When generating a new Active Dataset, the current PSKc value is used. Because
the PSKc is initialized to all zeros, new Active Datasets have a default
PSKc value of all zeros.
This commit checks if the PSKc has been set (i.e. not all zeros) and, if not
set, generates a random PSKc when creating a new Active Dataset.
This commit updates `SPINEL_PROP_MESHCOP_JOINER_COMMISSIONING`
definition to allow vendor info (name, model, sw version, data) to be
specified. All new parameters are optional and if not specified in the
spinel frame (or an empty string is given), OpenThread default values
will be used instead.
This change in `SPINEL_PROP_MESHCOP_JOINER_COMMISSIONING` format keeps
it backward compatible with previous definition, ensuring any driver
using the previous format will be parsed in the same way.
This commit adds a new method `AppendTlv` to `Message` class which
appends a fully formed TLV to the message. This commit also changes
the core modules to use the new method when appending a TLV.
- Return OT_ERROR_PARSE when encountering mal-formatted headers.
- Return OT_ERROR_NO_ROUTE when there is no route to host.
- Document possible return values for `otIp6Send()`.
This commit updates the `Joiner` class implementation to remove the
requirement for `Start()` vendor related parameters (vendor name,
model, sw version, data) to be static (string). This is done without
requiring the `Joiner` class to use member variables to store/copy
the strings by preparing the "Joiner Finalize" message early on (note
that these parameters are included in this message) and keeping track
of the dynamically allocated `Coap::Message` pointer instead.
This commit contains the following improvements in
`spi-hdlc-adapter`:
- It changes the default syslog log level to `LOG_WARNING`.
- It enhances the `--verbose[=num]` option to allow negative values
to reduce the log level. Note that this change keeps the behavior
backward compatible (it is an add-on).
- It updates the `print_help()` and the `README.md` files to document
new behavior of `--verbose` option.
There's missing error definition for otPlatRadioDisable(). This commit adds
an error case OT_ERROR_INVALID_STATE to make sure this is only called
when the radio is in sleep mode.
Add new radio platform APIs:
* otPlatRadioGetSupportedChannelMask(); // supported channel mask: the device is allowed to be on;
* otPlatRadioGetPreferredChannelMask(); // preferred channel mask: the device prefers to form on.
Implement some default radio platform APIs.
Add spinel property `SPINEL_PROP_PHY_CHAN_PREFERRED` to retrieve Preferred ChannelMask.
This commit parses rx timestamp of radio frame received by RCP, no matter
data frames or ACK frames.
* add OT_NUM_ERRORS as number of defined errors.
* allow empty SPINEL_DATATYPE_DATA and SPINEL_DATATYPE_DATA_WLEN when
parsing spinel packets.
This commit updates the `test-001` to allow extra properties to
be verified when running under posix-app model. The new test
ensures "POSIXApp:RCPVersion" is gettable.