This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

measure total time required to send message from client to sever and server acknowledges that message to client using BLE MESH stack (2.0.1)

Hi...,

i have measured round trip delay from client to server.

Now I want to measure total time required to send  message from server to client and client acknowledges that message to server using BLE MESH stack (2.0.1) light-switch example demo.

is it possible or Not..?

Thanks,

-Nikunj Patidar

  • This should be possible. You can use the log_timestamp_get() function located in log.h to get a timestamp & then have logging enabled via RTT for example to see when the message gets sent from the server & when the server gets the ACK from the client. Then, you just compare the difference between both timestamps to figure out the total time.

  • in onoff light switch demo example, server only send light status to client. in that case, as i assume, client will not acknowledge to that message.so using that, i can not able to measure round trip delay.

    is there Any different way to measure roundtrip delay?

      

  • Hi  Bjorn Kvaale,

    I'm waiting for reply from you.

  • What if you just send a message back from the client to the server? In the client_status_cb in the light switch client example, you receive the server_index of whichever server status you have received. If you add logging information to this variable & test the mesh with two server boards, whenever you press button 1 on the first provisioned server -> the server_index returns 0. When you press button 1 on the server provisioned in afterwards, the server_index returns 1.

    Therefore, I believe you should be able to find the roundtrip delay by sending a new message by calling

    simple_on_off_client_set(&m_clients[server_index], false) in both these two cases: SIMPLE_ON_OFF_STATUS_ON & SIMPLE_ON_OFF_STATUS_OFF in the client example.

    You could then use the log_timestamp_get() function to get a timestamp when you press button 1 on one of the servers & get a new timestamp when you get the set command in the on_off_server_set_cb in the light switch server.

  • Hi Bjorn

    I want to test latency using BLE MESH 2.0.1 Light Switch Example Code...I have modify simple on off Light Switch Example.

    Example test Using two Development kit 52832. One Device Configure as a non-proxy client and another as a non-proxy server.no other node in mesh network i want to test latency between two device. 

    i have attached sheet of readings taken with 10,50,250 byte.

    3162.BLE_Mesh_Message_Roundtrip_Calculation_NonProxyClient.xls

    50 and 250 byte round trip delay is higher.is it possible to reduce it or not..?

    Thank's

    Nikunj

1 2