From 014fb537ebd0baa5d7256faa8f90b1237e3ecf8a Mon Sep 17 00:00:00 2001 From: Peter Harper <77111776+peterharperuk@users.noreply.github.com> Date: Mon, 5 Jun 2023 16:18:35 +0100 Subject: [PATCH] ble temp example: enable att server to avoid disconnect (#368) Fixes #367 Co-authored-by: Matthias Ringwald --- pico_w/bt/standalone/client.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pico_w/bt/standalone/client.c b/pico_w/bt/standalone/client.c index 19e599c..08c182b 100644 --- a/pico_w/bt/standalone/client.c +++ b/pico_w/bt/standalone/client.c @@ -255,6 +255,10 @@ int main() { l2cap_init(); sm_init(); sm_set_io_capabilities(IO_CAPABILITY_NO_INPUT_NO_OUTPUT); + + // setup empty ATT server - only needed if LE Peripheral does ATT queries on its own, e.g. Android and iOS + att_server_init(NULL, NULL, NULL); + gatt_client_init(); hci_event_callback_registration.callback = &hci_event_handler;