Skip to content

Commit

Permalink
Wi-SUN setup update:
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Juha Heiskanen committed May 28, 2019
1 parent c1a89e5 commit 940de0b
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
1 change: 1 addition & 0 deletions nanostack/ws_management_api.h
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ extern "C" {

#define NETWORK_SIZE_AUTOMATIC 0x00
#define NETWORK_SIZE_SMALL 0x01
#define NETWORK_SIZE_MEDIUM 0x08
#define NETWORK_SIZE_LARGE 0x10


Expand Down
10 changes: 5 additions & 5 deletions source/6LoWPAN/ws/ws_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ static const trickle_params_t trickle_params_pan_discovery_large = {

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

// Set defaults for the device. user can modify these.
cur->ws_info->fhss_uc_fixed_channel = 0xffff;
Expand Down Expand Up @@ -314,9 +314,9 @@ void ws_common_network_size_configure(protocol_interface_info_entry_t *cur, uint
cur->ws_info->trickle_params_pan_discovery = trickle_params_pan_discovery_medium;
// Something in between
// imin: 15 (32s)
// doublings:3 (262s)
// doublings:5 (960s)
// redundancy; 7
ws_bbr_rpl_config(15, 3, 7);
ws_bbr_rpl_config(15, 5, 7);
} else {
// Configure the Wi-SUN discovery trickle parameters
cur->ws_info->trickle_params_pan_discovery = trickle_params_pan_discovery_large;
Expand Down
2 changes: 2 additions & 0 deletions source/6LoWPAN/ws/ws_management_api.c
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,8 @@ int ws_management_network_size_set(

if (network_size == NETWORK_SIZE_LARGE) {
ws_common_network_size_configure(cur, 5000);
} else if (network_size == NETWORK_SIZE_MEDIUM) {
ws_common_network_size_configure(cur, 200);
} else {
ws_common_network_size_configure(cur, 10);
}
Expand Down

0 comments on commit 940de0b

Please sign in to comment.