mirror of https://github.com/ARMmbed/mbed-os.git
commit
6a2d1bf870
|
@ -40,8 +40,8 @@ An example of the configuration file:
|
||||||
| Parameter name | Value | Description |
|
| Parameter name | Value | Description |
|
||||||
| --------------- | ------------- | ----------- |
|
| --------------- | ------------- | ----------- |
|
||||||
| thread-pskd | string [6-255 chars] | Human-scaled commissioning credentials. |
|
| 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-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-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-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. |
|
| thread-config-channel | number [0-27] | RF channel to use. |
|
||||||
|
|
|
@ -55,7 +55,8 @@ typedef enum {
|
||||||
*/
|
*/
|
||||||
typedef enum {
|
typedef enum {
|
||||||
MESH_DEVICE_TYPE_THREAD_ROUTER = 0, /*<! Thread router */
|
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;
|
} mesh_device_type_t;
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
|
|
@ -255,7 +255,11 @@ void thread_tasklet_configure_and_connect_to_network(void)
|
||||||
int8_t status;
|
int8_t status;
|
||||||
link_configuration_s* temp_link_config=NULL;
|
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;
|
thread_tasklet_data_ptr->operating_mode = NET_6LOWPAN_SLEEPY_HOST;
|
||||||
} else {
|
} else {
|
||||||
thread_tasklet_data_ptr->operating_mode = NET_6LOWPAN_ROUTER;
|
thread_tasklet_data_ptr->operating_mode = NET_6LOWPAN_ROUTER;
|
||||||
|
|
Loading…
Reference in New Issue