Bluetooth: Mesh: Config opt for friend adv latency
Adds Kconfig option to enable tuning the Friend receive delay window. Friend poll events can be made more efficient by compensating for the time the non-ideal advertising latency otherwise would add to the receive delay. Signed-off-by: Anders Storrø <anders.storro@nordicsemi.no>
This commit is contained in:
parent
a1bb9c9d17
commit
bedace2105
2 changed files with 10 additions and 1 deletions
|
@ -878,6 +878,15 @@ config BT_MESH_FRIEND_SEG_RX
|
|||
many elements we can simultaneously be receiving segmented
|
||||
messages from when the messages are going into the Friend queue.
|
||||
|
||||
config BT_MESH_FRIEND_ADV_LATENCY
|
||||
int "Latency for enabling advertising"
|
||||
default 0
|
||||
help
|
||||
Latency in milliseconds that it takes to start friend advertising
|
||||
after requesting it. Used to tune the receive delay window to make
|
||||
Friend poll events more efficient by compensating for the time the
|
||||
non-ideal latency otherwise would add to the delay.
|
||||
|
||||
endif # BT_MESH_FRIEND
|
||||
|
||||
config BT_MESH_CFG_CLI
|
||||
|
|
|
@ -1034,7 +1034,7 @@ init_friend:
|
|||
frnd->lpn = rx->ctx.addr;
|
||||
frnd->num_elem = msg->num_elem;
|
||||
frnd->subnet = rx->sub;
|
||||
frnd->recv_delay = msg->recv_delay;
|
||||
frnd->recv_delay = msg->recv_delay - CONFIG_BT_MESH_FRIEND_ADV_LATENCY;
|
||||
frnd->poll_to = poll_to * 100U;
|
||||
frnd->lpn_counter = sys_be16_to_cpu(msg->lpn_counter);
|
||||
frnd->clear.frnd = sys_be16_to_cpu(msg->prev_addr);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue