Why the message would be send twice

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?

Parents
  • The messaging protocols, including the proprietary MGP, all include functionality to send and receive messages.

    In general, messages are kept in the queue for the connector through which they should be sent until successfully sent or until a permanent error has occurred. Most errors are considered temporary though and will cause the message to stay in the queue for further delivery attempts. When a temporary error has occurred for a message it is put at the end of the queue in order for other messages to be delivered meanwhile. It is possible to specify a maximum number of delivery attempts after which the message will be considered undeliverable and will be removed from the queue.

Reply
  • The messaging protocols, including the proprietary MGP, all include functionality to send and receive messages.

    In general, messages are kept in the queue for the connector through which they should be sent until successfully sent or until a permanent error has occurred. Most errors are considered temporary though and will cause the message to stay in the queue for further delivery attempts. When a temporary error has occurred for a message it is put at the end of the queue in order for other messages to be delivered meanwhile. It is possible to specify a maximum number of delivery attempts after which the message will be considered undeliverable and will be removed from the queue.

Children
No Data
Related