Re: Subscribing to heartbeat messages in a mesh network


Steve Brown
 

Hi Ashish,

On Tue, 2017-12-26 at 17:47 +0530, ashish.shukla@corvi.com wrote:
Hello everyone !!

I'm trying to work with heartbeat messages. I'm using android app by
silicon Labs for provisioning and configuring so I can't subscribe
and publish heartbeat messages using this app.

On the other hand, there is command for publishing heartbeat messages
in meshctl, so I'm able to publish heartbeat messages. but, there
isn't any command to subscribe for heartbeat messages.

I understand that this needs to done using configuration client,still
I want to know if there is a way to subscribe just for testing
purposes?

Can I use these lines of code I found at /mesh_demo/src.c in my
main.c file, hard coding the addresses


struct bt_mesh_cfg_hb_sub sub = {
.src = PUBLISHER_ADDR,
.dst = GROUP_ADDR,
.period = 0x10,
};

bt_mesh_cfg_hb_sub_set(net_idx, addr, &sub, NULL);

though adding these lines gives compilation error in my code.

--
Warm regards,
Ashish Shukla
Jr. Embedded Engineer
Research & Development
www.corvi.com

If the target of heartbeat publish is 0077 (meshctl's unicast address),
it will display the returned status.

Steve

Join users@lists.zephyrproject.org to automatically receive all group messages.