Skip to content

Commit 940de0b

Browse files
author
Juha Heiskanen
committed
Wi-SUN setup update:
Wi-sun network size configure support for medium size network. Default Discovery and RPL BBR setup is medium isize network. Medium size Asynch message trigle imax time updated 240->960 seconds. BBR RPL trigle medium setup Imax to 960. Change-Id: I7a90fdc1a9f6d0b8075080f1582df55448494cc1
1 parent c1a89e5 commit 940de0b

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

nanostack/ws_management_api.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ extern "C" {
7777

7878
#define NETWORK_SIZE_AUTOMATIC 0x00
7979
#define NETWORK_SIZE_SMALL 0x01
80+
#define NETWORK_SIZE_MEDIUM 0x08
8081
#define NETWORK_SIZE_LARGE 0x10
8182

8283

source/6LoWPAN/ws/ws_common.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ static const trickle_params_t trickle_params_pan_discovery_large = {
5050

5151
static const trickle_params_t trickle_params_pan_discovery_medium = {
5252
.Imin = TRICKLE_IMIN_30_SECS, /* 30 second; ticks are 1s */
53-
.Imax = TRICKLE_IMIN_30_SECS << 3, /* 240 seconds 4 min*/
53+
.Imax = TRICKLE_IMIN_30_SECS << 5, /* 960 seconds 16 min*/
5454
.k = 1, /* 1 */
5555
.TimerExpirations = TRICKLE_EXPIRATIONS_INFINITE
5656
};
@@ -274,8 +274,8 @@ int8_t ws_common_allocate_and_init(protocol_interface_info_entry_t *cur)
274274
cur->ws_info->hopping_schdule.operating_mode = OPERATING_MODE_3;
275275
cur->ws_info->hopping_schdule.operating_class = 2;
276276
ws_common_regulatory_domain_config(cur);
277-
cur->ws_info->network_size_config = NETWORK_SIZE_AUTOMATIC;
278-
ws_common_network_size_configure(cur, 10); // defaults to small network size
277+
cur->ws_info->network_size_config = NETWORK_SIZE_MEDIUM;
278+
ws_common_network_size_configure(cur, 200); // defaults to medium network size
279279

280280
// Set defaults for the device. user can modify these.
281281
cur->ws_info->fhss_uc_fixed_channel = 0xffff;
@@ -314,9 +314,9 @@ void ws_common_network_size_configure(protocol_interface_info_entry_t *cur, uint
314314
cur->ws_info->trickle_params_pan_discovery = trickle_params_pan_discovery_medium;
315315
// Something in between
316316
// imin: 15 (32s)
317-
// doublings:3 (262s)
317+
// doublings:5 (960s)
318318
// redundancy; 7
319-
ws_bbr_rpl_config(15, 3, 7);
319+
ws_bbr_rpl_config(15, 5, 7);
320320
} else {
321321
// Configure the Wi-SUN discovery trickle parameters
322322
cur->ws_info->trickle_params_pan_discovery = trickle_params_pan_discovery_large;

source/6LoWPAN/ws/ws_management_api.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,8 @@ int ws_management_network_size_set(
118118

119119
if (network_size == NETWORK_SIZE_LARGE) {
120120
ws_common_network_size_configure(cur, 5000);
121+
} else if (network_size == NETWORK_SIZE_MEDIUM) {
122+
ws_common_network_size_configure(cur, 200);
121123
} else {
122124
ws_common_network_size_configure(cur, 10);
123125
}

0 commit comments

Comments
 (0)