Skip to content

Add mbed-mesh-api content to Connectivity.md #366

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ The Arm Mbed mesh API allows the application to use the IPv6 mesh network topolo
* The applications do not use this module directly. The applications use `LoWPANNDInterface`, `ThreadInterface` or `NanostackEthernetInterface` directly.
* 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.

**Network connection states**

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`.

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.

### Mesh class reference

**LoWPANNDInterface**
Expand Down
68 changes: 0 additions & 68 deletions docs/reference/api/connectivity/networksocket/networksocket.md
Original file line number Diff line number Diff line change
Expand Up @@ -156,71 +156,3 @@ You can use and extend a cellular interface in various different ways. For examp
- It uses an external IP stack (for example, LWIP) instead of on-chip network stacks.
- The generic modem driver uses standard 3GPP AT 27.007 AT commands to set up the cellular modem and registers to the network.
- After registration, the driver opens up a PPP (Point-to-Point Protocol) pipe using LWIP with the cellular modem and connects to the internet.

##### Module configuration

This module supports static configuration via the **Mbed configuration system**. The application needs to create an `mbed_app.json` configuration file if you want to use other than default settings.

An example of the configuration file:

```
{
"target_overrides": {
"*": {
"target.features_add": ["IPV6"],
"mbed-mesh-api.6lowpan-nd-channel": 12,
"mbed-mesh-api.6lowpan-nd-channel-mask": "(1<<12)",
"mbed-mesh-api.heap-size": 10000
}
}
}
```

**Configurable parameters in the `mbed-mesh-api` section**

| Parameter name | Value | Description |
| --------------- | ------------- | ----------- |
| `heap-size` | number [0-0xfffe] | Nanostack's internal heap size |

**Thread related configuration parameters**

| Parameter name | Value | Description |
| --------------- | ------------- | ----------- |
| `thread-pskd` | string [6-255 chars] | Human-scaled commissioning credentials. |
| `thread-use-static-link-config` | boolean | True: Use the below link config, False: Use commissioning, ignore the below link config. |
| `thread-device-type` | enum from `mesh_device_type_t` | Supported device operating modes:<br> `MESH_DEVICE_TYPE_THREAD_ROUTER`<br> `MESH_DEVICE_TYPE_THREAD_SLEEPY_END_DEVICE`<br> `MESH_DEVICE_TYPE_THREAD_MINIMAL_END_DEVICE` |
| `thread-config-channel-mask` | number [0-0x07fff800] | Channel mask, 0x07fff800 scans all channels. |
| `thread-config-channel-page` | number [0]| Channel page, 0 for 2,4 GHz radio. |
| `thread-config-channel` | number [11-26] | RF channel to use. |
| `thread-config-panid` | number [0-0xFFFF] | Network identifier. |
| `thread-config-network-name` | string [1-16] |
| `thread-config-commissioning-dataset-timestamp` | [0-0xFFFFFFFFFFFFFFFF] | [48 bit timestamp seconds]-[15 bit timestamp ticks]-[U bit] |
| `thread-config-extended-panid` | byte array [8] | Extended PAN ID. |
| `thread-master-key` | byte array [16]| Network master key. |
| `thread-config-ml-prefix` | byte array [8] | Mesh local prefix. |
| `thread-config-pskc` | byte array [16] | Pre-Shared Key for the Commissioner. |
| `thread-security-policy` | number [0-0xFF] | Commissioning security policy bits. |

**6LoWPAN related configuration parameters**

| Parameter name | Type | Description |
| --------------- | ---------| ----------- |
| `6lowpan-nd-channel-mask` | number [0-0x07fff800] | Channel mask, bit-mask of channels to use. |
| `6lowpan-nd-channel-page` | number [0, 2] | 0 for 2,4 GHz and 2 for sub-GHz radios. |
| `6lowpan-nd-channel` | number [0-26] | RF channel to use when `channel_mask` is not defined. |
| `6lowpan-nd-panid-filter` | number [0-0xffff] | Beacon PAN ID filter, 0xffff means no filtering. |
| `6lowpan-nd-security-mode` | "NONE" or "PSK" | To use either no security, or Pre shared network key. |
| `6lowpan-nd-psk-key-id` | number | PSK key ID when PSK is enabled. |
| `6lowpan-nd-psk-key` | byte array [16] | Pre-Shared network key. |
| `6lowpan-nd-sec-level` | number [1-7] | Network security level. Use default `5`. |
| `6lowpan-nd-device-type` | "NET_6LOWPAN_ROUTER" or "NET_6LOWPAN_HOST" | Device mode. Router is routing packets from other device, creating a mesh network. |

**Network connection states**

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`.

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.

