Commit Graph

401 Commits

Author SHA1 Message Date
Martin Turon bb84b9a1f2 spinel-cli: Stability improvements to ping (#561)
* Improve ping reliability by making it fully async. Eliminate 5_1_07 from XFAIL list.
* Some non-core changes: readd missing StreamSocket class, improve handling of  command.
2016-09-12 09:50:25 -07:00
Shu Chen d8f9e5baa0 Set joiner to be on the same channel with joiner router (#566) 2016-09-12 08:54:55 -07:00
Lu Wang 25755849d0 Fix networkname TLV and mesh local prefix TLV (#563) 2016-09-12 08:52:52 -07:00
Jonathan Hui 6a59efde56 Initialize DiscoveryRequestTlv::mFlags. (#559) 2016-09-12 08:42:43 -07:00
Lu Wang 7a807e99fa Add support for PSKc TLV and Security Policy TLV (#558)
* Add support for PSKc TLV and Security Policy TLV
2016-09-12 08:42:29 -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
Abtin Keshavarzian 01f9168d74 Ncp: Change the encoding of child info in prop THREAD_CHILD_TABLE getter (#515)
This commit makes two changes in how the child info is encoded in
the getter of property `THREAD_CHILD_TABLE`. First, the child mode
flags (e.g., `RxOnWhenIdle`) are sent as a single uint8_t bitmask.
Second, the child id is no longer included in the response (as it
can be derived from Rloc16).
2016-09-11 20:24:16 -07:00
Abtin Keshavarzian 0a46feaee1 Ncp: Add new spinel property THREAD_ROUTER_ROLE_ENABLED (#553)
This commit adds getter and setter handlers in `NcpBase` class
for a new spinel property `THREAD_ROUTER_ROLE_ENABLED`.
2016-09-11 20:23:47 -07:00
Jonathan Hui 13bc13c635 Disable status checks on codecov for now. (#552) 2016-09-09 16:02:39 -07:00
Robert Quattlebaum 8045c55f5f Fixup for "Refinement of Spinel Protocol Documentation (#534)" (#551)
The last commit was missing the makefile.
2016-09-09 12:19:45 -07:00
Robert Quattlebaum a24602e909 Refinement of Spinel Protocol Documentation (#534)
This commit refines the documentation of the Spinel NCP protocol. What
was previously a single markdown-based document has now been broken
into multiple files which can be edited independently. These files can
then be compiled into a final document in either XML, HTML, or
plaintext formats. The [`mmark`](https://github.com/miekg/mmark) tool is
used for compiling the source documentation into a single XML file and
[`xml2rfc`](https://xml2rfc.tools.ietf.org/) is used to convert from
the XML to the final desired format.

Note that the building of the protocol documents is handled
independently from the normal OpenThread build. The spinel protocol
document source files are intentionally excluded from the build
system, since there is no value in including them. Copies of the final
compiled documents are included to ensure that they are distributed
with any release archives.

This commit is focused on introducing this new strucutre to the protocol
document. The document itself is a work in progress and may contain
errors or require revisions, hence the `draft-` prefix in the filenames.

This commit is related to issue #492, "☂ Spinel NCP Protocol
Standardization".
2016-09-09 10:36:45 -07:00
Jonathan Hui c1a8583fa1 Impelement Joiner::Stop. (#548) 2016-09-08 20:44:43 -07:00
Jonathan Hui a78f91ebdf Configure PSKd as part of starting the commissioner/joiner role. (#547) 2016-09-08 20:33:26 -07:00
Marcin K Szczodrak f45a63dd46 control when OPENTHREAD_EXAMPLES_* variables are defined (#545) 2016-09-08 20:01:44 -07:00
Jonathan Hui a4b3fe7198 Add --enable-commissioner and --enable-joiner to AM_DISTCHECK_CONFIGURE_FLAGS. (#546) 2016-09-08 20:00:46 -07:00
Jonathan Hui 9c75d709ad Fix pretty check escapes. (#544) 2016-09-08 16:08:50 -07:00
Marcin K Szczodrak a0aeca51a1 add missing #include <net/ip6.hpp> into ncp_spi.cpp (#543) 2016-09-08 15:15:16 -07:00
Jonathan Hui 563685e187 travis: enable code coverage reporting. (#516) 2016-09-08 14:14:25 -07:00
Jonathan Hui 7c2b818d2e Thread Commissioning. (#399) 2016-09-08 10:23:11 -07:00
Jonathan Hui 4f610ef082 Use a send task for handling IPv6::SendMessage requests to reduce stack. (#536) 2016-09-08 08:48:06 -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
Jonathan Hui cd355f574f Add missing void to key_manager methods. (#535) 2016-09-08 08:46:52 -07:00
Marcin K Szczodrak f153da566a add Cli Console support (#532)
* add Cli Console support
2016-09-07 14:57:27 -07:00
Jonathan Hui 7cfe32004f Merge pull request #507 from jwhui/pr/remove-globals
Remove global variables from core.
2016-09-07 14:50:12 -07:00
Jonathan Hui 9e39426f01 Remove globals from mbedcrypto.cpp. 2016-09-07 13:30:22 -07:00
Jonathan Hui 28a564548c Remove globals from link_quality.cpp. 2016-09-07 13:30:22 -07:00
Jonathan Hui e22c123904 Remove globals from message.cpp. 2016-09-07 13:30:22 -07:00
Jonathan Hui 32b6d343c4 Remove globals from timer.cpp. 2016-09-07 13:30:22 -07:00
Jonathan Hui b0c1d02f77 Remove globals from tasklet.cpp. 2016-09-07 13:30:22 -07:00
Jonathan Hui 7b58b80d9b Remove globals from ip6_routes.cpp. 2016-09-07 13:30:22 -07:00
Jonathan Hui 707b5a4052 Remove globals from netif.cpp. 2016-09-07 13:30:22 -07:00
Jonathan Hui 239e99d762 Remove globals from udp6.cpp. 2016-09-07 13:30:22 -07:00
Jonathan Hui 2029ef62eb Remove globals from icmp6.cpp. 2016-09-07 13:30:22 -07:00
Jonathan Hui 7f899dc6dd Remove globals from ip6.cpp. 2016-09-07 13:30:22 -07:00
Jonathan Hui 7bc5cb2e5b travis: switch to trusty and clean up travis scripts. (#533) 2016-09-07 13:28:35 -07:00
Jonathan Hui f51b3cb8b7 Disable travis osx checks due to travis instability issues. (#531) 2016-09-07 12:25:21 -07:00
Lu Wang b0d33e510e Init Discovery Response TLV flag (#528) 2016-09-07 11:05:26 -07:00
Abtin Keshavarzian a0b4120248 Fix spelling typos in comments. (#530) 2016-09-07 11:04:53 -07:00
Buke Po 8bb3d4d3c3 Make REED should know if its parent is connected to leader (#526)
* Make REED should know if its parent is connected to leader
2016-09-06 21:59:32 -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
Abtin Keshavarzian 4bd1deae26 Ncp: Change the constant flag names for thread mode in ncp_base. (#523) 2016-09-06 11:59:00 -07:00
Buke Po a7ed23c16c support Thread Harness 1.1 R19 (#520) 2016-09-06 09:33:19 -07:00
Jonathan Hui d3f8b5f242 Add ncp-sim to allow_failures group. (#522) 2016-09-06 09:31:49 -07:00
Lu Wang 1e9d3c1dbf Keep input master key checking consistently (#501) 2016-09-05 20:21:05 -07:00
Xiao Ma 5fbadbf445 Update default "CACHE_ENTRIES" and "MAX_CHILDREN" to support required minimum children. (#519)
* Update default "CACHE_ENTRIES" and "MAX_CHILDREN" to support required minimum children.
* Update Cert_5_1_07_MaxChildCount.py due to maximum children number change.
2016-09-05 20:19:07 -07:00
Jonathan Hui 584690c2a9 Revert an incorrect change to the test script. (#518) 2016-09-02 16:20:45 -07:00
Nick Banks 511ade5293 otAddUnicastAddress Doesn't Hold onto External Pointers (#504)
* Modify ot*UnicastAddress functions to use internal memory instead of holding onto an external memory address.
2016-09-02 16:17:08 -07:00
Martin Turon 73060ae8e1 spinel-cli: Add NCP build to TravisCI (#364)
* ncp: Added spinel-cli and initial travis CI test suite integration.

This PR adds a command line tool, named spinel-cli, that converts ot-cli shell commands (as documented in https://github.com/openthread/openthread/blob/master/src/cli/README.md) to spinel NCP commands (as documented in https://github.com/openthread/openthread/blob/master/src/ncp/PROTOCOL.md).

Also added is a patch to node.py that provides a way to run the existing continuous integration certification test suite against an NCP build rather than a CLI build (by prefacing the command to start the test with the environment variable setting NODE_TYPE=ncp-sim):

cd tests/scripts/thread-cert
NODE_TYPE=ncp-sim top_builddir=../../.. python Cert_5_1_02_ChildAddressTimeout.py
The power of this tool is three fold:

1) As a path to add testing of the NCP in simulation to continuous integration
2) As a path to automated testing of testbeds running NCP firmware on hardware
3) As a simple debugging tool for NCP builds of OpenThread

openthread$ cd tools/spinel-cli/
spinel-cli$ ./spinel-cli.py
Opening pipe to ../../examples/apps/ncp/ot-ncp 1
spinel-cli > help

Available commands (type help <name> for more information):
============================================================
channel            extaddr       mode              route
child              extpanid      netdataregister   router
childtimeout       h             networkidtimeout  routerupgradethreshold
clear              help          networkname       scan
contextreusedelay  history       panid             state
counter            ifconfig      ping              thread
debug              ipaddr        prefix            v
debug-term         keysequence   q                 version
eidcache           leaderdata    quit              whitelist
enabled            leaderweight  releaserouterid
exit               masterkey     rloc16

spinel-cli > version
OPENTHREAD/gd4d4e9d-dirty; Aug 11 2016 14:40:44
Done
spinel-cli > thread start
Done
spinel-cli > state
leader
Done
spinel-cli >

The tool provides three ways to connect to an NCP image:

1) pipe to stdin/stdout of a command line tool (default): -p ./ot-ncp
2) serial connection to a hardware device: -u /dev/ttyUSB0
3) socket connection to the port of a helper tool such as ncp-spi-driver: -s 1234

spinel-cli$ ./spinel-cli.py --help
Options:
  -h, --help            show this help message and exit
  -u UART, --uart=UART
  -p PIPE, --pipe=PIPE
  -s SOCKET, --socket=SOCKET
  -n NODEID, --nodeid=NODEID
  -q, --quiet
  -v, --verbose
2016-09-02 15:32:17 -07:00
Xiao Ma 69eb23cd0c THCI: update thci with bug fix and enhancement. (#513)
* update poll data period to 15s to keep consistent with other vendors.
* fix return value of isOpenThreadRunning().
* set ROUTER_UPGRADE_THRESHOLD to 32 for Leader/Router to support maximum active routers in network.
* do not send server data ntf proactively if prefx configured before starting openthread stack.
2016-09-02 09:08:39 -07:00