Thread minimal end device operating mode added

pull/4340/head
Kari Severinkangas 2017-05-18 16:36:26 +03:00
parent 8f295177ce
commit 4a438b6ab2
3 changed files with 8 additions and 3 deletions

View File

@ -40,8 +40,8 @@ An example of the configuration file:
| Parameter name | Value | Description |
| --------------- | ------------- | ----------- |
| thread-pskd | string [6-255 chars] | Human-scaled commissioning credentials. |
| thread-device-type | enum from mesh_device_type_t | Set device operating mode. |
| 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: MESH_DEVICE_TYPE_THREAD_ROUTER, MESH_DEVICE_TYPE_THREAD_SLEEPY_END_DEVICE, 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, 2]| Channel page, 0 for 2,4 GHz and 2 for sub-GHz radios. |
| thread-config-channel | number [0-27] | RF channel to use. |

View File

@ -55,7 +55,8 @@ typedef enum {
*/
typedef enum {
MESH_DEVICE_TYPE_THREAD_ROUTER = 0, /*<! Thread router */
MESH_DEVICE_TYPE_THREAD_SLEEPY_END_DEVICE /*<! Thread Sleepy end device */
MESH_DEVICE_TYPE_THREAD_SLEEPY_END_DEVICE, /*<! Thread Sleepy end device */
MESH_DEVICE_TYPE_THREAD_MINIMAL_END_DEVICE /*<! Thread minimal end device */
} mesh_device_type_t;
#ifdef __cplusplus

View File

@ -255,7 +255,11 @@ void thread_tasklet_configure_and_connect_to_network(void)
int8_t status;
link_configuration_s* temp_link_config=NULL;
if (MBED_CONF_MBED_MESH_API_THREAD_DEVICE_TYPE == MESH_DEVICE_TYPE_THREAD_SLEEPY_END_DEVICE) {
if (MBED_CONF_MBED_MESH_API_THREAD_DEVICE_TYPE == MESH_DEVICE_TYPE_THREAD_MINIMAL_END_DEVICE) {
thread_tasklet_data_ptr->operating_mode = NET_6LOWPAN_HOST;
}
else if (MBED_CONF_MBED_MESH_API_THREAD_DEVICE_TYPE == MESH_DEVICE_TYPE_THREAD_SLEEPY_END_DEVICE) {
thread_tasklet_data_ptr->operating_mode = NET_6LOWPAN_SLEEPY_HOST;
} else {
thread_tasklet_data_ptr->operating_mode = NET_6LOWPAN_ROUTER;