Hi everyone,
I am curretly struggling with displaying the heartbeat messages trough UART in mesh.
I used the bt mesh sensor example as a starting point. I set up a mesh sensor server on a nrf52840dongle which sends some random data periodically to a mesh sensor client (observer example) which is programmed to a nrf52840DK. Provisioning (trough nrf mesh app) and sending/receiving sensor values is working properly.
Now i want to display the heartbeat messages. In the nrf mesh app I set up the heartbeat messages as follows:
Sensor Server is publishing heartbeat messages to the sensor client address destination with period of 4 seconds and a count of something above 1024 which is definetly enough time to receive and display the data. Through the nrf mesh app I set up the subscription of the sensor client to the heartbeat message of the sensor server with a period of at least half an hour. When I now click the refresh button I can see the incoming heartbeat messages from the sensor server.
Now my problem:
I want to display the incoming heatbeat messages on the console, so I implemented the heartbeat feature as follows:
I also setup the definition for the heartbeat callback as follows:
However when I build the application I get the warning that "'hb_cb' defined but not used [-Wunused-variable]" and nothing from the heartbeat is displayed in the serial monitor although I can see through nrf mesh app that messages are received.
Am I missing something?
I am using nRF Connect SDK v2.6.0
Best,
Toni