Bluetooth: Add support for entering limited discoverable mode
Subsystems (2)
Marcel Holtmann
maintainerPATCH 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
@@ -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
Marcel Holtmann
maintainerHi,
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
Signed-off-by Marcel Holtmann <[email protected]>---
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