Commit Graph

184 Commits

Author SHA1 Message Date
Jonathan Hui 64d49153bd Add callback to indicate when joiner operation completes. (#1094) 2016-12-27 08:06:18 -08:00
Marcin K Szczodrak 5dec993626 fix error logging; add otThreadErrorToString (#1085) 2016-12-16 12:56:20 -08:00
Jonathan Hui e3daefae05 Add API for sending an IEEE 802.15.4 MAC Data Request message. (#1069) 2016-12-13 22:01:42 -08:00
Łukasz Duda dbc1384db2 DIAG: Add CLI support for Diagnostic DIAG_GET.rsp message. (#1062)
* DIAG: Add CLI support for Diagnostic DIAG_GET.rsp message.
2016-12-13 10:22:57 -08:00
Nick Banks b38faa8fa0 Default Logging Support (#1054)
* Add support for NCP passing logs up in the SPINEL_PROP_STREAM_DEBUG command.
2016-12-12 09:18:04 -08:00
Robert Lubos d095cf884e Pass message info in CoAP response handler. (#1059) 2016-12-09 09:00:50 -08:00
Nick Banks 4ddb76d366 CC2538 Radio Logging (#1057)
* Add CC2538 Platform Logging

* Disable platform logs by default
2016-12-09 08:48:37 -08:00
Jonathan Hui cb44b1102f Explicitly specify the void type keyword for all void functions/methods. (#1042) 2016-12-05 21:38:31 -08:00
Nick Banks 55e17533b9 Fix otNetifAddress declaration to work between C & C++ (#1037)
* Fix otNetifAddress declaration to work between C & C++
2016-12-05 16:23:30 -08:00
rongli d2695ab5f4 fix diagnostic feature and code cleanup (#1030)
* fix diagnostic feature and code cleanup
2016-12-02 09:02:16 -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
Nick Banks 24b98dbb85 Windows Cert Testing (#943)
* PR for cert test interface for Windows driver model.
2016-11-29 12:10:34 -08:00
Abtin Keshavarzian 4c0cc27754 Fix typos in comments (#1014) 2016-11-28 10:58:54 -08:00
Jonathan Hui b1c19ed091 Apply realm-local scope to mesh-local addresses for source address selection. (#1000) 2016-11-22 08:43:22 -08:00
Adam Eliot e40947eb6f Add separate counters for unicast and broadcast (#994)
* Added tx counts for unicast vs broadcast packets

* Added counters for Rx broadcast vs unicast packets
2016-11-22 08:41:27 -08:00
Jonathan Hui f37e413c7b Add configure option for MAC whitelist and blacklist. (#997) 2016-11-21 19:03:51 +00:00
Xiao Ma 78047488b6 THCI: enhance commissioner session id. (#986) 2016-11-17 18:36:39 +08:00
Robert Lubos 208c4d35b9 CoAP Server API (#970)
* CoAP server API

* Openthread refactoring to support updated resource handler

* CoAP Client - RequestMetadata bugfix
2016-11-15 16:45:39 +08:00
Abtin Keshavarzian dd61e9cce6 Update JamDetector to invoke handler every second when jam is detected (#972) 2016-11-15 16:17:51 +08:00
Abtin Keshavarzian 2bc79217d2 Implementation of "signal jamming detection" feature (#966)
This commit contains the following changes:

- Introducing `JamDetector` class as the core of signal jamming
  detection.
- Adding new OpenThread APIs related to jamming detection.
- Adding support in `NcpBase` for jamming detection spinel
  properties.
2016-11-14 09:01:26 +08:00
pvanhorn 67dbbfc402 Fix scanning behavior. Change logic around otPlatRadioGetTransmitBuffer. (#942)
* Fix scanning behavior with default channel. Change logic around otPlatRadioGetTransmitBuffer so that the buffer becomes the property of OT post call. The MAC will keep a pointer to the tx buffer and pass it into otPlatRadioTransmit. This change should make the notion of retrying the transmit operation with the same buffer more intuitive.
2016-11-08 12:21:28 -08:00
Jonathan Hui d44f39769f Add ability to retrieve message and buffer counts for message queues. (#940) 2016-11-07 22:13:15 -08:00
Nick Banks 74a95f042d Windows API DLL (#882)
* VS Solution files and minor fixes.

* Move Tasklet into platform include file

* Refactor data path APIs into openthread-ip6.h
2016-11-04 09:28:17 -07:00
Abtin Keshavarzian 0509a139e2 Add support to ncp for parsing/handling a generic alternate (legacy) network stack. (#920)
This commit contains the following:

- APIs/typedefs in `ncp.h` to define handlers and callbacks
  for a generic alternate (legacy) network stack
- Support in `NcpBase` for parsing and handling of legacy network
  related commands/signals
- New legacy network related spinel properties
- Build feature "enable-legacy" to enable/disable this feature
2016-11-04 08:54:19 -07:00
Łukasz Duda bb97cbee17 IP: Add API to subscribe/unsubscribe to multicast addresses. (#899)
* IP: Add API to subscribe/unsubscribe to multicast addresses.

* CLI: Add commands to handle multicast addresses.
2016-11-02 11:24:35 -07:00
Shu Chen 4da1eb4124 Make all devices could receive and response to MGMT_ACTIVE_GET.req and MGMT_PENDING_GET.req (#917)
* Add Coap Resources ACTIVE_GET and PENDING_GET to all devices

* Add 'address' parameter to dataset mgmtgetcommand CLI

* Use the specified destination address when sending MGMT_ACTIVR_GET.req and
  MGMT_PENDING_GET.req, default to use Leader ALOC if the destination is not specified

* THCI update to take the destination address as a parameter in mgmtget API
2016-11-02 09:28:18 -07:00
rongli cec41045db Drop duplicated packet directly (#911) 2016-11-01 08:53:55 -07:00
rongli 3001fc689c DHCP: implement simple Server/Client (solicit/reply) (#884)
* DHCP implementation
- implementation Dhcp client/server (solicit/reply)
- two build options --enable-dhcp6-server  --enable-dhcp6-client (default disable)
- add Cert_5_3_09_AddressQuery for Dhcp Client/Server test in travis
2016-10-31 21:38:56 -07:00
pvanhorn 85fb7a451c Remove otPlatFlash API's and move settings from core to examples. (#889)
* Remove otPlatFlash API's and move settings from core to examples.
2016-10-28 18:42:19 -07:00
Nick Banks 7edada12e4 Add option for Radio layer to support retries and CSMA backoff logic. (#896)
* Add option for Radio layer to support tries and CSMA backoff logic.
2016-10-27 19:39:04 -07:00
Shu Chen f3ebcff818 Add 'factoryreset' cli (#892)
* add 'factoryreset' cli to delete all stored settings and then reset

* use 'factoryreset' in THCI reset API to ensure that there is no pre-settings in DUT before running any test
2016-10-27 11:08:39 -07:00
Nick Banks f600840499 Merge Windows Driver Code (#817)
This is the first of the Windows implementation code that will be merged. This is only the driver code.

Also note the updates to the appveyor configuration. It now builds, installs and queries the status of driver directly on the build machine. Then it builds an 'artifact' which is essentially the binaries packaged up.
2016-10-25 13:38:29 -07:00
Shu Chen 1365d80749 Unify settings block length with type 'uint16_t' (#877) 2016-10-25 08:43:51 -07:00
Shu Chen 46f920cf6a Dataset storage (#866)
* Store active dataset and pending dataset in non-volatile memory.

  * Retrieve active dataset and pending dataset from non-volatile memory after each reboot.

  * Leader will generate the active dataset if it is not initialized.

  * Clear pending dataset after it replaces active dataset.

  * Create different pseudo flash files for posix nodes.
2016-10-24 22:13:23 -07:00
pvanhorn 405b89f955 Allow message pool management by platform code. (#858)
* allow message pool management by platform code.
2016-10-24 14:45:19 -07:00
Abtin Keshavarzian d6fa21e368 Adding C APIs for crypto opereation HMAC and AES-CCM (#868) 2016-10-24 12:08:53 -07:00
Robert Lubos e39c23d1e4 Utilize CoAP client in OpenThread (#851) 2016-10-21 15:06:36 -07:00
Nick Banks 7a19067515 Some Logging Cleanup (#810)
* Remove unnecessary WPP definition.
* Various other small fixes.
2016-10-20 10:30:53 -07:00
pvanhorn 81738bd8af Remove Netif name and rely on enumerated Interface Id's for netif. (#833)
* Remove Netif name and rely on enumerated Interface Id's for netif.
2016-10-18 13:56:50 -07:00
Robert Lubos be73d98e0b CoAP: Implement CoAP client (#829)
* CoAP Client implementation

* CoAP update in MleRouter and AddressResolver

* Add CoAP client to Windows project files
2016-10-18 09:26:06 -07:00
rongli aaf5a57ea2 Cli: update 'keysequence' to make keyswithguardtime configurable (#815)
* Cli: update 'keysequence' to make keyswithguardtime configurable
2016-10-16 22:49:31 -07:00
Lu Wang 8468ffdb77 Settings Driver (#775)
* Settings Driver
2016-10-16 21:54:10 -07:00
Abtin Keshavarzian 5dbf96833e Update otNewUdpMessage() to allow user to enable/disable layer 2 security (#812) 2016-10-14 09:35:32 -07:00
Nick Banks 86deb6e868 Platform Support for Dynamic Memory Allocation (#767)
* Add support for platform implementation of dynamic memory allocation.
2016-10-14 09:02:38 -07:00
pvanhorn ddd0704b76 Allow for multiple callers to otSetStateChangeCallback. (#811)
* Allow for multiple callers to otSetStateChangeCallback.
2016-10-13 17:32:16 -07:00
Robert Quattlebaum 9c252dbac7 ncp: Fix handling of FCS for PROP_STREAM_RAW (#809)
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.
2016-10-13 17:28:15 -07:00
Abtin Keshavarzian 35ddd1a200 openthread.h: Update the method names in comments/documentation (#807) 2016-10-13 12:54:37 -07:00
Nick Banks 4ef45a45e6 Minor updates to openthread API signatures (#799) 2016-10-12 14:28:19 -07:00
Robert Quattlebaum 104ca6d10d Cleanup error code usage. Avoid raising errors when value is unchanged. (#787)
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.
2016-10-12 14:18:55 -07:00
Jonathan Hui f3ef4046db Steering data. (#743) 2016-10-10 09:40:08 -07:00