diff --git a/android/tester-gatt.c b/android/tester-gatt.c
index 979a1de..b680322 100644
--- a/android/tester-gatt.c
+++ b/android/tester-gatt.c
static const uint8_t exchange_mtu_req_pdu[] = { 0x02, 0xa0, 0x02 };
static const uint8_t exchange_mtu_resp_pdu[] = { 0x03, 0xa0, 0x02 };
+static struct bt_action_data bearer_type = {
+ .bearer_type = BDADDR_LE_PUBLIC,
+};
+
static void gatt_client_register_action(void)
{
struct test_data *data = tester_get_data();
CALLBACK_STATUS(CB_GATTC_REGISTER_CLIENT, BT_STATUS_SUCCESS),
ACTION_SUCCESS(gatt_client_do_listen_action, &client1_conn_req),
CALLBACK_STATUS(CB_GATTC_LISTEN, GATT_STATUS_SUCCESS),
- ACTION_SUCCESS(emu_remote_connect_hci_action, NULL),
+ ACTION_SUCCESS(emu_remote_connect_hci_action, &bearer_type),
CALLBACK_GATTC_CONNECT(GATT_STATUS_SUCCESS,
prop_emu_remotes_default_set,
CONN1_ID, CLIENT1_ID),
CALLBACK_STATUS(CB_GATTC_REGISTER_CLIENT, BT_STATUS_SUCCESS),
ACTION_SUCCESS(gatt_client_do_listen_action, &client1_conn_req),
CALLBACK_STATUS(CB_GATTC_LISTEN, GATT_STATUS_SUCCESS),
- ACTION_SUCCESS(emu_remote_connect_hci_action, NULL),
+ ACTION_SUCCESS(emu_remote_connect_hci_action, &bearer_type),
CALLBACK_GATTC_CONNECT(GATT_STATUS_SUCCESS,
prop_emu_remotes_default_set,
CONN1_ID, CLIENT1_ID),
BT_ACL_STATE_DISCONNECTED),
ACTION_SUCCESS(gatt_client_do_listen_action, &client1_conn_req),
CALLBACK_STATUS(CB_GATTC_LISTEN, GATT_STATUS_SUCCESS),
- ACTION_SUCCESS(emu_remote_connect_hci_action, NULL),
+ ACTION_SUCCESS(emu_remote_connect_hci_action, &bearer_type),
CALLBACK_GATTC_CONNECT(GATT_STATUS_SUCCESS,
prop_emu_remotes_default_set,
CONN2_ID, CLIENT1_ID),
diff --git a/android/tester-main.c b/android/tester-main.c
index c41ce1c..310efb0 100644
--- a/android/tester-main.c
+++ b/android/tester-main.c
{
struct test_data *data = tester_get_data();
struct bthost *bthost = hciemu_client_get_host(data->hciemu);
+ struct step *current_data_step = queue_peek_head(data->steps);
+ struct bt_action_data *action_data = current_data_step->set_data;
struct step *step = g_new0(struct step, 1);
const uint8_t *master_addr;
tester_print("Trying to connect hci");
- bthost_hci_connect(bthost, master_addr, BDADDR_LE_PUBLIC);
+ if (action_data)
+ bthost_hci_connect(bthost, master_addr,
+ action_data->bearer_type);
+ else
+ bthost_hci_connect(bthost, master_addr, BDADDR_BREDR);
step->action_status = BT_STATUS_SUCCESS;
diff --git a/android/tester-main.h b/android/tester-main.h
index 3331e91..e83933a 100644
--- a/android/tester-main.h
+++ b/android/tester-main.h
/* HidHost params */
const int report_size;
+
+ /*Connection params*/
+ const uint8_t bearer_type;
};
/* bthost's l2cap server setup parameters */