|
1 |
| -<h2 id="mesh-api">Mesh</h2> |
| 1 | +<h2 id="mesh-api">6LoWPAN Mesh</h2> |
2 | 2 |
|
3 | 3 | <span class="images"><span>MeshInterface class hierarchy</span></span>
|
4 | 4 |
|
5 |
| -The Arm Mbed mesh API allows the application to use the IPv6 mesh network topologies through the [nanostack](/docs/v5.8/reference/technology.html#nanostack) networking stack. |
| 5 | +The Arm Mbed Mesh API allows the application to use the IPv6 mesh network topologies through the [Nanostack](/docs/v5.8/reference/technology.html#nanostack) networking stack. |
6 | 6 |
|
7 |
| -**Tips:** |
8 |
| -- The mesh API supports 6LoWPAN-ND (neighbor discovery) and Thread bootstrap modes. |
9 |
| -- The applications do not use this module directly. The applications use `LoWPANNDInterface`, `ThreadInterface` or `NanostackEthernetInterface` directly. |
10 |
| -- When using an Ethernet interface, there are no configuration options available. It is using the dynamic mode to learn the IPv6 prefix from the network. |
| 7 | +Mbed OS provides two types of IPv6 based mesh networks: |
11 | 8 |
|
12 |
| -### Mesh class reference |
| 9 | +- 6LoWPAN_ND, loosely following the Zigbee-IP specification. |
| 10 | +- Thread, following the specification from Thread Group. |
13 | 11 |
|
14 |
| -[](https://os.mbed.com/docs/v5.8/mbed-os-api-doxy/class_mesh_interface.html) |
| 12 | +Nanostack is the networking stack that provides both of these protocols. For more information on the stack internals, please refer to the [6LoWPAN mesh technology](mesh-tech.html) section. Application developers use Nanostack through the Mbed Mesh API. |
| 13 | + |
| 14 | +The application can use the `LoWPANNDInterface` or `ThreadInterface` object for connecting to the mesh network. When successfully connected, the application can use the Mbed [C++ socket APIs](network-socket.html) to create a socket to start communication with a remote peer. |
| 15 | + |
| 16 | +You can configure the mesh interface by providing values in `mbed_app.json`, as the [mesh configuration](mesh-configuration.html) section documents. |
15 | 17 |
|
16 | 18 | ### Usage
|
17 | 19 |
|
18 | 20 | 1. Create a network interface and driver objects.
|
19 | 21 | 1. Initialize the interface with given PHY driver.
|
20 | 22 | 1. Connect to network.
|
21 | 23 |
|
| 24 | +### Supported mesh networking modes |
| 25 | + |
| 26 | +Currently, 6LoWPAN-ND (neighbor discovery) and Thread bootstrap modes are supported. |
| 27 | + |
| 28 | +### Network connection states |
| 29 | + |
| 30 | +After the initialization, the network state is `MESH_DISCONNECTED`. After a successful connection, the state changes to `MESH_CONNECTED` and when disconnected from the network the state is changed back to `MESH_DISCONNECTED`. |
| 31 | + |
| 32 | +In case of connection errors, the state is changed to some of the connection error states. In an error state, there is no need to make a `disconnect` request and the application is allowed to attempt connecting again. |
| 33 | + |
| 34 | +### Getting started |
| 35 | + |
| 36 | +See the example application [mbed-os-example-mesh-minimal](https://github.com/ARMmbed/mbed-os-example-mesh-minimal) for usage. |
| 37 | + |
| 38 | +### Mesh class reference |
| 39 | + |
| 40 | +[](https://os.mbed.com/docs/v5.8/mbed-os-api-doxy/class_mesh_interface.html) |
| 41 | + |
22 | 42 | ### Mesh example
|
23 | 43 |
|
24 | 44 | The application below demonstrates a simple light control application, where devices can control the LED status of all devices in the network. You can build the application for the unsecure 6LoWPAN-ND or Thread network.
|
|
0 commit comments