Commit Graph

360 Commits

Author SHA1 Message Date
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
Jonathan Hui 73c64f403f Verify that IPv6 addresses are configured for on-mesh prefixes. (#512) 2016-09-01 19:14:59 -07:00
Abtin Keshavarzian 1ef2165866 Mesh_forwarder: Copy the payload into message before ipv6 filter check (#511)
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.
2016-09-01 18:09:16 -07:00
Abtin Keshavarzian 2d914a1cc0 Ncp: Fix the ExtAddress encoding in child table property getter (#510) 2016-09-01 12:53:00 -07:00
Nick Banks 51baf4ab4d Add POLLIN to the poll flags for the posix example. (#505) 2016-09-01 11:59:13 -07:00
Abtin Keshavarzian b1f4a81afd Allow TCP traffic (from unsecure ports) to pass through IPv6 filter (#508)
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.
2016-08-31 20:03:06 -07:00
Jonathan Hui 55d53b627c Automatically update leader with network data. (#480) 2016-08-31 19:58:19 -07:00
Robert Quattlebaum 545ed64c47 ncp: Adds new property, 'PROP_NET_REQUIRE_JOIN_EXISTING' (#497)
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`.
2016-08-31 14:27:56 -07:00
Abtin Keshavarzian 188a97dc21 Ncp: Add support for child table property (#499)
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`.
2016-08-31 12:33:08 -07:00
Jonathan Hui 985a0ba540 Enable implementation of SHA-256 that has lower ROM footprint. (#496) 2016-08-31 12:00:52 -07:00
Abtin Keshavarzian f77b1b525c Ncp: Add support for requesting "EnergyScan" and passing the result to host (#498) 2016-08-31 10:14:38 -07:00
Abtin Keshavarzian 233bc92883 Ncp: Use static_cast instead of reinterpret_cast. (#503) 2016-08-31 10:12:36 -07:00
rongli 1387963c1a fix typo (#500) 2016-08-31 05:50:03 -07:00
Jonathan Hui 72bd784fb5 Set AQ_Retry_Timeout before incrementing AQ_Failures. (#495) 2016-08-30 20:52:07 -07:00
turon b771deae4f Add SPINEL_PROP_THREAD_RLOC16_DEBUG_PASSTHRU to allow forwarding of RLOC16 traffic to HOST, including receipt of ping responses to RLOC16. (#493) 2016-08-30 18:46:25 -07:00
Abtin Keshavarzian fe3eaffccd Ip6: Add the LinkSecurityMode info in the copied datagram message passed to host (#494) 2016-08-30 15:53:03 -07:00
Robert Quattlebaum 0066be4c18 ncp: Add the ability to get PROP_THREAD_ON_MESH_NETS (#491)
This property will also be updated dynamically.
2016-08-30 11:52:43 -07:00
Lu Wang f4ea00c5f3 Add CLI for sending MGMT_ACTIVE_GET/SET, MGMT_PENDING_GET/SET (Reopen #402) (#474)
* Add CLI for sending MGMT_ACTIVE_GET, MGMT_ACTIVE_SET, MGMT_PENDING_GET and MGMT_PENDING_SET
2016-08-30 10:48:52 -07:00
Jonathan Hui 8858313feb Fix naming issue with otIsReceiveIp6DatagramFilterEnabled(). (#489) 2016-08-29 11:44:55 -07:00
Jonathan Hui 6d958ba51b Fix compiler warnings in unit tests. (#488) 2016-08-29 11:41:59 -07:00
Jonathan Hui 1bb82c54ec Fix bug in starting a timer. (#487)
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.
2016-08-29 11:34:15 -07:00
Xiao Ma 8beb042328 THCI: Update thci to keep the consistency with Harness V1.1-R16 and bug fix. (#482)
* 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.
2016-08-29 09:32:15 -07:00
Jonathan Hui 027e009005 Simplify ICMPv6 Echo Request/Reply implementation. (#481)
- Only support a single ICMPv6 Echo Reply handler.
- Remove large static ICMPv6 Echo Request buffer.
2016-08-29 09:31:26 -07:00
Marcin K Szczodrak 04564ac96d add missing ot types include (#479) 2016-08-26 11:00:20 -07:00
Xiao Ma 11dd55a389 cli: update link quality cli to take effect for neighouring router devices. (#478) 2016-08-26 08:46:49 -07:00
Nick Banks 62f3188081 Dynamic Max Children (#462)
* Add support for dynamically adjusting the maximum number of allowed children.
* Update cli to support max number of children.
2016-08-26 08:42:06 -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
Jonathan Hui 4d37d0098e Implement Server Data Notify. (#457) 2016-08-25 23:14:50 -07:00
Jonathan Hui 83348b5afd Only send Child Update Request message when no more state changes are pending. (#476) 2016-08-25 22:56:14 -07:00
Lu Wang fcff3cb018 Add check for CLI argument number (#465)
* Add check for CLI argument number
2016-08-25 22:26:23 -07:00
Abtin Keshavarzian e64df220e1 Ncp: Update the RESET_hanlder() to ensure a single spinel reset message goes out (#456) 2016-08-25 22:16: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
Jonathan Hui 70bd6af3b8 Fix bugs in retrieving child/router info using an RLOC16. (#475) 2016-08-25 21:09:01 -07:00
Shu Chen 767df0f437 Don't reset key sequence when setting the same master key (#468)
Update 'SetMasterKey()' to reset key sequence only when setting a different master key.
2016-08-25 20:45:34 -07:00
rongli 1bb951240e fix AppendRoute() bug: LinkQualityOut is always 0 (#466) 2016-08-25 20:34:49 -07:00
Jonathan Hui 86307f2e3d Set VERBOSE=1 to provide additional output on travis builds. (#461) 2016-08-25 18:53:13 -07:00
Jonathan Hui 18c4dcfc9e Fix bugs when comparing partitions during parent selection. (#472) 2016-08-25 18:07:34 -07:00
Jonathan Hui 674bff37fa Implement a method for removing a neighbor. (#454) 2016-08-23 20:47:33 -07:00
rongli ee1c8fecd9 Fix default route issue (#451) 2016-08-23 20:47:20 -07:00
Abtin Keshavarzian 97cbae2174 Ncp: Post the tasklet mUpdateChangedPropTask from constructor for initial reset flag. (#453) 2016-08-23 12:53:24 -07:00
Xiao Ma 834c8ebc94 Update ADDRESS_QUERY_MAX_RETRY_DELAY parameter value. (#450) 2016-08-23 08:49:50 -07:00