From 843bcadcb2b3aae086ab0ae40872d9daebfb86bb Mon Sep 17 00:00:00 2001 From: Johan Hedberg Date: Mon, 4 Mar 2013 15:47:33 +0200 Subject: [PATCH] tools/mgmt-tester: Add basic Set Fast Connectable test case --- tools/mgmt-tester.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/tools/mgmt-tester.c b/tools/mgmt-tester.c index 9abc0d4f0..6343221f2 100644 --- a/tools/mgmt-tester.c +++ b/tools/mgmt-tester.c @@ -608,6 +608,19 @@ static const struct generic_data set_connectable_off_success_test_2 = { .expect_hci_len = sizeof(set_connectable_off_scan_enable_param), }; +static const char set_fast_conn_on_param[] = { 0x01 }; +static const char set_fast_conn_on_settings_1[] = { 0x87, 0x00, 0x00, 0x00 }; + +static const struct generic_data set_fast_conn_on_success_test_1 = { + .send_opcode = MGMT_OP_SET_FAST_CONNECTABLE, + .send_param = set_fast_conn_on_param, + .send_len = sizeof(set_fast_conn_on_param), + .expect_status = MGMT_STATUS_SUCCESS, + .expect_param = set_fast_conn_on_settings_1, + .expect_len = sizeof(set_fast_conn_on_settings_1), + .expect_settings_set = MGMT_SETTING_FAST_CONNECTABLE, +}; + static const char set_pairable_on_param[] = { 0x01 }; static const char set_pairable_invalid_param[] = { 0x02 }; static const char set_pairable_garbage_param[] = { 0x01, 0x00 }; @@ -2345,6 +2358,10 @@ int main(int argc, char *argv[]) setup_connectable_powered, test_command_generic); + test_bredrle("Set fast connectable on - Success 1", + &set_fast_conn_on_success_test_1, + setup_powered_connectable, test_command_generic); + test_bredrle("Set pairable on - Success", &set_pairable_on_success_test, NULL, test_command_generic); -- 2.47.3