Skip to content

Commit a3fdbc7

Browse files
authored
Merge pull request #12894 from mikaleppanen/fea_wisun_nanostack_device_type_config_5_15
Nanostack: Add config for Wi-SUN device type (Mbed OS 5.15)
2 parents 014c926 + f5bd0a5 commit a3fdbc7

File tree

3 files changed

+13
-2
lines changed

3 files changed

+13
-2
lines changed

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,9 @@ typedef enum {
5959
typedef enum {
6060
MESH_DEVICE_TYPE_THREAD_ROUTER = 0, /*<! Thread router */
6161
MESH_DEVICE_TYPE_THREAD_SLEEPY_END_DEVICE, /*<! Thread Sleepy end device */
62-
MESH_DEVICE_TYPE_THREAD_MINIMAL_END_DEVICE /*<! Thread minimal end device */
62+
MESH_DEVICE_TYPE_THREAD_MINIMAL_END_DEVICE, /*<! Thread minimal end device */
63+
MESH_DEVICE_TYPE_WISUN_ROUTER, /*<! Wi-SUN router */
64+
MESH_DEVICE_TYPE_WISUN_BORDER_ROUTER /*<! Wi-SUN border router */
6365
} mesh_device_type_t;
6466

6567
/**

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,10 @@
160160
"help": "Unicast dwell interval. Range: 15-255 milliseconds",
161161
"value": 0
162162
},
163+
"wisun-device-type": {
164+
"help": "Supported device operating modes: MESH_DEVICE_TYPE_WISUN_ROUTER, MESH_DEVICE_TYPE_WISUN_BORDER_ROUTER",
165+
"value": "MESH_DEVICE_TYPE_WISUN_ROUTER"
166+
},
163167
"certificate-header": {
164168
"help": "File name of the certificate header file (used on include directive)",
165169
"value": null

features/nanostack/mbed-mesh-api/source/wisun_tasklet.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,12 @@ static void wisun_tasklet_configure_and_connect_to_network(void)
223223
int status;
224224
fhss_timer_t *fhss_timer_ptr = &fhss_functions;
225225

226-
wisun_tasklet_data_ptr->operating_mode = NET_6LOWPAN_ROUTER;
226+
if (MBED_CONF_MBED_MESH_API_WISUN_DEVICE_TYPE == MESH_DEVICE_TYPE_WISUN_BORDER_ROUTER) {
227+
wisun_tasklet_data_ptr->operating_mode = NET_6LOWPAN_BORDER_ROUTER;
228+
} else {
229+
wisun_tasklet_data_ptr->operating_mode = NET_6LOWPAN_ROUTER;
230+
}
231+
227232
wisun_tasklet_data_ptr->operating_mode_extension = NET_6LOWPAN_WS;
228233

229234
arm_nwk_interface_configure_6lowpan_bootstrap_set(

0 commit comments

Comments
 (0)