Bluetooth: Allow to configure LE Create Connection timeout
Depending on perhiperal advertising interval 3 seconds might not be enough and would result in cancelling pending connection. Make this Kconfig configurable and let application to decide. Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl>
This commit is contained in:
parent
e2c590a0c4
commit
f0f4147a57
2 changed files with 5 additions and 1 deletions
|
@ -387,6 +387,10 @@ config BT_PERIPHERAL_PREF_TIMEOUT
|
|||
where Conn_Interval_Max is given in milliseconds.
|
||||
endif # BT_GAP_PERIPHERAL_PREF_PARAMS
|
||||
|
||||
config BT_CREATE_CONN_TIMEOUT
|
||||
int "Timeout for pending LE Create Connection command in seconds"
|
||||
default 3
|
||||
range 1 65535
|
||||
endif # BT_CONN
|
||||
|
||||
if BT_OBSERVER
|
||||
|
|
|
@ -57,7 +57,7 @@ NET_BUF_POOL_FIXED_DEFINE(frag_pool, CONFIG_BT_L2CAP_TX_FRAG_COUNT, FRAG_SIZE,
|
|||
#endif /* CONFIG_BT_L2CAP_TX_FRAG_COUNT > 0 */
|
||||
|
||||
/* How long until we cancel HCI_LE_Create_Connection */
|
||||
#define CONN_TIMEOUT K_SECONDS(3)
|
||||
#define CONN_TIMEOUT K_SECONDS(CONFIG_BT_CREATE_CONN_TIMEOUT)
|
||||
|
||||
#if defined(CONFIG_BT_SMP) || defined(CONFIG_BT_BREDR)
|
||||
const struct bt_conn_auth_cb *bt_auth;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue