Get data sent time in mesh model

Hello

I want the example code how to implement the time model i.e get the time, when the particular data is sent from server and received in client side along with the data(eg: temperature data : 23.5, temperature published at time : 15:30)

Hope i get the answer as soon as possible.

Thank You

Best Regards

  • Hi SaSu,

    There seems to be some mixed-up terminologies here, so please answer some questions to clarify your setup and requirement first.

    • When you say Time Model, do you mean to setup a Time Model as described in section 5 Time and Scenes of this document?
      Mesh Model – BluetoothRegistered Technology Website

    • If you are talking about Bluetooth Mesh, how is your data being sent? Do you have your own Vendor Model or are you using a standard Sensor Model?
      If you are using your own Vendor Model, you can update your message however you like.
      If you are using a specified Model, the message has to follow the specification, and adding a timestamp should not be done. For this, if you describe your setup and requirement motivation better maybe we can find a workaround.

    Best regards,

    Hieu

  • Hello

    • I am following the nordic documentation, and i am talking about Time models this(FYI: I dont know whether we have that feature in this documentation). And I did not verify in bluetooth official page.
    • My goal is : we already have Bluetooth: Mesh Sensor acts as mesh server and Bluetooth: Mesh sensor observer acts as mesh client right? for that code i need to integrate some time function(FYI: No idea which function or code it is thats my question here) for date and time.
    • For example in this mesh setup we get "Chip temperature" value in client sent from server where we can see on the console screen may be on PuTTY or RTT Console. Along with that value i need at what time and when did the value was taken from the sensor(eg:Chip temperature : 23.5, temperature taken at time : 15:30, date of temperature taken : 28-11-2022) something like that.
    • FYI I am using thingy-53 with nRF5340_DK for Sensor_Server and nRF 52840_DK for Sensor_Client
    • Any example code or what functions is needed to get the data like above? Need Assistance.

    Regards

  • Unfortunately, it seems there are no existing sample code for time sync with Bluetooth Mesh.


    Devices running Bluetooth Mesh and BLE cannot just get the true real time. How do you intend to sync real time information to your devices?

    Using the Time Model is appropriate. It solves syncing time for almost all nodes. However, you still need to sync real time for the Time Server with an external source. What would this external source be?

    Depends on that, it might be faster for you to just sync time manually for all nodes instead of using the Time Models.

    An example consideration is: If your nodes often reset (so lose the time sync), then you probably don't want to have to manually sync time every reset.

    • My plan is to sync real time information via laptop or pc but i have no idea how it is possible also need help regarding this.
    • To use Time Model also which function exactly is possible with?
    • When i sync the realtime from external source(i.e., laptop) to the Time Server which function exactly i need to use?
    • And can you clearly explain the example consideration?
  • Please be inform that due to some health problems I am out of office today and likely the rest of the week. As you have expressed request for urgent support, I will request someone from my team to follow up with you instead.

Related