Skip to content

Commit 21d74b6

Browse files
maheshtalewadVudentz
authored andcommitted
LE Create Connection command timeout increased to 20 secs
On our DUT, we can see that the host issues create connection cancel command after 4-sec if there is no connection complete event for LE create connection cmd. As per core spec v5.3 section 7.8.5, advertisement interval range is- Advertising_Interval_Min Default : 0x0800(1.28s) Time Range: 20ms to 10.24s Advertising_Interval_Max Default : 0x0800(1.28s) Time Range: 20ms to 10.24s If the remote device is using adv interval of > 4 sec, it is difficult to make a connection with the current timeout value. Also, with the default interval of 1.28 sec, we will get only 3 chances to capture the adv packets with the 4 sec window. Hence we want to increase this timeout to 20sec. Signed-off-by: Mahesh Talewad <[email protected]> Signed-off-by: Luiz Augusto von Dentz <[email protected]>
1 parent defa9cc commit 21d74b6

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

include/net/bluetooth/hci.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -456,7 +456,6 @@ enum {
456456
#define HCI_AUTO_OFF_TIMEOUT msecs_to_jiffies(2000) /* 2 seconds */
457457
#define HCI_ACL_CONN_TIMEOUT msecs_to_jiffies(20000) /* 20 seconds */
458458
#define HCI_LE_CONN_TIMEOUT msecs_to_jiffies(20000) /* 20 seconds */
459-
#define HCI_LE_AUTOCONN_TIMEOUT msecs_to_jiffies(4000) /* 4 seconds */
460459

461460
/* HCI data types */
462461
#define HCI_COMMAND_PKT 0x01

net/bluetooth/hci_core.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2556,7 +2556,7 @@ struct hci_dev *hci_alloc_dev_priv(int sizeof_priv)
25562556
hdev->le_rx_def_phys = HCI_LE_SET_PHY_1M;
25572557
hdev->le_num_of_adv_sets = HCI_MAX_ADV_INSTANCES;
25582558
hdev->def_multi_adv_rotation_duration = HCI_DEFAULT_ADV_DURATION;
2559-
hdev->def_le_autoconnect_timeout = HCI_LE_AUTOCONN_TIMEOUT;
2559+
hdev->def_le_autoconnect_timeout = HCI_LE_CONN_TIMEOUT;
25602560
hdev->min_le_tx_power = HCI_TX_POWER_INVALID;
25612561
hdev->max_le_tx_power = HCI_TX_POWER_INVALID;
25622562

0 commit comments

Comments
 (0)