summaryrefslogtreecommitdiff
path: root/android/tester-bluetooth.c
diff options
context:
space:
mode:
authorJakub Tyszkowski <jakub.tyszkowski@tieto.com>2014-09-24 10:39:21 +0200
committerSzymon Janc <szymon.janc@gmail.com>2014-09-24 21:28:23 +0200
commit6fc3527720b5538eb20d4a0fc68e9edfc58ab742 (patch)
tree43b6a7eacf3907fb2994f192c7abc9ba0acac998 /android/tester-bluetooth.c
parent0c7c4a6cc852dba0fa90a1af47a22e6256eef963 (diff)
downloadbluez-6fc3527720b5538eb20d4a0fc68e9edfc58ab742.tar.gz
android/tester: Explicitly set IO capabilities for SSP pairing tests
Those tests are periodically broken every time default IO capabalities are changed. This patch sets them explicitely to avoid this breakage.
Diffstat (limited to 'android/tester-bluetooth.c')
-rw-r--r--android/tester-bluetooth.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/android/tester-bluetooth.c b/android/tester-bluetooth.c
index a97e28eec..2be824d55 100644
--- a/android/tester-bluetooth.c
+++ b/android/tester-bluetooth.c
@@ -448,6 +448,10 @@ static struct bt_action_data no_input_no_output_io_cap = {
.io_cap = 0x03,
};
+static struct bt_action_data display_yes_no_io_cap = {
+ .io_cap = 0x01,
+};
+
static uint16_t test_conn_handle = 0;
static void conn_cb(uint16_t handle, void *user_data)
@@ -1034,6 +1038,7 @@ static struct test_case test_cases[] = {
CALLBACK_STATE(CB_BT_ADAPTER_STATE_CHANGED, BT_STATE_ON),
ACTION_SUCCESS(emu_setup_powered_remote_action, NULL),
ACTION_SUCCESS(emu_set_ssp_mode_action, NULL),
+ ACTION_SUCCESS(emu_set_io_cap, &display_yes_no_io_cap),
ACTION_SUCCESS(bt_start_discovery_action, NULL),
CALLBACK_STATE(CB_BT_DISCOVERY_STATE_CHANGED,
BT_DISCOVERY_STARTED),
@@ -1057,6 +1062,7 @@ static struct test_case test_cases[] = {
CALLBACK_STATE(CB_BT_ADAPTER_STATE_CHANGED, BT_STATE_ON),
ACTION_SUCCESS(emu_setup_powered_remote_action, NULL),
ACTION_SUCCESS(emu_set_ssp_mode_action, NULL),
+ ACTION_SUCCESS(emu_set_io_cap, &display_yes_no_io_cap),
ACTION_SUCCESS(bt_start_discovery_action, NULL),
CALLBACK_STATE(CB_BT_DISCOVERY_STATE_CHANGED,
BT_DISCOVERY_STARTED),
@@ -1081,6 +1087,7 @@ static struct test_case test_cases[] = {
CALLBACK_STATE(CB_BT_ADAPTER_STATE_CHANGED, BT_STATE_ON),
ACTION_SUCCESS(emu_setup_powered_remote_action, NULL),
ACTION_SUCCESS(emu_set_ssp_mode_action, NULL),
+ ACTION_SUCCESS(emu_set_io_cap, &display_yes_no_io_cap),
ACTION_SUCCESS(bt_create_bond_action,
&prop_test_remote_ble_bdaddr_req),
CALLBACK_BOND_STATE(BT_BOND_STATE_BONDING,
@@ -1113,6 +1120,7 @@ static struct test_case test_cases[] = {
CALLBACK_STATE(CB_BT_ADAPTER_STATE_CHANGED, BT_STATE_ON),
ACTION_SUCCESS(emu_setup_powered_remote_action, NULL),
ACTION_SUCCESS(emu_set_ssp_mode_action, NULL),
+ ACTION_SUCCESS(emu_set_io_cap, &display_yes_no_io_cap),
ACTION_SUCCESS(bt_start_discovery_action, NULL),
CALLBACK_STATE(CB_BT_DISCOVERY_STATE_CHANGED,
BT_DISCOVERY_STARTED),
@@ -1138,6 +1146,7 @@ static struct test_case test_cases[] = {
CALLBACK_STATE(CB_BT_ADAPTER_STATE_CHANGED, BT_STATE_ON),
ACTION_SUCCESS(emu_setup_powered_remote_action, NULL),
ACTION_SUCCESS(emu_set_ssp_mode_action, NULL),
+ ACTION_SUCCESS(emu_set_io_cap, &display_yes_no_io_cap),
ACTION_SUCCESS(bt_start_discovery_action, NULL),
CALLBACK_STATE(CB_BT_DISCOVERY_STATE_CHANGED,
BT_DISCOVERY_STARTED),