From 06d1782c51219f5be864288f3769092c41b00a92 Mon Sep 17 00:00:00 2001 From: Johan Hedberg Date: Tue, 16 Sep 2014 16:36:32 +0300 Subject: [PATCH] tools/mgmt-tester: Add basic LE pairing acceptor test case --- tools/mgmt-tester.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/tools/mgmt-tester.c b/tools/mgmt-tester.c index 0987c02e9..333d9245a 100644 --- a/tools/mgmt-tester.c +++ b/tools/mgmt-tester.c @@ -2734,6 +2734,21 @@ static const struct generic_data pairing_acceptor_ssp_4 = { .client_auth_req = 0x02, /* Dedicated Bonding - No MITM */ }; +static uint16_t settings_powered_bondable_connectable_advertising[] = { + MGMT_OP_SET_BONDABLE, + MGMT_OP_SET_CONNECTABLE, + MGMT_OP_SET_ADVERTISING, + MGMT_OP_SET_POWERED, 0 }; + +static const struct generic_data pairing_acceptor_le_1 = { + .setup_settings = settings_powered_bondable_connectable_advertising, + .io_cap = 0x03, /* NoInputNoOutput */ + .client_io_cap = 0x03, /* NoInputNoOutput */ + .just_works = true, + .expect_alt_ev = MGMT_EV_NEW_LONG_TERM_KEY, + .expect_alt_ev_len = sizeof(struct mgmt_ev_new_long_term_key), +}; + static const char unpair_device_param[] = { 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x00, 0x00 }; static const char unpair_device_rsp[] = { @@ -4549,6 +4564,9 @@ int main(int argc, char *argv[]) test_bredrle("Pairing Acceptor - SSP 4", &pairing_acceptor_ssp_4, setup_ssp_acceptor, test_pairing_acceptor); + test_le("Pairing Acceptor - LE 1", + &pairing_acceptor_le_1, NULL, + test_pairing_acceptor); test_bredrle("Unpair Device - Not Powered 1", &unpair_device_not_powered_test_1, -- 2.47.3