switch (opcode) {
case BT_HCI_CMD_WRITE_SCAN_ENABLE:
case BT_HCI_CMD_LE_SET_ADV_ENABLE:
+ case BT_HCI_CMD_LE_SET_EXT_ADV_ENABLE:
tester_print("Client set connectable: %s (0x%02x)",
mgmt_errstr(status), status);
if (!status && test->client_enable_ssp) {
bthost = hciemu_client_get_host(data->hciemu);
bthost_set_cmd_complete_cb(bthost, client_cmd_complete, data);
- if (data->hciemu_type == HCIEMU_TYPE_LE || test->client_enable_adv)
- bthost_set_adv_enable(bthost, 0x01);
- else
+
+ if (data->hciemu_type == HCIEMU_TYPE_LE ||
+ test->client_enable_adv) {
+ if (data->hciemu_type == HCIEMU_TYPE_BREDRLE50)
+ bthost_set_ext_adv_enable(bthost, 0x01);
+ else
+ bthost_set_adv_enable(bthost, 0x01);
+ } else
bthost_write_scan_enable(bthost, 0x03);
}
tester_print("Device connected");
test_add_condition(data);
- hciemu_add_hook(data->hciemu, HCIEMU_HOOK_POST_CMD,
- BT_HCI_CMD_LE_SET_ADV_ENABLE,
- test_adv_enable_hook, data);
+
+ if (data->hciemu_type == HCIEMU_TYPE_BREDRLE50)
+ hciemu_add_hook(data->hciemu, HCIEMU_HOOK_POST_CMD,
+ BT_HCI_CMD_LE_SET_EXT_ADV_ENABLE,
+ test_adv_enable_hook, data);
+ else
+ hciemu_add_hook(data->hciemu, HCIEMU_HOOK_POST_CMD,
+ BT_HCI_CMD_LE_SET_ADV_ENABLE,
+ test_adv_enable_hook, data);
/* Make sure we get not disconnected during the testaces */
mgmt_register(data->mgmt_alt, MGMT_EV_DEVICE_DISCONNECTED,
}
bthost = hciemu_client_get_host(data->hciemu);
- bthost_hci_connect(bthost, master_bdaddr, BDADDR_LE_PUBLIC);
+ if (data->hciemu_type == HCIEMU_TYPE_BREDRLE50)
+ bthost_hci_ext_connect(bthost, master_bdaddr, BDADDR_LE_PUBLIC);
+ else
+ bthost_hci_connect(bthost, master_bdaddr, BDADDR_LE_PUBLIC);
}
static void test_connected_and_advertising(const void *test_data)
&device_found_invalid_field,
NULL, test_device_found);
+ test_bredrle50_full("Ext Adv. connectable & connected (slave) - Success",
+ &conn_slave_adv_conneactable_test,
+ setup_advertise_while_connected,
+ test_connected_and_advertising, 10);
+
+ test_bredrle50_full("Ext Adv. non-connectable & connected (slave) - Success",
+ &conn_slave_adv_non_conneactable_test,
+ setup_advertise_while_connected,
+ test_connected_and_advertising, 10);
+
+ test_bredrle50_full("Ext Adv. connectable & connected (master) - Success",
+ &conn_master_adv_conneactable_test,
+ setup_advertise_while_connected,
+ test_connected_and_advertising, 10);
+
+ test_bredrle50_full("Ext Adv. non-connectable & connected (master) - Success",
+ &conn_master_adv_non_conneactable_test,
+ setup_advertise_while_connected,
+ test_connected_and_advertising, 10);
+
return tester_run();
}