Skip to content

Commit d123ee1

Browse files
Merge pull request #4155 from karsev/thread_sec_policy
Thread sec policy
2 parents 8073f9e + f5d6e7d commit d123ee1

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,18 @@ An example of the configuration file:
4141
| --------------- | ------------- | ----------- |
4242
| thread-pskd | string [6-255 chars] | Human-scaled commissioning credentials. |
4343
| thread-device-type | enum from mesh_device_type_t | Set device operating mode. |
44+
| thread-use-static-link-config | boolean | True: Use the below link config, False: Use commissioning, ignore the below link config. |
4445
| thread-config-channel-mask | number [0-0x07fff800] | Channel mask, 0x07fff800 scans all channels. |
4546
| thread-config-channel-page | number [0, 2]| Channel page, 0 for 2,4 GHz and 2 for sub-GHz radios. |
4647
| thread-config-channel | number [0-27] | RF channel to use. |
4748
| thread-config-panid | number [0-0xFFFF] | Network identifier. |
49+
| thread-config-network-name | string [1-16] |
50+
| thread-config-commissioning-dataset-timestamp | [0-0xFFFFFFFFFFFFFFFF] | [48 bit timestamp seconds]-[15 bit timestamp ticks]-[U bit] |
51+
|thread-config-extended-panid | byte array [8] | Extended PAN ID |
4852
| thread-master-key | byte array [16]| Network master key. |
4953
| thread-config-ml-prefix | byte array [8] | Mesh local prefix. |
5054
| thread-config-pskc | byte array [16] | Pre-Shared Key for the Commissioner. |
55+
| thread-security-policy | number [0-0xFF] | Commissioning security policy bits |
5156

5257
### 6LoWPAN related configuration parameters
5358

features/nanostack/FEATURE_NANOSTACK/mbed-mesh-api/mbed_lib.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,12 @@
1818
"thread-config-channel": 22,
1919
"thread-config-panid": "0x0700",
2020
"thread-config-network-name": "\"Thread Network\"",
21-
"thread-config-commissioning-dataset-timestamp": "0x00010000",
21+
"thread-config-commissioning-dataset-timestamp": "0x10000",
2222
"thread-config-extended-panid": "{0xf1, 0xb5, 0xa1, 0xb2,0xc4, 0xd5, 0xa1, 0xbd }",
2323
"thread-master-key": "{0x10, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff}",
2424
"thread-config-ml-prefix": "{0xfd, 0x0, 0x0d, 0xb8, 0x0, 0x0, 0x0, 0x0}",
2525
"thread-config-pskc": "{0xc8, 0xa6, 0x2e, 0xae, 0xf3, 0x68, 0xf3, 0x46, 0xa9, 0x9e, 0x57, 0x85, 0x98, 0x9d, 0x1c, 0xd0}",
26-
"thread-device-type": "MESH_DEVICE_TYPE_THREAD_ROUTER"
26+
"thread-device-type": "MESH_DEVICE_TYPE_THREAD_ROUTER",
27+
"thread-security-policy": 255
2728
}
2829
}

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,8 @@ void read_link_configuration() {
232232
thread_tasklet_data_ptr->link_config.key_rotation = 3600;
233233
thread_tasklet_data_ptr->link_config.key_sequence = 0;
234234

235+
thread_tasklet_data_ptr->link_config.securityPolicy = MBED_CONF_MBED_MESH_API_THREAD_SECURITY_POLICY;
236+
235237
// network name
236238
MBED_ASSERT(strlen(MBED_CONF_MBED_MESH_API_THREAD_CONFIG_NETWORK_NAME) > 0 && strlen(MBED_CONF_MBED_MESH_API_THREAD_CONFIG_NETWORK_NAME) < 17);
237239
memcpy(thread_tasklet_data_ptr->link_config.name, MBED_CONF_MBED_MESH_API_THREAD_CONFIG_NETWORK_NAME, strlen(MBED_CONF_MBED_MESH_API_THREAD_CONFIG_NETWORK_NAME));

0 commit comments

Comments
 (0)