Commit Graph

164 Commits

Author SHA1 Message Date
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
Lu Wang 59f4ec8ae8 CC2538 Flash Driver (#772)
* CC2538 flash driver
2016-10-08 22:26:46 -07:00
Jonathan Hui 3ebef251eb Radio API: set short address, extended address, and panid must not fail. (#774) 2016-10-08 18:49:23 -07:00
Nick Banks 2df41313a9 Add support for radio energy scan API (#749)
* Add support for radio energy scan API
2016-10-06 23:20:50 -07:00
Nick Banks 79d99e7a91 Refactor OpenThread Global Variables into a Single Context Structure (#357)
* Refactor OpenThread to contain all global/static variables in a single context structure.
2016-10-04 15:23:25 -07:00
Jonathan Hui 671964c2d4 MLE Announce. (#736) 2016-10-04 10:26:30 -07:00
Nick Banks fbc5245d79 Enable Windows WPP Logging Support (#678)
* Enable support for WPP logging.
2016-10-03 10:45:25 -07:00
Jonathan Hui cb04fe8391 Commissioner joiner list. (#729) 2016-10-03 08:54:54 -07:00
Abtin Keshavarzian 95d2e8cdec Implement MleRouter::GetNextNeighborInfo() method (#724) 2016-09-30 16:09:01 -07:00
Jonathan Hui 7325d2edf4 Process all currently queued tasklets in one shot. (#735) 2016-09-30 15:21:03 -07:00
Hubert Miś aeba71b1a1 Pr/slaac utility (#698)
* Provide utility for IPv6 SLAAC (#651)

* Semantically Opaque Interface Identifier with IPv6 SLAAC (#651)
2016-09-29 08:37:10 -07:00
Robert Quattlebaum d0763e7283 ncp-spinel: Update raw stream to support new metadata format (#717)
This commit updates the raw packet reporting mechanism to use
the [new Spinel metadata format][1] with `PROP_STREAM_RAW`.

To do this, a new boolean was needed for the `RadioPacket` structure
to allow us to differentiate packets that we received over the
air versus packets we have transmitted.

Since the format of the 802.15.4-PHY-specific metadata hasn't yet
been defined, that field (Along with the vendor data field) is left
unspecified.

[1]: https://cdn.rawgit.com/darconeous/openthread/5b887f3a4e7df5c0c806ca1ba80fb1d9619cf8f2/doc/draft-spinel-protocol.html#frame-metadata-format
2016-09-28 17:05:51 -07:00
Abtin Keshavarzian d1c83d3625 Add support for setting preferred Router Id (#716)
This commit adds a new ot API to set preferred Router Id for the
node. Upon becoming a router/leader the node attempts to use the
preferred Router Id. If it is not set or if it can not be used,
a randomly generated Router Id is picked.
2016-09-28 15:35:03 -07:00
Abtin Keshavarzian eb1e9f304f Add OpenThread APIs for retrieving neighbor info from neighor table (#703) 2016-09-28 10:29:08 -07:00
Martin Turon 625e4adde4 spinel-cli: Add router timing commands. (#705)
Adds support for routerselectionjitter, routerdowngradethreshold, and masterkey to fixe the slew of ncp-sim failures from recent thread-cert test updates.  Also added missing otInstance parameter to the new APIs..

Added otInstance to new APIs.
2016-09-27 18:19:47 -07:00
Nick Banks 2071716936 Fix Windows build warnings and breaks (#690) 2016-09-26 14:20:53 -07:00
Xiao Ma a74e0496b8 Delay a random jitter period prior to request a Router ID for REED. (#554)
* Delay a random jitter period prior to request a Router ID for REED.

* Update Cert_5_1_09_REEDAttachConnectivity.py to pass Travis check.

* Add CLI to set/get the ROUTER_SELECTION_JITTER and update Certification scripts.

  - add 'posix-ncp' to allow failure list in .travis.yml.
2016-09-26 10:03:09 -07:00
Buke Po d20d54a394 correct va_list usage (#686) 2016-09-26 10:00:50 -07:00
Shu Chen d71939d331 Add Joiner UDP Port feature (#676)
* Add Joiner UDP Port feature

  - Add 'joinerport' cli for configuration

  - Include Joiner UDP Port TLV in discovery response message

  - Joiner use it as destination port during commissioning process
2016-09-25 20:50:28 -07:00
Buke Po d283c29f23 Support network diagnostic feature. (#652)
* support network diagnostic

* add network diagnostic THCI implementation
2016-09-23 21:06:08 -07:00
Buke Po 3452933fc5 Enable CLI logging (#670)
* enable uart logging
2016-09-23 20:43:49 -07:00