1 /* 2 * Copyright (c) 2022 Nordic Semiconductor ASA 3 * 4 * SPDX-License-Identifier: Apache-2.0 5 */ 6 7 #include "bs_bt_utils.h" 8 #include <zephyr/bluetooth/addr.h> 9 #include <zephyr/bluetooth/conn.h> 10 11 #include <stdint.h> 12 13 #include <zephyr/bluetooth/bluetooth.h> 14 central(void)15void central(void) 16 { 17 bs_bt_utils_setup(); 18 19 printk("== Bonding id a ==\n"); 20 scan_connect_to_first_result(); 21 wait_connected(); 22 set_security(BT_SECURITY_L2); 23 TAKE_FLAG(flag_pairing_complete); 24 disconnect(); 25 wait_disconnected(); 26 clear_g_conn(); 27 28 printk("== Bonding id b ==\n"); 29 scan_connect_to_first_result(); 30 wait_connected(); 31 set_security(BT_SECURITY_L2); 32 wait_disconnected(); 33 PASS("PASS\n"); 34 } 35