Commit Graph

103 Commits

Author SHA1 Message Date
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
Marcin K Szczodrak e1771f6cc4 posix uart termios typo (#463) 2016-08-25 21:37:49 -07:00
Shu Chen b5f97386ba diags: Add output buffer size limitation to avoid overflow issue (#442)
- add aOutputMaxLen parameter in each diagnostics feature process function
- use snprintf() to limit the size of output string
2016-08-22 12:38:29 -07:00
Jonathan Hui 9b6afb31c0 Require compiler warnings. (#418) 2016-08-18 12:22:12 -07:00
Marcin K Szczodrak a0c6f50051 Feature/ot plat rssi (#411)
* rename otPlatRadioGetNoiseFloor to otPlatRadioGetRssi

* update cli README with singleton command
2016-08-17 16:11:06 -07:00
Jonathan Hui ceb2a9b22a Do not allow enabling Thread protocols when PAN ID is set to broadcast. (#405) 2016-08-17 14:32:55 -07:00
Shu Chen 7130798123 Add diagnostics module in OpenThread (#343)
* Add diagnostics module in OpenThread

  - provide the same diagnostics interface for both CLI and NCP usage
  - implement common diagnostics features based on existing platform interface defined in 'include/platform/'
  - other more platform specific diagnostics features will be processed under platform layer
  - update CLI interface to support diagnostics feature
  - update both Posix and CC2538 platform to support diagnostics feature

* Add diagnostics module unit test

   - move platform.h from "examples/platform" to "include/platform"
   - add test_diag.cpp to test diagnostics module

* Add a configuration option that would enable/disable diagnostics module

Add --enable-diag configuration option to enable/disable diagnostics module when building OpenThread.
2016-08-11 10:26:51 -07:00
Shu Chen cefea1a3c6 Include platform details in version information (#347)
- add --with-platform-info configuration option to specify platform information
- add otGetVersionString() interface to get OpenThread version
2016-08-10 20:02:29 -07:00
Jonathan Hui 4050c68577 Enable -Wconversion on clang and fix all warnings. (#358) 2016-08-10 11:52:22 -07:00
Abtin Keshavarzian 66dce223d6 logging: Change the posix log fprintf to use \r only. (#351) 2016-08-09 12:14:19 -07:00
Abtin Keshavarzian 08f6ffd4fe Change the posix logging implementation (#348)
This commit changes the posix logging implementation to write the
entire log line in a single `fprintf()` command. This change helps
keep the open thread logs separate from other wpantund logs (syslog)
in simulator (posix) run.
2016-08-08 13:12:13 -07:00