diff --git a/tools/btiotest.c b/tools/btiotest.c
index a77eba1..b06367b 100644
--- a/tools/btiotest.c
+++ b/tools/btiotest.c
#include <glib.h>
+#include <bluetooth/bluetooth.h>
+
#include <btio/btio.h>
#define DEFAULT_ACCEPT_TIMEOUT 2
{
struct io_data *data;
GError *err = NULL;
+ uint8_t src_type;
printf("Connecting to %s L2CAP PSM %u\n", dst, psm);
data = io_data_new(NULL, -1, disconn, -1);
+ if (addr_type != BDADDR_BREDR)
+ src_type = BDADDR_LE_PUBLIC;
+ else
+ src_type = BDADDR_BREDR;
+
if (src)
data->io = bt_io_connect(connect_cb, data,
(GDestroyNotify) io_data_unref,
&err,
BT_IO_OPT_SOURCE, src,
+ BT_IO_OPT_SOURCE_TYPE, src_type,
BT_IO_OPT_DEST, dst,
BT_IO_OPT_DEST_TYPE, addr_type,
BT_IO_OPT_PSM, psm,
data->io = bt_io_connect(connect_cb, data,
(GDestroyNotify) io_data_unref,
&err,
+ BT_IO_OPT_SOURCE_TYPE, src_type,
BT_IO_OPT_DEST, dst,
BT_IO_OPT_DEST_TYPE, addr_type,
BT_IO_OPT_PSM, psm,