Files
openthread/examples/cli
Robert Quattlebaum 059763bfcc travis: Update travis to do a make distcheck instead of just make check (#46)
* travis: Do a `make distcheck` instead of just `make check`

Doing a `make distcheck` instead of just a `make check` ensures that
the build system is sane and that the results from `make dist` have
everything needed.

* build-system: Fixes for `make distcheck`

This commit fixes the `distcheck` target by addressing the following
issues:

 *  Repaired ability to perform builds when the build directory is not
    the source directory.
 *  Addressed an issue with the tarball name that occurs the very
    first time `make` is run.
2016-05-19 13:34:40 -07:00
..
2016-05-12 22:39:11 -07:00

OpenThread CLI Example

This example application demonstrates a minimal OpenThread application that exposes the OpenThread configuration and management interfaces via a basic command-line interface. The steps below take you through the minimal steps required to ping one (emulated) Thread device from another (emulated) Thread device.

1. Build

$ cd openthread
$ ./bootstrap-configure
$ make

2. Start Node 1

Spawn the process:

$ cd openthread/examples/cli
$ ./soc --nodeid=1 -S

Start OpenThread:

start
Done

Wait a few seconds and verify that the device has become a Thread Leader:

state
leader
Done

View IPv6 addresses assigned to Node 1's Thread interface:

ipaddr
fdde:ad00:beef:0:0:ff:fe00:0
fe80:0:0:0:0:ff:fe00:0
fdde:ad00:beef:0:558:f56b:d688:799
fe80:0:0:0:f3d9:2a82:c8d8:fe43
Done

2. Start Node 2

Spawn the process:

$ cd openthread/examples/cli
$ ./soc --nodeid=2 -S

Start OpenThread:

start
Done

Wait a few seconds and verify that the device has become a Thread Router:

state
router
Done

3. Ping Node 1 from Node 2

ping fdde:ad00:beef:0:558:f56b:d688:799
16 bytes from fdde:ad00:beef:0:558:f56b:d688:799: icmp_seq=1 hlim=64

4. Want More?

You may note that the example above did not include any network parameter configuration, such as the IEEE 802.15.4 PAN ID or the Thread Master Key. OpenThread currently implements default values for network parameters. However, you may use the CLI to change network parameters, other configurations, and perform other operations.

See the OpenThread CLI Reference README.md to explore more.