mirror of
https://github.com/espressif/esp-nimble.git
synced 2026-09-27 03:07:22 +00:00
mesh: Fixes LPN poll timeout gradually grow
`POLL_TIMEOUT_MAX` should use `CONFIG_BT_MESH_LPN_POLL_TIMEOUT` instead of `CONFIG_BT_MESH_LPN_INIT_POLL_TIMEOUT`. The described algorithm to grow the poll timeout implemented in function poll_timeout does not work with this implementation. It's a regression in 3b4d58a Bluetooth: Mesh: optimize performance for lpn node This is port of aea9adfc8968e9210a4f58ac493fdc074478527b
This commit is contained in:
committed by
Łukasz Rymanowski
parent
efbebd1549
commit
68e7bb8065
@@ -48,11 +48,13 @@
|
||||
|
||||
#define POLL_TIMEOUT_INIT (MYNEWT_VAL(BLE_MESH_LPN_INIT_POLL_TIMEOUT) * 100)
|
||||
|
||||
#define POLL_TIMEOUT (MYNEWT_VAL(BLE_MESH_LPN_RECV_DELAY) * 100)
|
||||
|
||||
#define REQ_ATTEMPTS_MAX 6
|
||||
#define REQ_ATTEMPTS(lpn) MIN(REQ_ATTEMPTS_MAX, \
|
||||
POLL_TIMEOUT_INIT / REQ_RETRY_DURATION(lpn))
|
||||
POLL_TIMEOUT / REQ_RETRY_DURATION(lpn))
|
||||
|
||||
#define POLL_TIMEOUT_MAX(lpn) (POLL_TIMEOUT_INIT - \
|
||||
#define POLL_TIMEOUT_MAX(lpn) (POLL_TIMEOUT - \
|
||||
(REQ_ATTEMPTS(lpn) * REQ_RETRY_DURATION(lpn)))
|
||||
|
||||
#define CLEAR_ATTEMPTS 3
|
||||
|
||||
@@ -436,6 +436,16 @@ syscfg.defs:
|
||||
a value of 300 means 30 seconds.
|
||||
value: 300
|
||||
|
||||
BLE_MESH_LPN_POLL_TIMEOUT:
|
||||
description: >
|
||||
PollTimeout timer is used to measure time between two
|
||||
consecutive requests sent by the Low Power node. If no
|
||||
requests are received by the Friend node before the
|
||||
PollTimeout timer expires, then the friendship is considered
|
||||
terminated. The value is in units of 100 milliseconds, so e.g.
|
||||
a value of 300 means 30 seconds.
|
||||
value: 300
|
||||
|
||||
BLE_MESH_LPN_INIT_POLL_TIMEOUT:
|
||||
description: >
|
||||
The initial value of the PollTimeout timer when Friendship
|
||||
|
||||
Reference in New Issue
Block a user