##### Getting started

See the example application <a href="https://github.com/ARMmbed/mbed-os-example-mesh-minimal" target="_blank">mbed-os-example-mesh-minimal</a> for usage.
98 changes: 98 additions & 0 deletions docs/reference/configuration/Connectivity.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,4 +118,102 @@ Name: nsapi.present
Defined by: library:nsapi
Macro name: MBED_CONF_NSAPI_PRESENT
Value: 1 (set by library:nsapi)

Name: mbed-mesh-api.6lowpan-nd-channel
Defined by: library:mbed-mesh-api
Macro name: MBED_CONF_MBED_MESH_API_6LOWPAN_ND_CHANNEL
Value: 12 (set by library:mbed-mesh-api)
Name: mbed-mesh-api.6lowpan-nd-channel-mask
Defined by: library:mbed-mesh-api
Macro name: MBED_CONF_MBED_MESH_API_6LOWPAN_ND_CHANNEL_MASK
Value: (1<<12) (set by library:mbed-mesh-api)
Name: mbed-mesh-api.6lowpan-nd-channel-page
Defined by: library:mbed-mesh-api
No value set
Name: mbed-mesh-api.6lowpan-nd-device-type
Defined by: library:mbed-mesh-api
Macro name: MBED_CONF_MBED_MESH_API_6LOWPAN_ND_DEVICE_TYPE
Value: NET_6LOWPAN_ROUTER (set by library:mbed-mesh-api)
Name: mbed-mesh-api.6lowpan-nd-panid-filter
Defined by: library:mbed-mesh-api
Macro name: MBED_CONF_MBED_MESH_API_6LOWPAN_ND_PANID_FILTER
Value: 0xffff (set by library:mbed-mesh-api)
Name: mbed-mesh-api.6lowpan-nd-psk-key
Defined by: library:mbed-mesh-api
Macro name: MBED_CONF_MBED_MESH_API_6LOWPAN_ND_PSK_KEY
Value: {0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf} (set by library:mbed-mesh-api)
Name: mbed-mesh-api.6lowpan-nd-psk-key-id
Defined by: library:mbed-mesh-api
Macro name: MBED_CONF_MBED_MESH_API_6LOWPAN_ND_PSK_KEY_ID
Value: 1 (set by library:mbed-mesh-api)
Name: mbed-mesh-api.6lowpan-nd-sec-level
Defined by: library:mbed-mesh-api
Macro name: MBED_CONF_MBED_MESH_API_6LOWPAN_ND_SEC_LEVEL
Value: 5 (set by library:mbed-mesh-api)
Name: mbed-mesh-api.6lowpan-nd-security-mode
Defined by: library:mbed-mesh-api
Macro name: MBED_CONF_MBED_MESH_API_6LOWPAN_ND_SECURITY_MODE
Value: NONE (set by library:mbed-mesh-api)
Name: mbed-mesh-api.heap-size
Defined by: library:mbed-mesh-api
Macro name: MBED_CONF_MBED_MESH_API_HEAP_SIZE
Value: 32500 (set by library:mbed-mesh-api)
Name: mbed-mesh-api.thread-config-channel
Defined by: library:mbed-mesh-api
Macro name: MBED_CONF_MBED_MESH_API_THREAD_CONFIG_CHANNEL
Value: 22 (set by library:mbed-mesh-api)
Name: mbed-mesh-api.thread-config-channel-mask
Defined by: library:mbed-mesh-api
Macro name: MBED_CONF_MBED_MESH_API_THREAD_CONFIG_CHANNEL_MASK
Value: 0x7fff800 (set by library:mbed-mesh-api)
Name: mbed-mesh-api.thread-config-channel-page
Defined by: library:mbed-mesh-api
No value set
Name: mbed-mesh-api.thread-config-commissioning-dataset-timestamp
Defined by: library:mbed-mesh-api
Macro name: MBED_CONF_MBED_MESH_API_THREAD_CONFIG_COMMISSIONING_DATASET_TIMESTAMP
Value: 0x10000 (set by library:mbed-mesh-api)
Name: mbed-mesh-api.thread-config-extended-panid
Defined by: library:mbed-mesh-api
Macro name: MBED_CONF_MBED_MESH_API_THREAD_CONFIG_EXTENDED_PANID
Value: {0xf1, 0xb5, 0xa1, 0xb2,0xc4, 0xd5, 0xa1, 0xbd } (set by library:mbed-mesh-api)
Name: mbed-mesh-api.thread-config-ml-prefix
Defined by: library:mbed-mesh-api
Macro name: MBED_CONF_MBED_MESH_API_THREAD_CONFIG_ML_PREFIX
Value: {0xfd, 0x0, 0x0d, 0xb8, 0x0, 0x0, 0x0, 0x0} (set by library:mbed-mesh-api)
Name: mbed-mesh-api.thread-config-network-name
Defined by: library:mbed-mesh-api
Macro name: MBED_CONF_MBED_MESH_API_THREAD_CONFIG_NETWORK_NAME
Value: "Thread Network" (set by library:mbed-mesh-api)
Name: mbed-mesh-api.thread-config-panid
Defined by: library:mbed-mesh-api
Macro name: MBED_CONF_MBED_MESH_API_THREAD_CONFIG_PANID
Value: 0x0700 (set by library:mbed-mesh-api)
Name: mbed-mesh-api.thread-config-pskc
Defined by: library:mbed-mesh-api
Macro name: MBED_CONF_MBED_MESH_API_THREAD_CONFIG_PSKC
Value: {0xc8, 0xa6, 0x2e, 0xae, 0xf3, 0x68, 0xf3, 0x46, 0xa9, 0x9e, 0x57, 0x85, 0x98, 0x9d, 0x1c, 0xd0} (set by library:mbed-mesh-api)
Name: mbed-mesh-api.thread-device-type
Defined by: library:mbed-mesh-api
Macro name: MBED_CONF_MBED_MESH_API_THREAD_DEVICE_TYPE
Value: MESH_DEVICE_TYPE_THREAD_ROUTER (set by library:mbed-mesh-api)
Name: mbed-mesh-api.thread-master-key
Defined by: library:mbed-mesh-api
Macro name: MBED_CONF_MBED_MESH_API_THREAD_MASTER_KEY
Value: {0x10, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff} (set by library:mbed-mesh-api)
Name: mbed-mesh-api.thread-pskd
Defined by: library:mbed-mesh-api
Macro name: MBED_CONF_MBED_MESH_API_THREAD_PSKD
Value: "abcdefghijklmno" (set by library:mbed-mesh-api)
Name: mbed-mesh-api.thread-security-policy
Defined by: library:mbed-mesh-api
Macro name: MBED_CONF_MBED_MESH_API_THREAD_SECURITY_POLICY
Value: 255 (set by library:mbed-mesh-api)
Name: mbed-mesh-api.thread-use-static-link-config
Defined by: library:mbed-mesh-api
Macro name: MBED_CONF_MBED_MESH_API_THREAD_USE_STATIC_LINK_CONFIG
Value: 1 (set by library:mbed-mesh-api)
Name: mbed-mesh-api.use-malloc-for-heap
Defined by: library:mbed-mesh-api
No value set
```