Bluetooth: Add local Extended Inquiry Response (EIR) support
Subsystems (2)
PATCH v2 1/1 Bluetooth: Add local Extended Inquiry Response (EIR) support
From: Johan Hedberg <[email protected]>
This patch adds automated creation of the local EIR data based on what 16-bit UUIDs are registered and what the device name is. This should cover the majority use cases, however things like 32/128-bit UUIDs, TX power and Device ID will need to be added later to be on par with what bluetoothd is capable of doing (without the Management interface).
---
v2: Updated to assume that the UUIDs are in little endian byte order like like all other data types in the management interface.
include/net/bluetooth/hci.h | 8 ++ include/net/bluetooth/hci_core.h | 1 + net/bluetooth/mgmt.c | 163 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 172 insertions(+), 0 deletions(-)
include/net/bluetooth/hci.h +8 -0
@@ -614,6 +614,14 @@ struct hci_cp_host_buffer_size {#define HCI_OP_WRITE_INQUIRY_MODE 0x0c45 +#define HCI_MAX_EIR_LENGTH 240 + +#define HCI_OP_WRITE_EIR 0x0c52 +struct hci_cp_write_eir { +uint8_t fec; +uint8_t data[HCI_MAX_EIR_LENGTH ]; +} __packed; +#define HCI_OP_READ_SSP_MODE 0x0c55struct hci_rp_read_ssp_mode {__u8 status;
include/net/bluetooth/hci_core.h +1 -0
@@ -102,6 +102,7 @@ struct hci_dev {__u8 dev_type;bdaddr_t bdaddr;__u8 dev_name[HCI_MAX_NAME_LENGTH ]; +__u8 eir[HCI_MAX_EIR_LENGTH ];__u8 dev_class[3 ];__u8 major_class;__u8 minor_class;
net/bluetooth/mgmt.c +163 -0
199 lines not on this page · raw message
Signature · 1 line
1.7.4.1
Hi Johan,
Quoted 9 lines · * [email protected] <[email protected]> [2011-03-28 14:07:23 +0300]:
From: Johan Hedberg <[email protected]>
This patch adds automated creation of the local EIR data based on what 16-bit UUIDs are registered and what the device name is. This should cover the majority use cases, however things like 32/128-bit UUIDs, TX power and Device ID will need to be added later to be on par with what bluetoothd is capable of doing (without the Management interface).
Signed-off-by Johan Hedberg <[email protected]>
Quoted 8 lines
---
v2: Updated to assume that the UUIDs are in little endian byte order like like all other data types in the management interface.include/net/bluetooth/hci.h | 8 ++ include/net/bluetooth/hci_core.h | 1 + net/bluetooth/mgmt.c | 163 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 172 insertions(+), 0 deletions(-)
Patch has been applied. Thanks.
Signature · 2 lines
Gustavo F. Padovan http://profusion.mobi