Hi dear Nordic engineers and enthusiasts,
I am currently testing and researching on the functionalities of Nordic Thingy 52 in Bluetooth Mesh. I have tested with the provided mesh provisioning demo:
and it is indeed cool.
In the mesh demo, the client is able to send a message (button pressed), and then the server which subscribe will react eventually. It works well.
Now it comes to my question that is it possible for the servers (the lamps for instance, thingy in the case here) to send the pass the following messages on via (in) mesh network to a gateway (e.g. Raspberry Pi 3):
I had tried to understand the codes behind the mesh provisioning demo provided by Nordic. It seems that heartbeat.c publish heartbeat message, but I am still figuring the way to retrieve this message at the gateway. Besides, the temperature data should be able to be passed via the mesh network right?, beside the functionalities of button pressed, e.g. in the GPIOTE_IRQHandler.
I sincerely appreciate your time and effort looking into this concern. Thank you so much! I am looking ward to hearing from you.
In the provisioning demo, if you configure the publication address of the light bulb (the server), it will send a message to the publication address when the state is changed. You can make your own model to do similar thing to report the temperature.
I don't think you can add the battery status to the heartbeat. It meant to have only the initial TTL to know how far a node is to the other.
You can think of using health message instead. But it also has a limitation that the client has to subscribe to the server. Group address is not possible.
In your case I would think of making your own proprietary model to broadcast data about the battery.
Note that the demo was based on an old SDK: v2.2. The current SDK is v3.1 . I would suggest to start your development on a new SDK.
Hi Hung Bui,
Thank you for your kind reply and insights. I have some following questions:
I appreciate your time Hung Bui. I hope to hear from you again.
1. What do you meant by "temperature data" ? Are you planning to have an external temperature sensor ? Or you want to collect the temperature data from the internal sensor ? If you plan to collect the temperature internally on the chip, you need to call sd_temp_get()
2. You can configure the health client to send the health message to the gateway and it will be forwarded by other nodes to the gateway. But the gateway need to subscribe to that health client. And other nodes wouldn't read that message, they will only forward.
I'm not sure why SES couldn't find it. But if you have a look at the nrf_soc.h file, you can find the SD_TEMP_GET API call defined.
Ahh, so the SD_TEMP_GET is the Supervisor Call (SVC) numbers used, it will execute the temperature measurement on SoC. Meanwhile p_temp is the result I need from the temperature measurement. Am I right?
Correct, it's a blocking function. It will return after the temperature is measured and put into p_temp.