Commit Graph

113 Commits

Author SHA1 Message Date
Nick Banks a7a116970b Hacks to get windows time working with POSIX APIs, so we can get rid of appveyor build warning. (#963) 2016-11-10 08:41:22 +08:00
Nick Banks 851027d912 Add an initial Windows Universal App for OpenThread (#951)
* Add an initial Windows Universal App for OpenThread
2016-11-09 23:25:34 +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
Nick Banks 252bd7dd45 Add Windows ARM Build Support (#935)
* Clean up and move project files to universal platform. Adds arm to appveyor

* A couple of project file fixes

* Use props file for common configuration
2016-11-06 22:31:54 -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
Jonathan Hui 6d0cfceadb Remove Link Reject and link-local RLOC. (#913) 2016-11-02 21:16:26 -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 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
Fabrice Fontaine e3fe9885bf Add --enable-builtin-mbedtls flag (#900)
Currently mbedtls has been integrated into openthread. However, this
package could be already present in the system so add a flag to enable
or disable the builtin version of mbedtls. By default, the builtin
version is enabled to keep the current behaviour.

Signed-off-by: Fabrice Fontaine <fabrice.fontaine@orange.com>
2016-10-28 15:06:02 -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
Nick Banks 17836de1fe Add a README.md for Windows (#895)
* Initial readme changes

* Update image
2016-10-27 13:58:55 -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
Jonathan Hui dee72c99a3 Disable receiver when changing the channel config. (#873) 2016-10-25 08:42:11 -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
Jonathan Hui 35e7fbf733 Update otLog*() to not require line separators. (#854) 2016-10-20 19:55:12 -07:00
Lu Wang 8468ffdb77 Settings Driver (#775)
* Settings Driver
2016-10-16 21:54:10 -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 2f9f0d697c Update path in README. (#781) 2016-10-10 10:58:02 -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 c3fc8fb798 Build ot-cli.exe as usermode Windows executable (#649)
* Build ot-cli.exe as usermode Windows executable.
2016-10-03 10:51:05 -07:00
Jonathan Hui 7325d2edf4 Process all currently queued tasklets in one shot. (#735) 2016-09-30 15:21:03 -07:00
Robert Lubos 5eb602d443 Add current time to posix RNG seed. (#730) 2016-09-30 08:56:05 -07:00
Wojciech Bober 081a5acd07 Added FCS generation to posix radio (#709) 2016-09-30 08:55:23 -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
Jonathan Hui 69a7c3d2e2 Miscellaneous MAC cleanup. (#706)
- Call otPlatRadioReceive() on SetChannel().
- Only call NextOperation() in the idle state.
- Call otPlatRadioReceive() with the proper channel in HandleBeginTransmit().
- Remove unnecessary mBeginTransmit tasklet.
2016-09-28 09:06:43 -07:00
Shu Chen 9a425c1348 Enable logging feature for certification test (#695)
- Add '--enable-cert-log' build option for certification logging feature
  - Output some commissioning logs for certification test 8.x.x
2016-09-27 08:50:37 -07:00
Buke Po fc20a0fe3e add checks into cc2538 makefile to support enabling cli-logging, commissioner and joiner (#693) 2016-09-26 21:54:36 -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
Shu Chen 5fdc27f1f8 Allocate another 1K bytes to CC2538 stack (#654)
Reduce the size of message buffer to save 1k bytes SRAM space for stack.
2016-09-22 09:40:29 -07:00
Lu Wang 15f7b2baaa Posix flash (#605)
* Posix flash
2016-09-19 15:51:07 -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 043a664cca Use Openthread Hardware Entropy Collector (#484)
* create new file named as hardware_entropy.c for mbedtls to use OT hardware entropy source
2016-09-13 18:38:45 -07:00
Jonathan Hui 44350178ad Change copyright to The OpenThread Authors. (#583)
- Add a top-level file named AUTHORS which identifies the copyright
holders of the project.
2016-09-13 15:57:11 -07:00
Nick Banks 6d2dfa5bb0 Support #define to overwrite what openthread-config file to use, since Windows does support autoconf. (#578) 2016-09-13 09:27:11 -07:00
Nick Banks ffbe65c6dd otInstance Declarations (#473)
* Add otInstance type declaration and update ot APIs to take it as input.
2016-09-12 14:29:43 -07:00
Robert Quattlebaum 9b1de7bbb2 posix/uart: Fixes for failure to terminate (#568)
These changes address various issues found in the POSIX platform UART
driver which lead to the process not terminating properly when the
parent dies or closes `stdin`/`stdout`. Some of the errors could even
lead to unexpected program termination.

Among the various errors corrected are:

*   Using `assert()` to terminate under normal operating conditions.
*   `posixUartProcess()` only checked `s_in_fd` for readability and
    did not check `s_out_fd` for writability. It also caused data
    corruption if `write()` ever returned less than all of the bytes
    sent.
*   `ISIG` was being set on the termios flags. This can cause problems
    when the serial API is used for binary data (Like when used with
    the NCP app). (This requires the CLI be explicitly able to be able
    to handle CTRL-C when built for POSIX)
*   Socket errors weren't being tracked on `select()`.
*   The platform main loop would (possibly) terminate if `select()`
    failed with `EINTR`, which makes it difficult to attach to the
    process with a debugger.
2016-09-12 13:47:18 -07:00
Jonathan Hui 56f3239c44 Add commissioning code to codecov. (#555) 2016-09-12 11:31:13 -07:00
Lu Wang 70e9f76623 - Allocate 1k bytes to CC2538 stack (#502)
- Free 2k bytes RAM for other's use via reducing the default size of message buffer
2016-09-11 21:11:11 -07:00
Jonathan Hui 563685e187 travis: enable code coverage reporting. (#516) 2016-09-08 14:14:25 -07:00
Jonathan Hui bcc1261749 Clean up mac/radio interaction. (#538)
- Remove unnecessary calls to otPlatRadioReceive().
- Allow calls to otPlatRadioReceiveDone() whenever the radio is active.
2016-09-08 08:47:01 -07:00
Lu Wang c05c632d2f Implement CC2538 random driver (#483)
* Implement CC2538 random driver
2016-09-06 21:57:08 -07:00
Lu Wang 6e5a22080e Add .ARM.exidx section (#521) 2016-09-06 19:59:41 -07:00
Nick Banks 51baf4ab4d Add POLLIN to the poll flags for the posix example. (#505) 2016-09-01 11:59:13 -07:00
Lu Wang 3d04344cc9 Enhance otPlatRandomGet API to provide random stream (#471)
* Enhance otPlatRandomGet API to provide random stream
2016-08-25 23:41:40 -07:00
Abtin Keshavarzian afb28f0f97 NcpSpi: Ensure spi tx frame preparation and callbacks happen from the same tasklet. (#455)
This commit changes the `NcpSpi` class implementation such that SPI
tx frame preparation always happens from the same task `mPrepareTxFrameTask`
This ensures that the callbacks to base class `Ncp` are also invoked from the
the same task (and not from the the task calling `OutboundFrameEnd()`).
2016-08-25 22:16:22 -07:00