Skip to contentSkip to conversation

Bluetooth: Add support for entering limited discoverable mode

PATCH In review Marcel Holtmann 1 participant 2 messages Oct 15, 2013

Subsystems (2)
lore
Share & tools
lore

Marcel Holtmann

author maintainer
#0 lore raw

PATCH 1/2 Bluetooth: Add support for entering limited discoverable mode

The limited discoverable mode should be used when a device is only discoverable for a certain amount of time and after that it returns back into being non-discoverable.

The management interface allows to specify a timeout parameter when makeing a device discoverable. If such a timeout is specified or changed, enter limited discoverable mode. Otherwise enter general discoverable mode.

Devices in limited discoverable mode can still be found by the general discovery procedure. It is mandatory that a device sets both GIAC and LIAC when entering limited discoverable mode.

---
 include/net/bluetooth/hci.h |  6 ++++++
 net/bluetooth/mgmt.c        | 41 +++++++++++++++++++++++++++++++++++++----
 2 files changed, 43 insertions(+), 4 deletions(-)
include/net/bluetooth/hci.h +6 -0
index b096f5f..ab96f3b 100644
@@ -823,6 +823,12 @@ struct hci_rp_read_num_supported_iac {
 
 #define HCI_OP_READ_CURRENT_IAC_LAP	0x0c39
 
+#define HCI_OP_WRITE_CURRENT_IAC_LAP	0x0c3a
+struct hci_cp_write_current_iac_lap {
+	__u8	num_iac;
+	__u8	iac_lap[6];
+} __packed;
+
 #define HCI_OP_WRITE_INQUIRY_MODE	0x0c45
 
 #define HCI_MAX_EIR_LENGTH		240
net/bluetooth/mgmt.c +37 -4

61 lines not on this page · raw message

Signature · 1 line
1.8.3.1
author maintainer
#1 lore raw

Hi,

Quoted 13 lines

The limited discoverable mode should be used when a device is only discoverable for a certain amount of time and after that it returns back into being non-discoverable.

The management interface allows to specify a timeout parameter when makeing a device discoverable. If such a timeout is specified or changed, enter limited discoverable mode. Otherwise enter general discoverable mode.

Devices in limited discoverable mode can still be found by the general discovery procedure. It is mandatory that a device sets both GIAC and LIAC when entering limited discoverable mode.

Quoted 5 lines

---
include/net/bluetooth/hci.h | 6 ++++++
net/bluetooth/mgmt.c | 41 +++++++++++++++++++++++++++++++++++++----

2 files changed, 43 insertions(+), 4 deletions(-)

I send this by accident. It is the same as the last one and better be not applied. I am re-working this one right now.

Regards

Marcel