Commit Graph

145 Commits

Author SHA1 Message Date
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
rongli add8639049 Support AutoPend for CC2538 (#562) 2016-09-23 11:12:53 -07:00
Lu Wang 9b97c1c7d0 Add support for MGMT_COMMISSIONER_GET and MGMT_COMMISSIONER_SET (#634)
* - Add support for MGMT_COMMISSIONER_GET and MGMT_COMMISSIONER_SET
- Add CLI for sending this two commands

* - Move MGMT_COMMISSIONER_GET and MGMT_COMMISSIONER_SET to MeshCoP::commissioner
2016-09-23 09:38:21 -07:00
Robert Quattlebaum 2522d2e2d7 ncp: Add support for PROP_STREAM_RAW (#644)
* ncp: Add support for `PROP_STREAM_RAW`

This change allows the NCP to be a packet sniffer when used with host
software that supports this feature.

See the section of the Spinel protocol document titled ["Sniffing Raw
Packets"][1] for an example of how this property is intended to be
used.

[1]: https://cdn.rawgit.com/openthread/openthread/654f953fdaf34e457bee61eb674908141d0a5f8e/doc/draft-spinel-protocol.html#rfc.appendix.F.10

* Allow sniffer to see raw outbound packets on the Pcap interface.

* Remove some of the metadata from the raw frames until the format can be better thought out

* Add optional support for 802.15.4 FCS reporting.
2016-09-22 15:32:13 -07:00
Marcin K Szczodrak 713e2260d1 add missing include to platform headers (#666) 2016-09-22 12:09:55 -07:00
Jonathan Hui b26e022491 Implement Provisioning URL TLV. (#646) 2016-09-21 10:51:09 -07:00
Jonathan Hui 4b51be41b5 Implement Joiner Router Locator TLV. (#645) 2016-09-21 10:50:44 -07:00
Nick Banks 25cea9414b Windows Unit Test Support (#629)
Window Unit Test Support
2016-09-20 18:11:19 -07:00
Marcin K Szczodrak 4bd62977d4 add missing void in otInstanceInit declaration (#640) 2016-09-20 10:27:26 -07:00
Marcin K Szczodrak ce8da8db80 add missing include into cli-console.h (#633) 2016-09-19 17:22:21 -07:00
Lu Wang 15f7b2baaa Posix flash (#605)
* Posix flash
2016-09-19 15:51:07 -07:00
Marcin K Szczodrak 6eb60ac8fb add missing include in cli-uart (#632) 2016-09-19 15:23:08 -07:00
Nick Banks 9a2beff1e9 Windows Core Build Support (#582)
* Support #define to overwrite what openthread-config file to use, since Windows does support autoconf.
2016-09-19 12:00:30 -07:00
Jonathan Hui 03fea69c1b Energy scan. (#606) 2016-09-16 16:04:01 -07:00
Shu Chen 0d54e51ebe Add Hash MAC address get cli (#611)
- move Hash Mac address calculation from joiner.cpp to mac.cpp

- add hashmacaddr cli
2016-09-16 05:43:44 -07:00
Abtin Keshavarzian 3139e635b8 Add support for EnergyScan operation at mac layer. (#580)
This commits makes the following changes:

- It add the implementation of energy scan operation at mac layer.

- It modifies the `openthread.cpp` to pipe through and expose the
  energy scan related APIs.

- It also fixes the get handler for the property `MAC_SCAN_STATE`
  in `Ncp` class to return the proper state if an energy scan
  operation is ongoing.
2016-09-14 13:40:44 -07:00
Jonathan Hui 9393f468bd Add otGetFactoryAssignedIeeeEui64() to API. (#592)
- Change cli.cpp to use OpenThread API rather than platform API.
2016-09-14 12:01:09 -07:00
Xiao Ma a642297520 Implement ROUTER_DOWNGRADE_THRESHOLD. (#588) 2016-09-14 09:25:56 -07:00
Jonathan Hui ef2a1a0c9d When commissioning, set ext addr based on factory-assigned IEEE EUI-64. (#584)
- Add CLI for printing the factory-assigned IEEE EUI-64.
- Add otPlatRadioGetIeeeEui64() API.
2016-09-13 23:37:40 -07:00
Lu Wang fb823f4f72 Add Channel Mask TLV CLI support (#549)
- Add a new Dataset::Set method to support variable TLV data payload. This is mainly for Channel Mask TLV
- Add CLI to support Channel Mask TLV
2016-09-13 20:55:11 -07:00