Skip to content

Commit

Permalink
Merge pull request ARMmbed#1996 from ARMmbed/ws_bbr_pan_size
Browse files Browse the repository at this point in the history
Fixed Default small network setup set to follow standard.
  • Loading branch information
Juha Heiskanen committed Feb 26, 2019
2 parents 90a335b + da6fd12 commit d4fded3
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion source/6LoWPAN/ws/ws_common.c
Expand Up @@ -274,6 +274,7 @@ 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

// Set defaults for the device. user can modify these.
Expand Down Expand Up @@ -302,7 +303,12 @@ void ws_common_network_size_configure(protocol_interface_info_entry_t *cur, uint
// imin: 14 (16s)
// doublings:3 (128s)
// redundancy; 0 Disabled
ws_bbr_rpl_config(14, 3, 0);
if (cur->ws_info->network_size_config == NETWORK_SIZE_AUTOMATIC) {
ws_bbr_rpl_config(14, 3, 0);
} else {
ws_bbr_rpl_config(0, 0, 0);
}

} else if (network_size < 300) {
// Configure the Wi-SUN discovery trickle parameters
cur->ws_info->trickle_params_pan_discovery = trickle_params_pan_discovery_medium;
Expand Down

0 comments on commit d4fded3

Please sign in to comment.