Hi all!
I am using mesh sdk v4.10 and sdk 16.0 with an nrf52840 custom hardware. I have a question regarding the mesh event handler. I am seeing something weird which I don't understand.
I have added the mesh event handler by doing the following:
m_evt_handler.evt_cb = SM_mesh_event_handler; nrf_mesh_evt_handler_add(&m_evt_handler); void SM_mesh_event_handler(const nrf_mesh_evt_t *p_evt) { switch (p_evt->type) { case NRF_MESH_EVT_MESSAGE_RECEIVED: { system_monitor.message_rx_count++; } break; case NRF_MESH_EVT_TX_COMPLETE: { system_monitor.message_tx_count++; } break; default: { /*Do nothing here*/ } break; } }
I have a node which publishes sensor status messages. The node is publishing to group 0xC000. What I am seeing is the following:
1. Node publishes the message and repeats it 2 times
2. NRF_MESH_EVT_TX_COMPLETE occurs
3. The weird part, NRF_MESH_EVT_MESSAGE_RECEIVED occurs as well. The number of times this happens is exactly half of the NRF_MESH_EVT_TX_COMPLETE count.
There are no other nodes turned on. Also, the nrf52840 is half duplex.
Could someone please explain this behavior to me?
Regards
Chris