Commit Graph

76 Commits

Author SHA1 Message Date
pvanhorn 7862f1107e Add support for the Host Power State feature. (#1772)
* Add support for the Host Power State feature.

* Fix compiler ewrrors.

* Fix compiler errors round 2.

* Add newlines to end of file.

* Address review comments.

* Arrange to send the power state response again if the first attempt fails.

* Fix compiler issue.
2017-05-19 11:33:38 -07:00
Jonathan Hui da7ba8ba19 Require Thread Master Key to be 16 bytes. (#1724)
- Update code to use `otMasterKey` type.
2017-05-05 09:21:43 -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
Vaas Krishnamurthy 8d5a701adb Set steering data and enable MLE discovery response filtering. (#1685)
Enable OPENTHREAD_CONFIG_ENABLE_STEERING_DATA_SET_OOB to be able to set
steering data out of band on FFDs.

On joining device, enable filtering MLE discovery responses based on Factory assigned EUI64.
2017-05-03 13:24:02 -07:00
Jonathan Hui 1eabda6a08 Change top-level namespace from 'Thread' to 'ot'. (#1664) 2017-04-27 22:29:05 -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
DuaneEllis-TI d65418c12f Add support for wrap_string.h and others (#1642) 2017-04-27 10:17:09 -07:00
Abtin Keshavarzian f392421d2c Update otThreadDiscover() to include input argument for setting Joiner flag. (#1658) 2017-04-26 11:10:51 -07:00
Shu Chen 0a830ecefe Reduce MTD code size by removing some unused MeshCoP features (#1361)
* Seperate FTD-only dataset APIs;

* Remove some unused MeshCoP functions from MTD build;

* Remove some unused CLI functions from MTD build.
2017-04-25 11:51:12 -07:00
Jonathan Hui 115b52e6c4 Require platform TRNG to provide requested output length or error. (#1650) 2017-04-25 09:22:53 -07:00
Jonathan Hui 04d3032bab Do not revert to non-volatile settings when changed by application. (#1586)
- Invalidate Active and Pending Datasets when configs are changed via APIs.
- Do not allow client to change network configurations while Thread is enabled.
2017-04-13 08:41:35 -07:00
rongli 2ba9933882 not configure discovery scan duration (#1502) 2017-04-06 09:56:31 -07:00
Nick Banks 8951a336fe Logging and Raw Link Layer Cleanup (#1541)
* Logging and Raw Link Layer Cleanup

* make pretty
2017-03-31 08:52:54 -07:00
Nick Banks dfa2154958 otLwf Spinel and Logging Fixes (#1532)
* Fixes some Spinel usage in otLwf and some logging in the core library.

* Undo cc2538 config logging change

* Fix build error for nrf52840 with all logging enabled.

* Update minor version check based off feedback
2017-03-29 21:13:59 -07:00
pvanhorn 02400eecb2 Create and use an enum for Route Config mPreference. (#1525) 2017-03-29 08:49:48 -07:00
Giedrius 77fed906ac Fix otSendMacDataRequest API (#1521)
* Fix otSendMacDataRequest API

* Add otSendMacDataRequest declaration to API headers
* Move otSendMacDataRequest from thread to link API

* Update otSendMacDataRequest to otLinkSendDataRequest
2017-03-29 05:52:32 -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
Vitalii Kozhukhivskyi 83918bc76f Add timeout parameter to NodeAPI's ping function (#1440)
* Added timeout variable to API's ping function (WIN only).
2017-03-09 14:33:27 -08:00
Nick Banks 1c18f45bfe Update OpenThread Logging to include otInstance Pointer (#1436)
* Update OpenThread Logging to include otInstance Pointer.
2017-03-08 12:40:49 -08:00
Robert Lubos 746a40a340 Automatic Joiners removal in Commissioner (#1421)
* Implement automatic Joiner removal feature.

* Save some RAM in JoinerRouter class.

* Specify timeout for each Joiner separately.

* Update Windows API files.
2017-03-08 05:19:12 -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
Nick Banks 2549d03f1f Add Dynamic Memory Support to otLwf.sys (#1414)
* Add Dynamic Memory Support

* Use single list for free buffers. Null mNext on return of new buffer.

* Use Paged memory for Buffers.
2017-03-06 13:39:56 -08:00
pvanhorn 04caca7cc8 Implement the use of otPlatRadioDefaultTxPower API. (#1417)
* Implement the use of otPlatRadioDefaultTxPower API.

* Add implementation of otPlatRadioSetDefaultTxPower for windows.
2017-03-03 11:09:33 -08:00
Jonathan Hui 31b389fb4e Change otMessage type to not hide pointer. (#1416) 2017-03-02 12:43:59 -08:00
Jonathan Hui b490f2ef3e Icmp6 cleanup. 2017-03-02 10:24:55 -08:00
Jonathan Hui e919576978 Move include/platform to include/openthread/platform. 2017-03-02 10:24:55 -08:00
Jonathan Hui d0c687505b Move openthread.h to openthread/openthread.h. 2017-03-02 10:24:55 -08:00
Jonathan Hui 075bff327c Move openthread-types.h to openthread/types.h. 2017-03-02 10:24:55 -08:00
Jonathan Hui da35770140 CLI API cleanup. 2017-03-02 10:24:55 -08:00
Jonathan Hui 7f680552eb Thread API cleanup. 2017-03-02 10:24:55 -08:00
Jonathan Hui 52497fa45c Instance API cleanup. 2017-03-02 10:24:55 -08:00
Jonathan Hui da9b2978ad Operational Dataset API cleanup. 2017-03-02 10:24:55 -08:00
Jonathan Hui 421878f468 Network Data API cleanup. 2017-03-02 10:24:55 -08:00
Jonathan Hui 0746a44a7c Link API cleanup. 2017-03-02 10:24:55 -08:00
Jonathan Hui 98da7f3166 IPv6 API cleanup. 2017-03-02 10:24:55 -08:00
Jonathan Hui 669c792118 DHCPv6 Client and Server API cleanup. 2017-03-02 10:24:55 -08:00
Jonathan Hui e972443845 Commissioner and Joiner API cleanup. 2017-03-02 10:24:55 -08:00
Jonathan Hui 1455b612f9 Message API cleanup. 2017-03-02 10:24:55 -08:00
Jonathan Hui 77bc491c56 Tasklet API cleanup. 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
Nick Banks e39d96a797 Build otCli for Windows (#1239)
* Initial changes

* Clean up for CLI design on Windows

* Use smart pointer instead of otFreeMemory directly.
2017-02-27 09:28:43 -08:00
Łukasz Duda 4f35cdb854 [ICMPv6] Allow application to register ICMPv6 handler. (#1380) 2017-02-24 12:13:59 -08:00
Nick Banks 575ef7b866 Windows: Fix bug with Querying Device Capablities (#1382)
* Fix bug with querying device capablities

* Another similar bug with querying factory address property
2017-02-23 21:57:29 -08:00
Nick Banks 8d01979dcf Windows: Reset new test Nodes (#1364)
* Reset new test Nodes

* Finalize before reinitializing

* Minor issues with reinitialization

* Fix settings wipe
2017-02-22 09:58:02 -08:00
Jorge Vergara 22af02d1b8 fix bug in filter driver (#1365)
* pass null vendor data to otJoinerStart if it is not provided to filter driver
2017-02-21 23:18:02 -08:00
Nick Banks 64f5ab43fc Add Thread Auto Start Support (#1268)
* Add Thread Auto Start Support

* Add compile-time option

* Return error in Windows API
2017-02-20 17:29:20 -08:00
Nick Banks 303406bc3b Windows: Reset the Device on Initialization. (#1326)
* Reset the device on initialization.

* Explicitly break out of do {} while loop.
2017-02-17 08:54:08 -08:00
Nick Banks 8ca35de7b8 Persist Settings in Regsitry on Windows (#1242)
* Implement OpenThread Setting Interface

* Update the otPlatSettingDelete comment to indicate it doesn't maintain order.
2017-02-16 13:52:44 -08:00
Nick Banks 3a15494ce4 Fixes a bug where the wrong variable was being checked for processing Windows address change notifications. Also adds some logging fixes. (#1313) 2017-02-13 10:13:31 -08:00
Nick Banks 4d28e765fe Fixes for otJoinerStart on Windows (#1294) 2017-02-09 13:11:02 -08:00