Page 1 of 1

Ble mesh示例onoff_server中心跳消息Heartbeat的发布和订阅的疑问

Posted: Sat Apr 08, 2023 10:08 am
by hzlijianjun
各位好!我在运行ble mesh的示例工程,遇到疑问,请指点!

环境:
开发板:ESP32-DEVKITC-V4
ESP-IDF SDK:V5.0

目的:想利用Configuration Server Mode心跳消息做节点在线监测;
操作:
1)在运行onoff_server示例程序的A节点,利用nRF Mesh安卓APP,配置主元素下的Configuration Server Mode模型,让它发布heartbeat心跳消息到组地址0xC000。
2)在运行onoff_server示例程序的B节点,利用nRF Mesh安卓APP,配置主元素下的Configuration Server Mode模型,让它从组地址0xC000订阅heartbeat心跳消息。观察日志显示成功,在esp_ble_mesh_register_prov_callback()注册的回调函数中,定时收到ESP_BLE_MESH_HEARTBEAT_MESSAGE_RECV_EVT;

问题:
1)我能否在onoff_server示例程序中利用esp_ble_mesh_model_subscribe_group_addr()方法,编码的方式接收A节点发布到组地址0xC000上的心跳消息?我测试了不成功。
2)上面操作订阅的心跳事件ESP_BLE_MESH_HEARTBEAT_MESSAGE_RECV_EVT,接收在esp_ble_mesh_register_prov_callback()注册的回调函数,而不是esp_ble_mesh_register_config_server_callback()注册的回调函数中,这一底层程序的实现是否不匹配?

Re: Ble mesh示例onoff_server中心跳消息Heartbeat的发布和订阅的疑问

Posted: Wed Jul 05, 2023 8:19 am
by XiongJL001
感觉乐鑫都不屑于回答这些问题

Re: Ble mesh示例onoff_server中心跳消息Heartbeat的发布和订阅的疑问

Posted: Wed Jul 19, 2023 6:14 am
by ESP_@In逍遥子
实在抱歉,漏回复这条。

您可以参考这个示例,开发 heartbeat
blemesh_bridge_keepalive_sync_status.zip
(135.8 KiB) Downloaded 547 times