I am currently publishing messages to a group of servers on a 10 second interval. This works well for a while but after a few minutes some of the nodes stop handling the message. They receive the message but do not call the callback function in the main. I have traced the problem to the function below. The if condition stops becoming true and thus the onoff_set_cb doesn't get called allowing me to update the value in the main. I believe it has something to do with the delay and transition time as they are not becoming zero causing the if condition to be false. When I print out the delay and remaining time they both stay at 50 and 100 and never become zero. If I force the condition to become true(like in the code below) I never have problems with the nodes not handling the message. I am also having the same problem when using the level client and server. I attached a screen shot of the debugger from the level client node. notice how it gets an acknowledgment back but some of the nodes aren't being set to the correct level.
I am using acknowledged messages and I am receiving a status message back from the server nodes
I am using mesh sdk 3.0.0 and stock sdk 15.2
static void onoff_state_value_update(app_onoff_server_t * p_server) { /* Requirement: If delay and transition time is zero, current state changes to the target state. */ if ((p_server->state.delay_ms == 0 && p_server->state.remaining_time_ms == 0) || /* Requirement: If current state is 0 (checked earlier) and target state is 1, current state value changes * to the target state value immediately after the delay. */ (p_server->state.delay_ms == 0 && p_server->state.target_onoff == 1)||true) { p_server->state.present_onoff = p_server->state.target_onoff; generic_onoff_status_params_t status_params; status_params.present_on_off = p_server->state.present_onoff; status_params.target_on_off = p_server->state.target_onoff; status_params.remaining_time_ms = p_server->state.remaining_time_ms; (void) generic_onoff_server_status_publish(&p_server->server, &status_params); if (!p_server->value_updated) { p_server->onoff_set_cb(p_server, p_server->state.present_onoff); p_server->value_updated = true; } } __LOG(LOG_SRC_APP, LOG_LEVEL_DBG1, "cur onoff: %d target: %d delay: %d ms remaining time: %d ms\n", p_server->state.present_onoff, p_server->state.target_onoff, p_server->state.delay_ms, p_server->state.remaining_time_ms); }