Hi,there:
I was used 2 52832 board to run the linght switch server/client examples to test message communication. I add the mesh events handle like this:
static nrf_mesh_evt_handler_t m_event_handler =
{
.evt_cb = mesh_events_handle,
};
static void mesh_events_handle(const nrf_mesh_evt_t * p_evt)
{
if (p_evt->type == NRF_MESH_EVT_ENABLED)
{
}
if(NRF_MESH_EVT_TX_COMPLETE == p_evt->type )
{
__LOG(LOG_SRC_APP, LOG_LEVEL_INFO, "Tx Complete\r\n");
}
if(NRF_MESH_EVT_MESSAGE_RECEIVED == p_evt->type )
{
__LOG(LOG_SRC_APP, LOG_LEVEL_INFO, "Rx Complete\r\n");
__LOG_XB(LOG_SRC_APP, LOG_LEVEL_INFO, "Rx data", p_evt->params.message.p_buffer,p_evt->params.message.length);
}
}
Then run the client and server at the 2 board , i send the message on the client by press the button 3/4 (I change the repeats counter to 0),I found thad the server had receive twice message at the same time the client print the log info: "<t: 176241>, main.c, 135, Tx Complete" twice. is it mead that the message had been sent twice ?why? and how can i do to send once?