176 Commits

Author SHA1 Message Date
Abtin Keshavarzian 4e060e4dd3 [ncp] add Thread Dataset related spinel properties and their get/set handlers in NCP (#2327)
This commit adds new spinel properties related to Thread Operational
Dataset and implements the corresponding get/set handlers for the
new properties in `NcpBase`.
2017-11-16 13:43:13 +00:00
Jonathan Hui 74b3160f9d [meshcop] use IEEE EUI-64 rather than Joiner ID on user input (#2311) 2017-11-07 09:41:46 -08:00
Abtin Keshavarzian 1e6658b3ad [spinel] add support for 64-bit long signed/unsigned integer (#2309)
This commit adds support for encoding/decoding `uint64_t`/`int64_t`
to spinel as primitive types. `X` and `x` are used as format ASCII
character associated with `uint64_t` and `int64_t` respectively.
This commit also updates the `SpinelEncoder` and `SpinelDecoder`
to add methods related to 64-bit long integer. The related unit test
are also updated.
2017-11-01 21:46:09 -07:00
Abtin Keshavarzian 07647ababc [ncp] add support for new Spinel property THREAD_ROUTER_TABLE (#2303)
This commit adds a new property `SPINEL_PROP_THREAD_ROUTER_TABLE` and
its corresponding get handler to `NcpBase`. The spinel documentation
is also updated. Some of the documentations for the related APIs are
also updated.
2017-10-31 10:57:23 -07:00
Jeff Bumgardner 79f8a5a82b [docs] updated ARM logo, added Thread Group attribution (#2186) 2017-09-12 18:59:18 -07:00
Jonathan Hui f1cd0ce491 [doxygen] add builddir to include path (#2098) 2017-08-14 08:37:34 -07:00
Abtin Keshavarzian 1e61811e70 [network-data] iterate over all external routes or on-mesh prefix entries (#2073)
The same external route or on-mesh prefix can be registered by
different devices with different flags (e.g., different preference
level). This info is stored in network data as part of the
BorderRouterEntry TLV. This commit changes the methods
`GetNextOnMeshPrefix()` and `GetNextExternalRoute()`  to ensure that
different entries corresponding to the same prefix are provided
separately when iterating over all entries (i.e., without giving
a specific RLOC16).

To implement this the `otNetworkDataIterator` is changed to track
both the index into the `mTlvs` buffer and the entry index.

This commit also appends an RLOC16 field to the struct packing
format of `SPINEL_PROP_THREAD_ON_MESH_NETS and `OFF_MESH_ROUTES`
spinel properties and updates the implementation and documentation
accordingly.
2017-08-09 21:48:57 -07:00
Abtin Keshavarzian 5ba896266c [ncp] Support for multicast address table (#2001)
This commit adds a new spinel property (along with its prop handlers)
`SPINEL_PROP_IPV6_MULTICAST_ADDRESS_TABLE` to provide the list of
multicast IPv6 addresses.

It also adds `OT_CHANGED_IP6_MULTICAST_SUBSRCRIBED` and
`OT_CHANGED_IP6_MULTICAST_UNSUBSRCRIBED` to flags used in
`NetifCallback` to indicate changes in multicast address list.
2017-07-17 20:58:56 -07:00
Jonathan Beri 3c66ad874e Add Qorvo logo (#1980) 2017-07-11 12:32:00 -07:00
Abtin Keshavarzian 10b72cfa5d [ncp] Add new spinel property MAC_DATA_POLL_PERIOD and its get/set handlers (#1952)
The spinel-protocol draft is also updated.
2017-07-05 14:53:14 -07:00
james woodyatt d05b8157cc [spinel] recognize previous change to specification provided by Yakun Xu (#1911)
* Recognize previous change to specification provided by Yakun Xu.

* Regenerate compiled html and txt files.
2017-06-23 05:55:28 -07:00
Abtin Keshavarzian 566930f7a8 NcpBase: Update getter for OFF_MESH_ROUTES to include NextHopIsThisDevcie field (#1886)
The spinel header file and spinel documentation are also updated
accordingly.
2017-06-09 11:01:38 -07:00
Buke Po 32eb42a157 rename border agent proxy to tmp proxy (#1883) 2017-06-07 08:55:36 -07:00
Abtin Keshavarzian 2debb19046 NcpBase: Add support for Blacklist (#1871)
This commit defines new spinel properties related to blacklist. It
also adds implementation of get/set/insert/remove handlers for the
new properties. The spinel draft documentation is also updated.
2017-06-05 12:32:27 -07:00
Jeff Bumgardner fa552d6b9a Adding Synopsys logo to Readme (#1833)
* Adding Synopsys logo

* Adding Synopsis logo to Readme

* Added Synopsys platform bullet point
2017-05-26 08:35:09 -07:00
Robert Quattlebaum c88707aca8 spinel: Add support for filtering unsolicited property updates. (#1805) 2017-05-26 08:34:32 -07:00
Abtin Keshavarzian 047b1980df Ncp: Update the get handler for list of off-mesh routes (from network data) (#1812)
This commit renames the spinel property `THREAD_LOCAL_ROUTES` to
`THREAD_OFF_MESH_ROUTES` and updates the get handler for this property
to include `isLocal` flag which specifies if the route is from local
network data or partition's network data (this change makes the
`OFF_MESH_ROUTES` behavior similar to property `ON_MESH_NETS`). The
spinel draft documentation is also updated.
2017-05-25 14:42:19 -07:00
Jeff Bumgardner 24abf91f85 Adding NXP logo to README (#1801)
* Added NXP contributor logo

* Added NXP logo to README
2017-05-22 13:21:37 -07:00
Robert Quattlebaum 64544d0cee Spinel Changes (#1777)
* spinel: Updates in preparation for IETF submission.

* spinel: Use revision number instead of hash

* spinel: James is the editor
2017-05-22 12:07:01 -07:00
Robert Quattlebaum 08e52e55a5 spinel: Introduce PROP_HOST_POWER_STATE (#1722)
Introduces a new core property (`PROP_HOST_POWER_STATE`) which is used
by the host to inform the NCP of the power state of the *host*.
The NCP can then use this state to determine which properties need
asynchronous updates. The states are defined in similar terms to
those used for the `PROP_POWER_STATE` property.
2017-05-12 10:02:53 -07:00
Abtin Keshavarzian c28e2ff070 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.
2017-05-08 14:45:10 -07:00
Shu Chen 66f6e7088d Add otPlatRadioGetReceiveSensitivity() API (#1715)
* Add otPlatRadioGetReceiveSensitivity() API

* Add a new otPlatRadioGetReceiveSensitivity() API to get sensitivity value;

* Use the receive sensitivity value as the noise floor for link metric computation;

* Remove some unused noise floor related functions.

* Add SPINEL_PROP_PHY_RX_SENSITIVITY Spinel/NCP property
2017-05-04 20:38:37 -07:00
james woodyatt c6e597556e [Spinel protocol spec] Update the Copyright Notice. (#1690)
* [Spinel protocol spec] Update the Copyright Notice.

To prepare for submission of draft-rquattle-spinel-unified to IETF as an Internet
Draft, the Status of This Memo and Copyright Notice sections are updated to be in
full conformance with BCP 78, BCP 79 and the IETF Trust's Legal Provisions.

* Update the doc/Makefile.am with new filenames.
2017-05-02 12:19:46 -07:00
Robert Quattlebaum 8bf14cfbbd Spinel: Thread Border Agent Support (#1545)
This commit updates the Spinel protocol to support a host-based
border-agent.
2017-04-27 19:52:04 -07:00
Buke Po 024c44de5c Add PSKc API (#1635)
* add pskc api

* add pskc cli

* add NCP api of PSKc

* apply PSKc from network

* implement PSKC api for windows

* add name for pskc property

* clear active and pending dataset when settings pskc
2017-04-27 16:32:34 -07:00
Buke Po 7705bf4c22 Border agent proxy (#1590)
* initial commit for border agent proxy
2017-04-27 10:13:00 -07:00
james woodyatt 988648f3cb Initial preparation to post I-D.rquattle-spinel-unified to Internet D… (#1596)
* Initial preparation to post I-D.rquattle-spinel-unified to Internet Draft queue.

- Rename draft-spinel-protocol to draft-rquattle-spinel-unified.
- Starting point for I-D.rquattle-spinel-basis, i.e. the non-Thread basis of Spinel.
- Change IID to NLI (issue #1488)
- Move the glossary to {spinel-basis-glossary.md} so it can be included from both drafts.
- Correct a character encoding problem in {spinel-data-packing.md}.

* Add a comment to note the IPR category.
2017-04-26 15:21:10 -07:00
Jeff Bumgardner 248ba6e17d Revised README / Landing page (#1585)
* Updating README draft

* Complete rewrite
* Split logos into individual images
* Added new images for codelab and ncp
2017-04-13 11:30:59 -07:00
pszkotak 2fa7a13c1b Add initial commissioning commands support to the NCP (#1393)
* Add initial commissioning commands support to the NCP

* Make GetPropertyHandler_THREAD_COMMISSIONER_ENABLED send true only if commissioner active, move commissioner state enum to oepnthread/types.h

* Use enum to return commissioner state, make spinel property return true only if Commissioner State Active

* Fix spinel documentation
2017-03-29 11:37:21 -07:00
jjlee9 ffe260f457 Windows App README images (background logo) updates (#1529)
* background logo updates

* connected interface list

* matched image with description of README

* same size for all images
2017-03-29 09:47:21 -07:00
Abtin Keshavarzian 0ad2cc0b5b Enable dynamic log level selection (#1492)
This commit adds support for the dynamic log level selection. Config
option `OPENTHREAD_CONFIG_ENABLE_DYNAMIC_LOG_LEVEL` can be used to
enable/disable this feature (default setting is disabled).

Note that the `OPENTHREAD_CONFIG_LOG_LEVEL` specifies the log level at
compile/build time. The dynamic log level feature (if enabled) only
allows decreasing log level from the compile time setting.

This commit also adds `SPINEL_PROP_DEBUG_NCP_LOG_LEVEL` as a new
spinel property to control the log level. The set/get handlers for
this property along with its documentation are also added.

This commit modifies some of the log related macros/methods so
to harmonize them all to require an `otInstance` as their first
argument.
2017-03-21 16:24:58 -07:00
Martin Turon db0e2057ef spinel-cli: Fixes for spinel documentation bugs. (#1478)
* spinel-cli: Fixes for spinel documentation bugs.

* spinel doc: fix PROP_STREAM_DEBUG = 'D'
2017-03-21 13:04:05 -07:00
jjlee9 36ff8022dc Win/app updates2 (#1473)
* add talk functionality to OpenThread.vcxproj

* update README.md

* fixed according to Section 4 of RFC 5952 (CR by aeliot)

* fix removing an empty context bug (can't remove twice)
2017-03-21 08:44:35 -07:00
Jonathan Beri ab4c4e1eac add certified logo as svg and host on rawgit (#1481)
* add certified logo as svg and host on rawgit

* expanding description
2017-03-20 21:49:47 -07:00
Robert Quattlebaum acc8cedcb0 spinel: Documentation rebuild (#1491) 2017-03-20 17:36:12 -07:00
Robert Quattlebaum b98e3c70eb spinel: Clarify data packing notation and fix implementation. (#1433)
The data packing format that I designed for Spinel was a bit too
clever for its own good. While elegant from a certain perspective, the
behavior of the data blob (`D`), array (`A(...)`), and structure
(`T(...)`) types was way too confusing. I thought that I was (as the
guy who came up with it) immune from such confusion, but after taking
the time to go through all the code and address all of the mishaps in
the code it seems that the subtleties befuddled even its creator on a
time or two.

The specific issue that made me realize I needed to prioritize making
this fix was #1393.

As far as packing types go, this commit makes the following changes:

*   **New type `DATATYPE_DATA_WLEN` (`d`)**: Just like `DATATYPE_DATA`
    except that it ALWAYS prepends the length, irrespective of the
    type's location in the type string. Think of WLEN as being "With
    LENgth". Unless you are adding a property that has a type which is
    just a single data blob, you should use this type instead of
    `DATATYPE_DATA` (`D`). `DATATYPE_DATA` is still useful, so it will
    be sticking around.
*   **Changed type `DATATYPE_STRUCT` (was `T`, now `t`)**: The new
    struct type, ALWAYS prepends the length of the contents of the
    struct, just like `DATATYPE_DATA_WLEN`. The old `T` style struct
    still works and behaves the same way, but its use is now
    deprecated.
*   **Changed type `DATATYPE_ARRAY` (`A`)**: This type has changed in
    documentation only, as no one is currently using it in the way
    that it was originally specified. The change is that this type
    NEVER prepends the length of the entire array, and using it
    alongside other types is now unspecified (it should only be used
    alone).

I also added some convenient macros for building up datatype signature
strings that include structs.

One of the goals of these changes was to make this commit a change in
specification only, not to change what was currently on-the-wire.
However, after updating the spec and then going through and updating
all of the code to use the new nomenclature, I was horrified to find
that, due to the confusing nature of the previous datatype signature
string format, many properties that are arrays were not implemented
correctly --- making them impossible to update or add fields to
without breaking backward compatibility. To add insult to injury, some
of these instances were written by me!

This change updates all of the array properties to reflect how they
should have been implemented to begin with.
2017-03-10 11:48:31 -08:00
Nick Banks 974421da98 Windows App Updates (#1431)
* Initial new API helpers

* Finish up API helper

* Update App to use new API helpers

* More cleanup and added support for preferred router ID

* Clean up state change handlers

* Add logging

* Some more clean up and redesign

* Added small readme for Windows App.
2017-03-07 10:29:30 -08:00
Jonathan Hui 69f12c84f0 Add include path to doxygen config. 2017-03-02 10:24:55 -08:00
Nick Banks 95ff7b55dc Spinel: Radio Source Match Support (#1371)
* Add Spinel Source Match Properties

* Wrap Source Match NCP code with OPENTHREAD_ENABLE_RAW_LINK_API

* Update spinel docs

* Handle SendPropertyUpdate errors
2017-02-28 21:52:41 -08:00
Abtin Keshavarzian 1ece92155d draft-spinel-protocol : Update the html and txt files. (#1396) 2017-02-28 01:34:19 -08:00
Abtin Keshavarzian 860a395975 NCP/Spinel Add new spinel property to test assert (#1389)
This commit adds `SPINEL_PROP_DEBUG_TEST_ASSERT` as a new read-only
spinel property and also adds its associated get handler.

Getting this property will cause an assert on the NCP. This is
intended as a way for testing the the assert functionality of
underlying platform.

The spinel proocol documents (`md` files) are also updated
accordingly.
2017-02-27 17:38:15 -08:00
Robert Quattlebaum 32c72441d7 spinel-doc: Add documentation for commands to get and set multiple properties at once. (#1331)
* spinel-doc: Add documentation for commands to get and set multiple properties at once.

After some internal discussion, it was decided that having the ability
to get or set multiple properties from a single command would be
valuable. This change describes a mechanism for how I think that
should work.
2017-02-23 11:43:56 -08:00
Abtin Keshavarzian 44c54b3a3e NcpBase: Add get handler for NET_SAVED spinel property (#1297) 2017-02-09 19:43:09 -08:00
Nick Banks f000137674 Update Windows Readme and Scripts (#1216)
* Update design image and general design description.

* Update install scripts

* Update Travis build script

* Remove build/install from readme as it is already in wiki
2017-02-01 10:19:06 -08:00
Abtin Keshavarzian b4051781ea Update spinel protocol documentation (#1194)
- Added missing thread properties (e.g., leader network data)
- Fixed some of the existing descriptions and/or property names.
- Generate new `.txt` and `.html` versions of `draft-spinel-protocol`
2017-01-23 16:03:52 -08:00
Abtin Keshavarzian 8173b134ac Add OpenThread API to erase network settings (#1123)
This commit makes the following changes:

- It adds a new OpenThread API named `otNetworkSettingsErase()` to
  allow caller to erase all the settings stored on non-volatile
  memory.

- It exposes the same functionality through `SPINEL_CMD_NET_CLEAR`
  spinel command. It also makes `SPINEL_CMD_NET_CLEAR` implementation
  non-optional (not tied to `CAP_NET_SAVE` capability).
2017-01-10 10:05:26 -08:00
Robert Quattlebaum fd9fcf53fe spinel: Added feature for true random number generation (#1098)
Sometimes the host processor doesn't have a good way to generate
high-quality random numbers suitable for cryptographic use. However,
the NCP often has such capability. This Spinel feature allows
the host processor to fetch high-quality random numbers from a
TRNG that may be present on the NCP.
2016-12-21 12:38:25 -08:00
Abtin Keshavarzian 917fd1d4cc Update the draft-spinel-protocol documents (#1035) 2016-12-02 12:54:18 -08:00
Abtin Keshavarzian 78462001e1 Jam-detection: Add new debug property to get the history bitmap (#1033)
This commit adds support to get history-bitmap value from
jam-detection module. It also adds a corresponding spinel property
and a get handler for the new property in `NcpBase`.

The history bitmap 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.
2016-12-01 21:27:34 -08:00
Robert Quattlebaum ef7ccfb588 spinel: Update GPIO interface to improve capabilities. (#1023)
Replaces `PROP_GPIO_AVAILABLE` and `PROP_GPIO_DIRECTION` with a new
`PROP_GPIO_CONFIG` property which has support for configuring a larger
set of GPIO features which may be present on the NCP.

These changes were inspired by feedback from Duane Ellis.
2016-11-30 18:35:34 -08:00