* 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.
* 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
* 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.
This commit changes the steps in `mesh_forwarder` so we check the
ipv6 filter (security) check after payload is copied into the message
buffer. This helps the IPv6 filter to pass along the TCP packets with
unsecure dst port(s) properly.
This commit changes the `ipv6_filter` module to allow TCP traffic
from unsecure dst port to pass through. It also adds a new
module/class to parse TCP header and get different feilds.
This flag is typically used for nodes that are associating with an
existing network for the first time. If this is set to `true` before
`PROP_NET_STACK_UP` is set to `true`, the creation of a new partition
at association is prevented. If the node cannot associate with an
existing partition, `PROP_LAST_STATUS` will emit a status that
indicates why the association failed and `PROP_NET_STACK_UP` will
automatically revert to `false`.
Once associated with an existing partition, this flag automatically
reverts to `false`.
This commit adds support to `NcpBase` for getting the list of children
(and the info about each child) by adding the get handler for spinel
property `THREAD_CHILD_TABLE`.
This fixes an issue where calling Start() on a running timer could
lead to out-of-order timers. This fix always removes the timer from
the list then adds it back after the timer values have been updated.
* Add new commissionerUnregsiter() method to ensure compile pass temporarily.
* Return None instead of first configured global IPv6 unicast address if
parameter 'filterPrefix' does not match with any of GUAs on thread interface.
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()`).