Skip to content

Commit

Permalink
Wi-sun Address registration update:
Browse files Browse the repository at this point in the history
Enable address registration if learned new address after bootstrap
phase.

Start registation when RPL indicate paren't updates.
  • Loading branch information
Juha Heiskanen committed Aug 23, 2018
1 parent 5db8037 commit a48254c
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion source/6LoWPAN/ws/ws_bootstrap.c
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,10 @@ static void ws_bootstrap_address_notification_cb(struct protocol_interface_info_
}

if (reason == ADDR_CALLBACK_DAD_COMPLETE) {
ws_bootsrap_event_trig(WS_ADDRESS_ADDED, interface->bootStrapId, ARM_LIB_LOW_PRIORITY_EVENT, (void *)addr);
//Trig Address Registartion only when Bootstrap is ready
if (interface->nwk_bootstrap_state == ER_BOOTSRAP_DONE) {
ws_bootsrap_event_trig(WS_ADDRESS_ADDED, interface->bootStrapId, ARM_LIB_LOW_PRIORITY_EVENT, (void *)addr);
}
} else if (reason == ADDR_CALLBACK_DELETED) {
// What to do?
}
Expand Down Expand Up @@ -1194,6 +1197,9 @@ static void ws_bootstrap_rpl_callback(rpl_event_t event, void *handle)
*
*/

} else if (event == RPL_EVENT_DAO_PARENT_SWITCH) {
tr_info("RPL parent update ... register ARO");
ws_bootsrap_event_trig(WS_ADDRESS_ADDED, cur->bootStrapId, ARM_LIB_LOW_PRIORITY_EVENT, NULL);
}
cur->ws_info->rpl_state = event;
tr_info("RPL event %d", event);
Expand Down

0 comments on commit a48254c

Please sign in to comment.