Commit Graph

263 Commits

Author SHA1 Message Date
Buke Po 98795b6c60 support udp socket connect (#1526) 2017-03-29 21:04:35 -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
pvanhorn 02400eecb2 Create and use an enum for Route Config mPreference. (#1525) 2017-03-29 08:49:48 -07:00
Giedrius e5d15f1911 CoAP option update (#1523)
* Do not drop CoAP requests with unknown options

If packets are dropped due to unrecognized options, then it should be done
according to RFC7252 Section 5.4.1., otherwise leave it for the user.

* Implement CoAP Header GetFirstOption

* Implement in Header
* Add to CoAP API
* Use in code

* Remove CoAP Header GetCurrentOption

* Correction in the comments

* Initialize CoAP Header before parsing
2017-03-29 05:54:43 -07:00
Adam Eliot 89521040c3 Most recent RSSI in child/neighbour tables (#1519)
* Added most recent RSSI to child and neighbour tables

* Align = signs in mle_router Get{Router/Child}Info

* Fixed build errors, was using the wrong config before so wasnt actualy building the code
2017-03-28 09:41:57 -07:00
Nick Banks a4ccc9a7ee Remove _CRT_SECURE_NO_WARNINGS Usage (#1517)
* Remove usage of deprecated/unsafe CRT functions.
2017-03-28 09:19:25 -07:00
Robert Quattlebaum 73564c399a Add implementations for strlcpy/strlcat when missing (#737)
This commit shows how to add implementations of missing functions for
platforms where those functions are not present. In this case we are
adding the `strlcpy()` and `strlcat()`, which are "safe" replacements
for `strncpy()` and `strncat()` that behave in a way more consistent
with developer expectations.

After this commit, adding additional replacements for missing
functions should be fairly straightforward.

[1]: http://stackoverflow.com/questions/3821916/how-to-merge-two-ar-static-libraries-into-one
[2]: https://www.gnu.org/software/automake/manual/html_node/Libtool-Convenience-Libraries.html
2017-03-27 10:06:36 -07:00
Hubert Miś 68de8f669a [CoAP Server] Message deduplication (#1500)
* Message deduplication in CoAP server.

* Limit number of responses in CoAP server deduplication queue.
2017-03-23 02:01:58 -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
Hubert Miś 163c54537f Add API function to check if MAC layer is during transmission operation. (#1447) 2017-03-20 09:38:07 -07:00
Łukasz Duda 3316daa43c Add initial implementation of DNS Client (#1460)
* [DNS] Initial DNS Client implementation.
2017-03-17 14:43:08 -07:00
Hubert Miś ebc23928f5 Platform deinitialization function. (#1451) 2017-03-10 09:02:32 -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
Abtin Keshavarzian 98f9eaf8da Enable data poll triggered indirect retransmissions to a sleepy child (#1432)
If transmission of an indirect frame (frame to a sleepy child)
fails, the sender retransmits the frame following the reception of
a new data request command (a new data poll) from the sleepy child.

It is ensured that the re-transmissions use the same security frame
counter, key id, and data sequence number as the earlier attempts.
To realize this, info about the indirect transmissions (such as attempt
counter, frame counter, key id) is saved in the child table.

In `openthread-core-default-config.h` a set of new OpenThread options
are added to allow the maximum number of attempts to be configured
for both direct and indirect transmissions.
2017-03-08 12:35:27 -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
Hubert Miś 6eaacdd4a4 Add platform API to check state of the radio. (#1413) 2017-03-08 05:17:06 -08:00
Hubert Miś 7ac9e93237 Store IID of ML-EID in NVM. (#1423) 2017-03-07 10:56: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
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
Abtin Keshavarzian de48acf9fb Update comments: Source Match feature and poll period selection (#1400)
This commit adds/updates comments. It contains no code/logic change.

- Adds comments to describe expected behavior and use of source
  address match feature and the related radio platform functions.

- Updates comments to describe the selection of poll period and the
  `SetAssignPollPeriod()`.
2017-03-02 21:47:08 -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 a6dac9270c Diag API 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 32f148fe8c NCP 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 e8ded46f4f Jam detection API cleanup. 2017-03-02 10:24:55 -08:00
Jonathan Hui 51c7253e4a Crypto 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
Jonathan Hui 10e5b9a38f UDP API cleanup. 2017-03-02 10:24:55 -08:00
Jonathan Hui 53cc398251 CoAP API cleanup. 2017-03-02 10:24:55 -08:00
Abtin Keshavarzian d38a329eb9 New radio capability to indicate CSMA backoff support by radio layer (#1395)
- This commit adds a new radio capability `kRadioCapsCsmaBackOff` to
  indicate that the radio supports CSMA backoff logic for frame
  transmission (but no frame retry).

- The existing capability `kRadioCapsTransmitRetries` is not changed
  and still indicates that the radio supports transmission retry logic
  along with collision avoidance (CSMA).

- `Mac` implementation is updated accordingly.
2017-02-27 14:28:20 -08:00
Hubert Miś df3c775e17 Implementation of platform usec-alarm API to support correct delays in CSMA/CA. (#1379) 2017-02-27 10:29:23 -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
Giedrius b8ae672251 Implement more CoAP Options (#1362)
* Implement more CoAP Options

* Observe
* Max-Age
* Uri-Query
2017-02-27 09:08:50 -08:00
Łukasz Duda 4f35cdb854 [ICMPv6] Allow application to register ICMPv6 handler. (#1380) 2017-02-24 12:13:59 -08:00
Adam Eliot ab1bfa99fa Parent Info (#1370)
* Expanded otGetParentInfo to populate the entire aParentInfo structure

* Added otGetParentAverageRssi function

* Use GetRouterId from rloc function instead of doing it manualy, and corrected documentation
2017-02-23 11:23:27 -08:00
Giedrius 88ab0d51a5 Fix CoAP not handling certain types of ACKs (#1352)
* Fix CoAP not handling certain types of ACKs

ACK's with piggyback data and 2.00-2.03 response codes were ignored.
2017-02-22 05:42:00 -08:00