Home
last modified time | relevance | path

Searched refs:g_conn (Results 1 – 25 of 30) sorted by relevance

12

/Zephyr-latest/tests/bsim/bluetooth/host/gatt/sc_indicate/src/
Dbs_bt_utils.c19 struct bt_conn *g_conn; variable
46 return g_conn; in get_g_conn()
53 conn = g_conn; in clear_g_conn()
54 g_conn = NULL; in clear_g_conn()
61 BSIM_ASSERT((!g_conn || (conn == g_conn)), "Unexpected new connection."); in connected()
63 if (!g_conn) { in connected()
64 g_conn = bt_conn_ref(conn); in connected()
89 if (g_conn != NULL) { in stop_scan_and_connect()
99 err = bt_conn_le_create(addr, BT_CONN_LE_CREATE_CONN, BT_LE_CONN_PARAM_DEFAULT, &g_conn); in stop_scan_and_connect()
115 err = bt_conn_disconnect(g_conn, BT_HCI_ERR_REMOTE_USER_TERM_CONN); in disconnect()
[all …]
/Zephyr-latest/tests/bsim/bluetooth/host/att/eatt_notif/src/
Dclient_test.c28 static struct bt_conn *g_conn; variable
57 if (conn != g_conn) { in disconnected()
65 bt_conn_unref(g_conn); in disconnected()
67 g_conn = NULL; in disconnected()
91 if (g_conn != NULL) { in device_found()
111 BT_LE_CONN_PARAM_DEFAULT, &g_conn); in device_found()
123 err = bt_gatt_notify(g_conn, local_attr, &sample_dat, sizeof(sample_dat)); in send_notification()
158 err = bt_gatt_discover(g_conn, &discover_params); in gatt_discover()
191 err = bt_conn_set_security(g_conn, BT_SECURITY_L2); in test_main()
198 err = bt_eatt_connect(g_conn, CONFIG_BT_EATT_MAX); in test_main()
[all …]
Dserver_test.c17 static struct bt_conn *g_conn; variable
31 g_conn = bt_conn_ref(conn); in connected()
39 if (conn != g_conn) { in disconnected()
47 bt_conn_unref(g_conn); in disconnected()
49 g_conn = NULL; in disconnected()
120 err = bt_gatt_discover(g_conn, &discover_params); in gatt_discover()
169 err = bt_gatt_subscribe(g_conn, &subscribe_params); in gatt_subscribe()
203 while (bt_eatt_count(g_conn) < CONFIG_BT_EATT_MAX) { in test_main()
/Zephyr-latest/tests/bsim/bluetooth/host/security/bond_overwrite_allowed/src/
Dbs_bt_utils.c31 struct bt_conn *g_conn; variable
51 ASSERT((!g_conn || (conn == g_conn)), "Unexpected new connection."); in connected()
53 if (!g_conn) { in connected()
54 g_conn = bt_conn_ref(conn); in connected()
74 conn = g_conn; in clear_g_conn()
75 g_conn = NULL; in clear_g_conn()
115 if (g_conn != NULL) { in scan_connect_to_first_result__device_found()
130 err = bt_conn_le_create(addr, BT_CONN_LE_CREATE_CONN, BT_LE_CONN_PARAM_DEFAULT, &g_conn); in scan_connect_to_first_result__device_found()
146 err = bt_conn_disconnect(g_conn, BT_HCI_ERR_REMOTE_USER_TERM_CONN); in disconnect()
154 err = bt_conn_set_security(g_conn, sec); in set_security()
Dcentral.c35 id_b = *bt_conn_get_dst(g_conn); in central()
43 ASSERT(bt_addr_le_eq(bt_conn_get_dst(g_conn), &id_b), in central()
Dperipheral.c35 central = *bt_conn_get_dst(g_conn); in peripheral()
45 ASSERT(bt_addr_le_eq(bt_conn_get_dst(g_conn), &central), in peripheral()
/Zephyr-latest/tests/bsim/bluetooth/host/security/bond_overwrite_denied/src/
Dbs_bt_utils.c31 struct bt_conn *g_conn; variable
51 ASSERT((!g_conn || (conn == g_conn)), "Unexpected new connection."); in connected()
53 if (!g_conn) { in connected()
54 g_conn = bt_conn_ref(conn); in connected()
74 conn = g_conn; in clear_g_conn()
75 g_conn = NULL; in clear_g_conn()
115 if (g_conn != NULL) { in scan_connect_to_first_result__device_found()
130 err = bt_conn_le_create(addr, BT_CONN_LE_CREATE_CONN, BT_LE_CONN_PARAM_DEFAULT, &g_conn); in scan_connect_to_first_result__device_found()
146 err = bt_conn_disconnect(g_conn, BT_HCI_ERR_REMOTE_USER_TERM_CONN); in disconnect()
154 err = bt_conn_set_security(g_conn, sec); in set_security()
/Zephyr-latest/tests/bsim/bluetooth/host/security/security_changed_callback/src/
Dbs_bt_utils.c33 struct bt_conn *g_conn; variable
58 ASSERT((!g_conn || (conn == g_conn)), "Unexpected new connection."); in connected()
60 if (!g_conn) { in connected()
61 g_conn = bt_conn_ref(conn); in connected()
82 conn = g_conn; in clear_g_conn()
83 g_conn = NULL; in clear_g_conn()
140 if (g_conn != NULL) { in stop_scan_and_connect()
150 err = bt_conn_le_create(addr, BT_CONN_LE_CREATE_CONN, BT_LE_CONN_PARAM_DEFAULT, &g_conn); in stop_scan_and_connect()
166 err = bt_conn_set_security(g_conn, sec); in set_security()
/Zephyr-latest/tests/bsim/bluetooth/host/security/bond_per_connection/src/
Dbs_bt_utils.c31 struct bt_conn *g_conn; variable
53 ASSERT((!g_conn || (conn == g_conn)), "Unexpected new connection."); in connected()
55 if (!g_conn) { in connected()
56 g_conn = bt_conn_ref(conn); in connected()
80 conn = g_conn; in clear_g_conn()
81 g_conn = NULL; in clear_g_conn()
128 if (g_conn != NULL) { in scan_connect_to_first_result__device_found()
143 err = bt_conn_le_create(addr, BT_CONN_LE_CREATE_CONN, BT_LE_CONN_PARAM_DEFAULT, &g_conn); in scan_connect_to_first_result__device_found()
159 err = bt_conn_disconnect(g_conn, BT_HCI_ERR_REMOTE_USER_TERM_CONN); in disconnect()
175 err = bt_conn_set_security(g_conn, sec); in set_security()
/Zephyr-latest/tests/bsim/bluetooth/host/misc/unregister_conn_cb/src/
Dmain.c19 static struct bt_conn *g_conn; variable
34 __ASSERT_NO_MSG(g_conn == NULL); in connected()
35 g_conn = bt_conn_ref(conn); in connected()
43 if (conn != g_conn) { in disconnected()
51 bt_conn_unref(g_conn); in disconnected()
52 g_conn = NULL; in disconnected()
68 if (g_conn != NULL) { in device_found()
194 err = bt_conn_disconnect(g_conn, 0x13); in test_central_main()
/Zephyr-latest/tests/bsim/bluetooth/host/misc/disable/src/
Dgatt_client_test.c17 static struct bt_conn *g_conn; variable
41 g_conn = conn; in connected()
49 if (conn != g_conn) { in disconnected()
57 bt_conn_unref(g_conn); in disconnected()
59 g_conn = NULL; in disconnected()
74 if (g_conn != NULL) { in device_found()
94 BT_LE_CONN_PARAM_DEFAULT, &g_conn); in device_found()
162 err = bt_gatt_discover(g_conn, &discover_params); in gatt_discover()
203 err = bt_gatt_write(g_conn, &write_params); in gatt_write()
253 err = bt_gatt_read(g_conn, &read_params); in gatt_read()
[all …]
/Zephyr-latest/tests/bsim/bluetooth/host/gatt/notify_multiple/src/
Dgatt_client_test.c19 static struct bt_conn *g_conn; variable
61 if (conn != g_conn) { in disconnected()
69 bt_conn_unref(g_conn); in disconnected()
71 g_conn = NULL; in disconnected()
97 if (g_conn != NULL) { in device_found()
116 err = bt_conn_le_create(addr, BT_CONN_LE_CREATE_CONN, BT_LE_CONN_PARAM_DEFAULT, &g_conn); in device_found()
188 err = bt_gatt_discover(g_conn, &discover_params); in gatt_discover()
278 err = bt_gatt_write(g_conn, &write_params); in write_csf()
292 err = bt_gatt_subscribe(g_conn, params); in subscribe()
294 err = bt_gatt_unsubscribe(g_conn, params); in subscribe()
[all …]
Dgatt_server_test.c15 static struct bt_conn *g_conn; variable
34 g_conn = bt_conn_ref(conn); in connected()
42 if (conn != g_conn) { in disconnected()
50 bt_conn_unref(g_conn); in disconnected()
52 g_conn = NULL; in disconnected()
122 err = bt_gatt_notify_multiple(g_conn, ARRAY_SIZE(params), params); in multiple_notify()
/Zephyr-latest/tests/bsim/bluetooth/host/gatt/caching/src/
Dgatt_server_test.c14 static struct bt_conn *g_conn; variable
30 g_conn = bt_conn_ref(conn); in connected()
38 if (conn != g_conn) { in disconnected()
46 bt_conn_unref(g_conn); in disconnected()
48 g_conn = NULL; in disconnected()
118 err = bt_eatt_connect(g_conn, CONFIG_BT_EATT_MAX); in test_main_common()
Dgatt_client_test.c20 static struct bt_conn *g_conn; variable
46 if (conn != g_conn) { in disconnected()
54 bt_conn_unref(g_conn); in disconnected()
56 g_conn = NULL; in disconnected()
82 if (g_conn != NULL) { in device_found()
102 err = bt_conn_le_create(addr, BT_CONN_LE_CREATE_CONN, BT_LE_CONN_PARAM_DEFAULT, &g_conn); in device_found()
172 err = bt_gatt_discover(g_conn, &discover_params); in gatt_discover()
275 err = bt_gatt_read(g_conn, read_params); in gatt_read()
311 err = bt_gatt_write(g_conn, &write_params); in enable_robust_caching()
340 err = bt_conn_set_security(g_conn, BT_SECURITY_L2); in test_main_common()
[all …]
/Zephyr-latest/tests/bsim/bluetooth/host/gatt/authorization/src/
Dgatt_client_test.c17 static struct bt_conn *g_conn; variable
40 __ASSERT_NO_MSG(g_conn == conn); in connected()
49 if (conn != g_conn) { in disconnected()
57 bt_conn_unref(g_conn); in disconnected()
59 g_conn = NULL; in disconnected()
74 if (g_conn != NULL) { in device_found()
94 BT_LE_CONN_PARAM_DEFAULT, &g_conn); in device_found()
169 err = bt_gatt_discover(g_conn, &discover_params); in gatt_discover()
208 err = bt_gatt_write(g_conn, &write_params); in gatt_write()
232 err = bt_gatt_write(g_conn, &write_params); in gatt_cp_write()
[all …]
Dgatt_server_test.c13 static struct bt_conn *g_conn; variable
28 g_conn = bt_conn_ref(conn); in connected()
35 if (conn != g_conn) { in disconnected()
43 bt_conn_unref(g_conn); in disconnected()
45 g_conn = NULL; in disconnected()
/Zephyr-latest/tests/bsim/bluetooth/host/gatt/notify/src/
Dgatt_client_test.c18 static struct bt_conn *g_conn; variable
43 if (conn != g_conn) { in disconnected()
51 bt_conn_unref(g_conn); in disconnected()
53 g_conn = NULL; in disconnected()
79 if (g_conn != NULL) { in device_found()
98 err = bt_conn_le_create(addr, BT_CONN_LE_CREATE_CONN, BT_LE_CONN_PARAM_DEFAULT, &g_conn); in device_found()
166 err = bt_gatt_discover(g_conn, &discover_params); in gatt_discover()
251 err = bt_gatt_subscribe(g_conn, &sub_params_short); in gatt_subscribe_short()
265 err = bt_gatt_unsubscribe(g_conn, &sub_params_short); in gatt_unsubscribe_short()
280 err = bt_gatt_subscribe(g_conn, &sub_params_long); in gatt_subscribe_long()
[all …]
Dgatt_server_test.c15 static struct bt_conn *g_conn; variable
34 g_conn = bt_conn_ref(conn); in connected()
42 if (conn != g_conn) { in disconnected()
50 bt_conn_unref(g_conn); in disconnected()
52 g_conn = NULL; in disconnected()
135 err = bt_gatt_notify_cb(g_conn, &params); in short_notify()
161 err = bt_gatt_notify_cb(g_conn, &params); in long_notify()
196 while (bt_eatt_count(g_conn) < CONFIG_BT_EATT_MAX) { in setup()
/Zephyr-latest/tests/bsim/bluetooth/host/adv/extended/src/
Dext_adv_scanner.c23 static struct bt_conn *g_conn; variable
37 bt_conn_unref(g_conn); in connected()
38 g_conn = NULL; in connected()
50 bt_conn_unref(g_conn); in free_conn_object_work_fn()
51 g_conn = NULL; in free_conn_object_work_fn()
108 BT_LE_CONN_PARAM_DEFAULT, &g_conn); in scan_recv()
Dext_adv_advertiser.c23 static struct bt_conn *g_conn; variable
104 err = bt_conn_disconnect(g_conn, BT_HCI_ERR_REMOTE_USER_TERM_CONN); in disconnect_from_target()
123 if (g_conn != NULL) { in connected()
127 g_conn = bt_conn_ref(conn); in connected()
135 bt_conn_unref(g_conn); in free_conn_object_work_fn()
136 g_conn = NULL; in free_conn_object_work_fn()
/Zephyr-latest/tests/bsim/bluetooth/host/gatt/general/src/
Dgatt_client_test.c18 static struct bt_conn *g_conn; variable
45 __ASSERT_NO_MSG(g_conn == conn); in connected()
54 if (conn != g_conn) { in disconnected()
62 bt_conn_unref(g_conn); in disconnected()
64 g_conn = NULL; in disconnected()
89 if (g_conn != NULL) { in device_found()
109 BT_LE_CONN_PARAM_DEFAULT, &g_conn); in device_found()
183 err = bt_gatt_discover(g_conn, &discover_params); in gatt_discover()
197 err = bt_conn_set_security(g_conn, BT_SECURITY_L2); in update_security()
242 err = bt_gatt_write(g_conn, &write_params); in gatt_write()
[all …]
Dgatt_server_test.c13 static struct bt_conn *g_conn; variable
28 g_conn = bt_conn_ref(conn); in connected()
36 if (conn != g_conn) { in disconnected()
44 bt_conn_unref(g_conn); in disconnected()
46 g_conn = NULL; in disconnected()
/Zephyr-latest/tests/bsim/bluetooth/host/adv/periodic/src/
Dper_adv_sync.c22 static struct bt_conn *g_conn; variable
45 g_conn = bt_conn_ref(conn); in connected()
57 bt_conn_unref(g_conn); in disconnected()
58 g_conn = NULL; in disconnected()
68 if (conn == g_conn && bonded) { in pairing_complete_cb()
92 BT_LE_CONN_PARAM_DEFAULT, &g_conn); in scan_recv()
232 err = bt_conn_set_security(g_conn, BT_SECURITY_L2); in start_bonding()
Dper_adv_advertiser.c22 static struct bt_conn *g_conn; variable
39 g_conn = bt_conn_ref(conn); in connected()
51 bt_conn_unref(g_conn); in disconnected()
52 g_conn = NULL; in disconnected()
62 if (conn == g_conn && bonded) { in pairing_complete_cb()

12