diff --git a/source/6LoWPAN/Thread/thread_router_bootstrap.c b/source/6LoWPAN/Thread/thread_router_bootstrap.c index 0c00650f7fd..2365aed998a 100644 --- a/source/6LoWPAN/Thread/thread_router_bootstrap.c +++ b/source/6LoWPAN/Thread/thread_router_bootstrap.c @@ -2325,7 +2325,6 @@ static uint32_t thread_reed_timeout_calculate(thread_router_select_t *routerSele static int thread_reed_advertise (protocol_interface_info_entry_t *cur) { uint32_t keySequence; - tr_debug("MLE REED ADVERTISEMENT STARTED"); struct link_configuration *linkConfiguration; linkConfiguration = thread_joiner_application_get_config(cur->id); if (!linkConfiguration) { @@ -2336,11 +2335,17 @@ static int thread_reed_advertise (protocol_interface_info_entry_t *cur) return -1; } + // FED not allowed to send advertisements + if (thread_info(cur)->thread_device_mode == THREAD_DEVICE_MODE_FULL_END_DEVICE) { + return -1; + } + uint16_t bufId = mle_service_msg_allocate(cur->id, 16, false, MLE_COMMAND_ADVERTISEMENT); if (bufId == 0) { return -1; } + tr_debug("MLE REED ADVERTISEMENT STARTED"); thread_management_get_current_keysequence(cur->id, &keySequence); mle_service_msg_update_security_params(bufId, 5, 2, keySequence);