我试图让两个节点在 Friend/LPN 配置中工作,但是当我重新启动或深度睡眠 LPN(其 BLE 设置设置为持久,即节点自动重新加入网格并记住友谊)时,我看到 Friend 节点终止友谊,有时甚至在 LPN 重新启动并开启几秒钟之后。目前他们在 menuconfig 中仅设置为 Friend/LPN,我还没有开始添加任何特定于此的代码行。我怎样才能防止这种情况发生?时间似乎不是全部问题,因为即使 LPN 几乎立即再次醒来,即按下重置按钮,友谊也会终止。
友谊通常会迅速重建,但一开始就不应该失去。
潜在相关 - 时不时地(不一致),当 LPN 醒来时它会想出
代码:
W (16372) BLE_MESH: Retrying the first Friend Poll, 1 attempts
W (16802) BLE_MESH: Retrying the first Friend Poll, 2 attempts
W (17222) BLE_MESH: Retrying the first Friend Poll, 3 attempts
W (17652) BLE_MESH: Retrying the first Friend Poll, 4 attempts
W (18082) BLE_MESH: Retrying the first Friend Poll, 5 attempts
E (18512) BLE_MESH:
timeout waiting for the first Friend Update
W (18522) EXAMPLE: FRIENDSHIP TERMINATED
W (25102) EXAMPLE: FRIENDSHIP ESTABLISHED
在朋友方面,我有时会看到相应的消息
代码:
W (1554539) BLE_MESH: Existing LPN re-requesting Friendship
W (1554539) EXAMPLE: FRIENDSHIP TERMINATED
W (1554929) BLE_MESH: No matching LPN addr 0x0012
W (1555329) BLE_MESH: No matching LPN addr 0x0012
W (1555769) BLE_MESH: No matching LPN addr 0x0012
W (1555879) BLE_MESH: Friendship not established with 0x0012
W (1563849) EXAMPLE: FRIENDSHIP ESTABLISHED
或(在不同的时间)代码:
W (135069) BLE_MESH: Friendship lost with 0x0012
你能给我这个项目的代码吗?我有这部分的作业,但我不知道如何实施。