Skip to contentSkip to conversation

Bluetooth: Add timeout for LE connection attempts

PATCH Marcel Holtmann 1 participant 1 message Feb 28, 2014 2 messages not in the archive Bluetooth drivers

lore
Share & tools
lore

Marcel Holtmann

author maintainer
#2 lore raw
In reply to a message not in the archive

Hi Johan,

Quoted 10 lines

LE connection attempts do not have a controller side timeout in the same way as BR/EDR has (in form of the page timeout). Since we always do scanning before initiating connections the attempts are always expected to succeed in some reasonable time.

This patch adds a timer which forces a cancellation of the connection attempt within 20 seconds if it has not been successful by then. This way we e.g. ensure that mgmt_pair_device times out eventually and gives an error response.

Quoted 7 lines

---

include/net/bluetooth/hci.h      |  1 +
include/net/bluetooth/hci_core.h |  1 +
net/bluetooth/hci_conn.c         | 13 +++++++++++++
net/bluetooth/hci_event.c        | 12 ++++++++++++
4 files changed, 27 insertions(+)

both patches have been applied to bluetooth-next tree.

Regards

Marcel