diff --git a/source/6LoWPAN/ws/ws_bootstrap.c b/source/6LoWPAN/ws/ws_bootstrap.c index 4a97efea1b3..b241270cdcc 100644 --- a/source/6LoWPAN/ws/ws_bootstrap.c +++ b/source/6LoWPAN/ws/ws_bootstrap.c @@ -451,6 +451,12 @@ static int8_t ws_fhss_enable(protocol_interface_info_entry_t *cur) */ static void ws_bootstrap_primary_parent_set(struct protocol_interface_info_entry *cur, llc_neighbour_req_t *neighbor_info) { + if (neighbor_info->ws_neighbor->fhss_data.bc_timing_info.broadcast_dwell_interval == 0 || + neighbor_info->ws_neighbor->fhss_data.bc_timing_info.broadcast_interval == 0) { + tr_debug("Parent synch fail by missing BT information"); + return; + } + fhss_ws_configuration_t fhss_configuration; memcpy(&fhss_configuration, ns_fhss_ws_configuration_get(cur->ws_info->fhss_api), sizeof(fhss_ws_configuration_t)); @@ -469,10 +475,8 @@ static void ws_bootstrap_primary_parent_set(struct protocol_interface_info_entry fhss_configuration.broadcast_fixed_channel = cur->ws_info->fhss_bc_fixed_channel; ns_fhss_ws_configuration_set(cur->ws_info->fhss_api, &fhss_configuration); - if (fhss_configuration.fhss_bc_dwell_interval && fhss_configuration.fhss_broadcast_interval) { - // We have broadcast schedule set up set the broadcast parent schedule - ns_fhss_ws_set_parent(cur->ws_info->fhss_api, neighbor_info->neighbor->mac64, &neighbor_info->ws_neighbor->fhss_data.bc_timing_info); - } + // We have broadcast schedule set up set the broadcast parent schedule + ns_fhss_ws_set_parent(cur->ws_info->fhss_api, neighbor_info->neighbor->mac64, &neighbor_info->ws_neighbor->fhss_data.bc_timing_info); // Update LLC to follow updated fhss settings ws_bootstrap_llc_hopping_update(cur,&fhss_configuration); @@ -1840,7 +1844,7 @@ void ws_bootstrap_network_scan_process(protocol_interface_info_entry_t *cur) return; } - ws_bootstrap_primary_parent_set(cur, &neighbor_info); + //ws_bootstrap_primary_parent_set(cur, &neighbor_info); ws_bootstrap_network_information_learn(cur); ws_bootstrap_fhss_activate(cur); ws_bootstrap_event_authentication_start(cur);