Add functions for reading the BD_ADDR and the features
diff --git a/include/hci.h b/include/hci.h
index d2efb5f..6e41642 100644
--- a/include/hci.h
+++ b/include/hci.h
@@ -762,6 +762,7 @@
 	uint8_t		status;
 	uint8_t		features[8];
 } __attribute__ ((packed)) read_local_features_rp;
+#define READ_LOCAL_FEATURES_RP_SIZE 9
 
 #define OCF_READ_BUFFER_SIZE		0x0005
 typedef struct {
@@ -771,12 +772,14 @@
 	uint16_t	acl_max_pkt;
 	uint16_t	sco_max_pkt;
 } __attribute__ ((packed)) read_buffer_size_rp;
+#define READ_BUFFER_SIZE_RP_SIZE 8
 
 #define OCF_READ_BD_ADDR		0x0009
 typedef struct {
 	uint8_t		status;
 	bdaddr_t	bdaddr;
 } __attribute__ ((packed)) read_bd_addr_rp;
+#define READ_BD_ADDR_RP_SIZE 7
 
 /* Status params */
 #define OGF_STATUS_PARAM	0x05
diff --git a/include/hci_lib.h b/include/hci_lib.h
index 7c53f0e..1e5ecc9 100644
--- a/include/hci_lib.h
+++ b/include/hci_lib.h
@@ -73,6 +73,8 @@
 int hci_read_remote_version(int dd, uint16_t handle, struct hci_version *ver, int to);
 int hci_read_clock_offset(int dd, uint16_t handle, uint16_t *clkoffset, int to);
 int hci_read_local_version(int dd, struct hci_version *ver, int to);
+int hci_read_local_features(int dd, uint8_t *features, int to);
+int hci_read_bd_addr(int dd, bdaddr_t *bdaddr, int to);
 int hci_read_class_of_dev(int dd, uint8_t *cls, int to);
 int hci_write_class_of_dev(int dd, uint32_t cls, int to);
 int hci_read_voice_setting(int dd, uint16_t *vs, int to);
diff --git a/src/hci.c b/src/hci.c
index a68f012..822c7db 100644
--- a/src/hci.c
+++ b/src/hci.c
@@ -1042,6 +1042,52 @@
 	return 0;
 }
 
+int hci_read_local_features(int dd, uint8_t *features, int to)
+{
+	read_local_features_rp rp;
+	struct hci_request rq;
+
+	memset(&rq, 0, sizeof(rq));
+	rq.ogf    = OGF_INFO_PARAM;
+	rq.ocf    = OCF_READ_LOCAL_FEATURES;
+	rq.rparam = &rp;
+	rq.rlen   = READ_LOCAL_FEATURES_RP_SIZE;
+
+	if (hci_send_req(dd, &rq, to) < 0)
+		return -1;
+
+	if (rp.status) {
+		errno = EIO;
+		return -1;
+	}
+
+	memcpy(features, rp.features, 8);
+	return 0;
+}
+
+int hci_read_bd_addr(int dd, bdaddr_t *bdaddr, int to)
+{
+	read_bd_addr_rp rp;
+	struct hci_request rq;
+
+	memset(&rq, 0, sizeof(rq));
+	rq.ogf    = OGF_INFO_PARAM;
+	rq.ocf    = OCF_READ_BD_ADDR;
+	rq.rparam = &rp;
+	rq.rlen   = READ_BD_ADDR_RP_SIZE;
+
+	if (hci_send_req(dd, &rq, to) < 0)
+		return -1;
+
+	if (rp.status) {
+		errno = EIO;
+		return -1;
+	}
+
+	bacpy(bdaddr, &rp.bdaddr);
+	return 0;
+}
+
 int hci_read_class_of_dev(int dd, uint8_t *cls, int to)
 {
 	read_class_of_dev_rp rp;