From d7fdc9d059e1168e6b8a0275d2bb2b307fd54bbe Mon Sep 17 00:00:00 2001 From: Johan Hedberg Date: Wed, 8 Jan 2014 16:06:23 +0200 Subject: [PATCH] emulator: Set bthost PIN Code when specified by test case --- tools/mgmt-tester.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tools/mgmt-tester.c b/tools/mgmt-tester.c index 2a71f72eb..c518e47d7 100644 --- a/tools/mgmt-tester.c +++ b/tools/mgmt-tester.c @@ -2646,10 +2646,14 @@ static void test_setup(const void *test_data) const struct generic_data *test = data->test_data; const uint16_t *cmd; - if (test->pin) + if (test->pin) { + struct bthost *bthost = hciemu_client_get_host(data->hciemu); + + bthost_set_pin_code(bthost, test->pin, test->pin_len); mgmt_register(data->mgmt, MGMT_EV_PIN_CODE_REQUEST, data->mgmt_index, pin_code_request_callback, data, NULL); + } if (!test || !test->setup_settings) { if (data->test_setup) -- 2.47.3