Skip to content

Commit 014fb53

Browse files
ble temp example: enable att server to avoid disconnect (#368)
Fixes #367 Co-authored-by: Matthias Ringwald <[email protected]>
1 parent bf0017c commit 014fb53

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

pico_w/bt/standalone/client.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -255,6 +255,10 @@ int main() {
255255
l2cap_init();
256256
sm_init();
257257
sm_set_io_capabilities(IO_CAPABILITY_NO_INPUT_NO_OUTPUT);
258+
259+
// setup empty ATT server - only needed if LE Peripheral does ATT queries on its own, e.g. Android and iOS
260+
att_server_init(NULL, NULL, NULL);
261+
258262
gatt_client_init();
259263

260264
hci_event_callback_registration.callback = &hci_event_handler;

0 commit comments

Comments
 (0)