Re: Subscribing to heartbeat messages in a mesh network

Steve Brown

Hi Ashish 

On Dec 27, 2017, at 12:19 AM, "ashish.shukla@..." <ashish.shukla@...> wrote:


Thanks Steve, it works as expected.

I watched a video on youtube by Johan, in which he demonstrates working of heartbeat messages. Which means he's developed some means to subscribe to Heartbeat messages as well. Is there some other way if I want to subscribe to heartbeat messages except meshctl?

Warm regards,
Ashish Shukla
Jr. Embedded Engineer
Research & Development

Please consider the environment before printing this e-mail or its attachments.

Disclaimer: The information contained herein (including any accompanying documents) is confidential and is intended solely for the addressee(s). If you have erroneously received this message, please immediately delete it and notify the sender. Also, if you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or taking any action in reliance on the contents of this message or any accompanying document is strictly prohibited and is unlawful. The organization is not responsible for any damage caused by a virus or alteration of the e-mail by a third party or otherwise. The contents of this message may not necessarily represent the views or policies of Corvi

On Tue, Dec 26, 2017 at 5:58 PM, Steve Brown <sbrown@...> wrote:
Hi Ashish,

On Tue, 2017-12-26 at 17:47 +0530, ashish.shukla@... 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
If the target of heartbeat publish is 0077 (meshctl's unicast address),
it will display the returned status.


There isn’t a heartbeat subscribe command in meshctl. It wouldn’t be hard to add. Take a look at the code and add it. I’m on vacation for a couple of weeks

Join { to automatically receive all group messages.