BLE Mesh Model for data transfer

Hi Team,

I am working on NRF52832 based on the BLE mesh protocol

here I am using the Light_switch example of SDK - nrf5sdkformeshv500src

I have a basic understanding of the Light_switch  working 

Here I need to view message data that publish from the Light_switch - Client,  I used to print the log in J-link RTT viewer
 but I got different results each time while taping the buttons 3 and 4 (un-acknowledged transaction)

for(int i=0;i<p_tx_message->length;i++)
{
__LOG(LOG_SRC_APP, LOG_LEVEL_INFO, "%x \n",*((p_tx_message->p_buffer)+i));
}

status = packet_tx(handle, p_tx_message, p_rx_message, p_payload, payload_length);

I think they were encryption on the tx data

I need to view the original data (tx message) published by the client

Thanks in Advance

Best Regards,
Venkatraaman J S.
Parents
  • Hi Venkatraaman, 

    Could you let me know where exactly you put this code: 


    for(int i=0;i<p_tx_message->length;i++)
    {
    __LOG(LOG_SRC_APP, LOG_LEVEL_INFO, "%x \n",*((p_tx_message->p_buffer)+i));
    }

    In which file and which function ? 

    If you want to print out the message come out (and in) of access layer, you can add your own log inside access.c file. 
    If you look for packet_tx() function you can find at the end of the function you can print out the message that's going out of access layer ("TX:") 

    On the other side you can print out the message arrives at access layer by adding your log into mesh_msg_handle() function where "RX:" is printed. 

Reply
  • Hi Venkatraaman, 

    Could you let me know where exactly you put this code: 


    for(int i=0;i<p_tx_message->length;i++)
    {
    __LOG(LOG_SRC_APP, LOG_LEVEL_INFO, "%x \n",*((p_tx_message->p_buffer)+i));
    }

    In which file and which function ? 

    If you want to print out the message come out (and in) of access layer, you can add your own log inside access.c file. 
    If you look for packet_tx() function you can find at the end of the function you can print out the message that's going out of access layer ("TX:") 

    On the other side you can print out the message arrives at access layer by adding your log into mesh_msg_handle() function where "RX:" is printed. 

Children
Related