You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/refs/api/networking/mesh.md
+12-12Lines changed: 12 additions & 12 deletions
Original file line number
Diff line number
Diff line change
@@ -1,16 +1,16 @@
1
-
###mbed mesh API
1
+
#### Arm Mbed Mesh
2
2
3
3
ARM mbed mesh API allows the client to use the IPv6 mesh network.
4
4
5
5
The client can use the `LoWPANNDInterface` or `ThreadInterface` object for connecting to the mesh network and when successfully connected, the client can create a socket by using the [mbed C++ socket API](https://developer.mbed.org/teams/NetworkSocketAPI/code/NetworkSocketAPI/docs/tip/) to start communication with a remote peer.
6
6
7
7
For ethernet `NanostackEthernetInterface` is provided.
8
8
9
-
#### Supported mesh networking modes
9
+
#####Supported mesh networking modes
10
10
11
11
Currently, 6LoWPAN-ND (neighbour discovery) and Thread bootstrap modes are supported.
12
12
13
-
#### Module Configuration
13
+
#####Module Configuration
14
14
15
15
This module supports static configuration via **mbed configuration system** by using the `mbed_app.json` file. The application needs to create the configuration file if it wants to use other than default settings.
16
16
@@ -29,13 +29,13 @@ An example of the configuration file:
29
29
}
30
30
```
31
31
32
-
##### Configurable parameters in section mbed-mesh-api
32
+
######Configurable parameters in section mbed-mesh-api
33
33
34
34
| Parameter name | Value | Description |
35
35
| --------------- | ------------- | ----------- |
36
36
| heap-size | number [0-0xfffe]| Nanostack's internal heap size |
37
37
38
-
##### Thread related configuration parameters
38
+
######Thread related configuration parameters
39
39
40
40
| Parameter name | Value | Description |
41
41
| --------------- | ------------- | ----------- |
@@ -54,7 +54,7 @@ An example of the configuration file:
54
54
| thread-config-pskc | byte array [16]| Pre-Shared Key for the Commissioner. |
55
55
| thread-security-policy | number [0-0xFF]| Commissioning security policy bits |
56
56
57
-
##### 6LoWPAN related configuration parameters
57
+
######6LoWPAN related configuration parameters
58
58
59
59
| Parameter name | Type | Description |
60
60
| --------------- | ---------| ----------- |
@@ -68,23 +68,23 @@ An example of the configuration file:
68
68
| 6lowpan-nd-sec-level | number [1-7]| Network security level. Use default `5`|
69
69
| 6lowpan-nd-device-type | "NET_6LOWPAN_ROUTER" or "NET_6LOWPAN_HOST" | Device mode. Router is routing packets from other device, creating a mesh network. |
70
70
71
-
#### Usage notes
71
+
#####Usage notes
72
72
73
73
This module should not be used directly by the applications. The applications should use the `LoWPANNDInterface`, `ThreadInterface` or `NanostackEthernetInterface` directly.
74
74
75
75
When using Ethernet interface, there is no configuration options available. It is using dynamic mode to learn the IPv6 prefix from the network. No static configuration is supported.
76
76
77
-
##### Network connection states
77
+
######Network connection states
78
78
79
79
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`.
80
80
81
81
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 client is allowed to attempt connecting again.
82
82
83
-
#### Getting started
83
+
#####Getting started
84
84
85
85
See the example application [mbed-os-example-mesh-minimal](https://github.com/ARMmbed/mbed-os-example-mesh-minimal) for usage.
86
86
87
-
#### Usage example for 6LoWPAN ND mode
87
+
#####Usage example for 6LoWPAN ND mode
88
88
89
89
Create a network interface and driver objects.
90
90
@@ -110,7 +110,7 @@ Then connect to network:
110
110
printf("connected. IP = %s\r\n", mesh.get_ip_address());
111
111
```
112
112
113
-
#### Usage example for 6LoWPAN Thread mode
113
+
#####Usage example for 6LoWPAN Thread mode
114
114
115
115
Basically the same as for ND, but the network interface uses different class:
116
116
@@ -119,7 +119,7 @@ ThreadInterface mesh;
119
119
mesh.connect();
120
120
```
121
121
122
-
#### Usage example with Ethernet
122
+
#####Usage example with Ethernet
123
123
124
124
API is still the same, you just need to provide a driver that implements `NanostackEthernetPhy` API.
0 commit comments