Skip to content

Commit 4a438b6

Browse files
author
Kari Severinkangas
committed
Thread minimal end device operating mode added
1 parent 8f29517 commit 4a438b6

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

features/nanostack/FEATURE_NANOSTACK/mbed-mesh-api/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ An example of the configuration file:
4040
| Parameter name | Value | Description |
4141
| --------------- | ------------- | ----------- |
4242
| thread-pskd | string [6-255 chars] | Human-scaled commissioning credentials. |
43-
| thread-device-type | enum from mesh_device_type_t | Set device operating mode. |
4443
| thread-use-static-link-config | boolean | True: Use the below link config, False: Use commissioning, ignore the below link config. |
44+
| thread-device-type | enum from mesh_device_type_t | Supported device operating modes: MESH_DEVICE_TYPE_THREAD_ROUTER, MESH_DEVICE_TYPE_THREAD_SLEEPY_END_DEVICE, MESH_DEVICE_TYPE_THREAD_MINIMAL_END_DEVICE |
4545
| thread-config-channel-mask | number [0-0x07fff800] | Channel mask, 0x07fff800 scans all channels. |
4646
| thread-config-channel-page | number [0, 2]| Channel page, 0 for 2,4 GHz and 2 for sub-GHz radios. |
4747
| thread-config-channel | number [0-27] | RF channel to use. |

features/nanostack/FEATURE_NANOSTACK/mbed-mesh-api/mbed-mesh-api/mesh_interface_types.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,8 @@ typedef enum {
5555
*/
5656
typedef enum {
5757
MESH_DEVICE_TYPE_THREAD_ROUTER = 0, /*<! Thread router */
58-
MESH_DEVICE_TYPE_THREAD_SLEEPY_END_DEVICE /*<! Thread Sleepy end device */
58+
MESH_DEVICE_TYPE_THREAD_SLEEPY_END_DEVICE, /*<! Thread Sleepy end device */
59+
MESH_DEVICE_TYPE_THREAD_MINIMAL_END_DEVICE /*<! Thread minimal end device */
5960
} mesh_device_type_t;
6061

6162
#ifdef __cplusplus

features/nanostack/FEATURE_NANOSTACK/mbed-mesh-api/source/thread_tasklet.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,11 @@ void thread_tasklet_configure_and_connect_to_network(void)
255255
int8_t status;
256256
link_configuration_s* temp_link_config=NULL;
257257

258-
if (MBED_CONF_MBED_MESH_API_THREAD_DEVICE_TYPE == MESH_DEVICE_TYPE_THREAD_SLEEPY_END_DEVICE) {
258+
259+
if (MBED_CONF_MBED_MESH_API_THREAD_DEVICE_TYPE == MESH_DEVICE_TYPE_THREAD_MINIMAL_END_DEVICE) {
260+
thread_tasklet_data_ptr->operating_mode = NET_6LOWPAN_HOST;
261+
}
262+
else if (MBED_CONF_MBED_MESH_API_THREAD_DEVICE_TYPE == MESH_DEVICE_TYPE_THREAD_SLEEPY_END_DEVICE) {
259263
thread_tasklet_data_ptr->operating_mode = NET_6LOWPAN_SLEEPY_HOST;
260264
} else {
261265
thread_tasklet_data_ptr->operating_mode = NET_6LOWPAN_ROUTER;

0 commit comments

Comments
 (0)