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

I want to send temperature (using existing sensor on nRF DK) data from server to client.

Hello,

I want to use existing Generic light switch model to send temperature sensor data from server to client.

using Light switch example of nRF Mesh V2.2.0.

Functionality of Light Switch:

  • The Button 1 on the client board turns ON LED 1 on the servers with Odd addresses.
  • The Button 2 on the client board turns OFF LED 1 on the servers with Odd addresses.
  • The Button 3 on the client board turns ON LED 1 on the servers with Even addresses.
  • The Button 4 on the client board turns OFF LED 1 on the servers with Even addresses 

Like wise without disturbing the existing functionality I want to send temperature data.

while pressing button 1 on client board It has to get temperature data from server and display it on RTT viewer. 

while pressing button 3 also on client board It has to get temperature data from server and display it on RTT viewer. 

along with that by pressing button 3 on server it has to send temperature data of the server to client.

please help me.

  • Extracting in the client means reply message from server (which includes present on off state of LED and temperature value).

    Yes, value is changing as soon as it reaches the client (Even though I am sending random number instead of temperature value from the server it's displaying  the same value 1966080 every time).

  • Sorry for the delayed response. I have been on business travel the last few days & have unfortunately been unable to take a look at this case.

    What about the present on off state of the LED? Is this showing the correct value?

    Have you tried only using the standard light switch client & server example with the generic on off client & server models & seeing if you can send a status message from the server to the client by pressing button 1 on the server? Does this work?

    What about if you update the client button event handler to send a get message to the server, which should send a status message back to the client? 

    It seems you are testing with the regular light switch example (i.e. provisioning via the provisioner & not via the proxy nodes & nRF Mesh), correct? Are you using three boards at the moment (one provisioner, one client & one server)?

    This case explains what I mean a bit better.

  • What about the present on off state of the LED? Is this showing the correct value?

    Yes, It is showing correct value

    Have you tried only using the standard light switch client & server example with the generic on off client & server models & seeing if you can send a status message from the server to the client by pressing button 1 on the server? Does this work?

    Yes, it is working, but temperature value is changing at client side.

    What about if you update the client button event handler to send a get message to the server, which should send a status message back to the client? 

    Even I tried from client side also, still temperature value changing.

    It seems you are testing with the regular light switch example (i.e. provisioning via the provisioner & not via the proxy nodes & nRF Mesh), correct? Are you using three boards at the moment (one provisioner, one client & one server)?

    Yes, I am using three boards.

    Again I am explaining my issue:

    I am sending temperature data from server to client using following ways

    1) when client sends get message to the server

    2) when server publishing LED status to client by pressing button one.

    Status of LED is correct, but temperature value is changing.

Related