1 /*
2  * Copyright (c) 2024 Nordic Semiconductor ASA
3  *
4  * SPDX-License-Identifier: Apache-2.0
5  */
6 
7 #include <zephyr/kernel.h>
8 #include <zephyr/bluetooth/bluetooth.h>
9 #include <zephyr/bluetooth/conn.h>
10 #include <zephyr/bluetooth/att.h>
11 #include <zephyr/bluetooth/gatt.h>
12 #include <zephyr/logging/log.h>
13 
14 #include "testlib/adv.h"
15 #include "testlib/att_read.h"
16 #include "testlib/att_write.h"
17 #include "testlib/conn.h"
18 
19 #include "babblekit/flags.h"
20 #include "babblekit/testcase.h"
21 
entrypoint_peer(void)22 void entrypoint_peer(void)
23 {
24 	int err;
25 	struct bt_conn *conn;
26 
27 	/* Mark test as in progress. */
28 	TEST_START("peer");
29 
30 	/* Initialize Bluetooth */
31 	err = bt_enable(NULL);
32 	TEST_ASSERT(err == 0, "Can't enable Bluetooth (err %d)", err);
33 
34 	err = bt_testlib_adv_conn(&conn, BT_ID_DEFAULT, bt_get_name());
35 	TEST_ASSERT(!err, "Failed to start connectable advertising (err %d)", err);
36 
37 	TEST_PASS("peer");
38 }
39