mirror of
https://github.com/espressif/esp-nimble.git
synced 2026-08-24 02:40:00 +00:00
mesh: Change the default value to syscfg
Move default value of segment retransmit and timeout value to syscfg. this is port of 4acfd5f6aff7d77ee4c5eec218864ec9693d2b7c
This commit is contained in:
committed by
Łukasz Rymanowski
parent
b25a1a88ef
commit
baf1549bc8
@@ -47,7 +47,7 @@
|
||||
#define XACT_ID_NVAL 0xff
|
||||
#define SEG_NVAL 0xff
|
||||
|
||||
#define RETRANSMIT_TIMEOUT K_MSEC(500)
|
||||
#define RETRANSMIT_TIMEOUT K_MSEC(MYNEWT_VAL(BLE_MESH_PB_ADV_RETRANS_TIMEOUT))
|
||||
#define BUF_TIMEOUT K_MSEC(400)
|
||||
#define CLOSING_TIMEOUT K_SECONDS(3)
|
||||
#define TRANSACTION_TIMEOUT K_SECONDS(30)
|
||||
|
||||
@@ -51,12 +51,14 @@
|
||||
* We use 400 since 300 is a common send duration for standard HCI, and we
|
||||
* need to have a timeout that's bigger than that.
|
||||
*/
|
||||
#define SEG_RETRANSMIT_TIMEOUT_UNICAST(tx) (K_MSEC(400) + 50 * (tx)->ttl)
|
||||
#define SEG_RETRANSMIT_TIMEOUT_UNICAST(tx) \
|
||||
(MYNEWT_VAL(BLE_MESH_TX_SEG_RETRANS_TIMEOUT_UNICAST) + 50 * (tx)->ttl)
|
||||
/* When sending to a group, the messages are not acknowledged, and there's no
|
||||
* reason to delay the repetitions significantly. Delaying by more than 0 ms
|
||||
* to avoid flooding the network.
|
||||
*/
|
||||
#define SEG_RETRANSMIT_TIMEOUT_GROUP K_MSEC(50)
|
||||
#define SEG_RETRANSMIT_TIMEOUT_GROUP \
|
||||
MYNEWT_VAL(BLE_MESH_TX_SEG_RETRANS_TIMEOUT_GROUP)
|
||||
|
||||
#define SEG_RETRANSMIT_TIMEOUT(tx) \
|
||||
(BT_MESH_ADDR_IS_UNICAST(tx->dst) ? \
|
||||
|
||||
@@ -35,6 +35,11 @@ syscfg.defs:
|
||||
device sends unprovisioned beacon.
|
||||
value: 5
|
||||
|
||||
BLE_MESH_PB_ADV_RETRANS_TIMEOUT:
|
||||
description: >
|
||||
Timeout value of retransmit provisioning PDUs.
|
||||
value: 500
|
||||
|
||||
BLE_MESH_PROVISIONER:
|
||||
description: >
|
||||
Enable this option to have support for provisioning remote devices.
|
||||
@@ -264,6 +269,22 @@ syscfg.defs:
|
||||
Loopback is used when the device sends messages to itself.
|
||||
value: 3
|
||||
|
||||
BLE_MESH_TX_SEG_RETRANS_COUNT:
|
||||
description: >
|
||||
Maximum number of transport message segment retransmit attempts
|
||||
for outgoing segment message.
|
||||
value: 4
|
||||
|
||||
BLE_MESH_TX_SEG_RETRANS_TIMEOUT_UNICAST:
|
||||
description: >
|
||||
Maximum time of retransmit segment message to unicast address.
|
||||
value: 400
|
||||
|
||||
BLE_MESH_TX_SEG_RETRANS_TIMEOUT_GROUP:
|
||||
description: >
|
||||
Maximum time of retransmit segment message to group address.
|
||||
value: 50
|
||||
|
||||
BLE_MESH_SEG_RETRANSMIT_ATTEMPTS:
|
||||
description: >
|
||||
Number of retransmit attempts (after the initial transmit) per segment
|
||||
|
||||
@@ -1168,10 +1168,26 @@
|
||||
#define MYNEWT_VAL_BLE_MESH_UNPROV_BEACON_INT (5)
|
||||
#endif
|
||||
|
||||
#ifndef MYNEWT_VAL_BLE_MESH_PB_ADV_RETRANS_TIMEOUT
|
||||
#define MYNEWT_VAL_BLE_MESH_PB_ADV_RETRANS_TIMEOUT (500)
|
||||
#endif
|
||||
|
||||
#ifndef MYNEWT_VAL_BLE_MESH_TX_SEG_MSG_COUNT
|
||||
#define MYNEWT_VAL_BLE_MESH_TX_SEG_MSG_COUNT (4)
|
||||
#endif
|
||||
|
||||
#ifndef MYNEWT_VAL_BLE_MESH_TX_SEG_RETRANS_COUNT
|
||||
#define MYNEWT_VAL_BLE_MESH_TX_SEG_RETRANS_COUNT (4)
|
||||
#endif
|
||||
|
||||
#ifndef MYNEWT_VAL_BLE_MESH_TX_SEG_RETRANS_TIMEOUT_UNICAST
|
||||
#define MYNEWT_VAL_BLE_MESH_TX_SEG_RETRANS_TIMEOUT_UNICAST (400)
|
||||
#endif
|
||||
|
||||
#ifndef MYNEWT_VAL_BLE_MESH_TX_SEG_RETRANS_TIMEOUT_GROUP
|
||||
#define MYNEWT_VAL_BLE_MESH_TX_SEG_RETRANS_TIMEOUT_GROUP (50)
|
||||
#endif
|
||||
|
||||
#ifndef MYNEWT_VAL_BLE_MESH_LOOPBACK_BUFS
|
||||
#define MYNEWT_VAL_BLE_MESH_LOOPBACK_BUFS (3)
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user