diff --git a/mgmt/main.c b/mgmt/main.c
index 6c1d015..e46e9d5 100644
--- a/mgmt/main.c
+++ b/mgmt/main.c
#include <bluetooth/bluetooth.h>
#include <bluetooth/hci.h>
+#include <bluetooth/hci_lib.h>
#include <bluetooth/mgmt.h>
#ifndef NELEM
static void cmd_find(int mgmt_sk, uint16_t index, int argc, char **argv)
{
+ uint8_t device_type;
+
if (index == MGMT_INDEX_NONE)
index = 0;
- if (mgmt_send_cmd(mgmt_sk, MGMT_OP_START_DISCOVERY, index, NULL, 0,
- find_rsp, NULL) < 0) {
- fprintf(stderr, "Unable to send get_connections cmd\n");
+ device_type = 0;
+ hci_set_bit(MGMT_ADDR_BREDR, &device_type);
+ hci_set_bit(MGMT_ADDR_LE_PUBLIC, &device_type);
+ hci_set_bit(MGMT_ADDR_LE_RANDOM, &device_type);
+
+ if (mgmt_send_cmd(mgmt_sk, MGMT_OP_START_DISCOVERY, index,
+ &device_type, sizeof(device_type),
+ find_rsp, NULL) < 0) {
+ fprintf(stderr, "Unable to send start_discovery cmd\n");
exit(EXIT_FAILURE);
}
}