Diff between 1ba4a4fff3e2942ad646cf0980194034305df11f and d7fdc9d059e1168e6b8a0275d2bb2b307fd54bbe

Changed Files

File Additions Deletions Status
tools/mgmt-tester.c +5 -1 modified

Full Patch

diff --git a/tools/mgmt-tester.c b/tools/mgmt-tester.c
index 2a71f72..c518e47 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)