From dd4e011ed6242d1e7fde78b3f582dfd42056177d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Rymanowski?= Date: Wed, 12 Feb 2020 21:37:02 +0100 Subject: [PATCH] nimble/host: Make gap init before att This is needed as eatt is registering listener in gap nowadays --- nimble/host/src/ble_hs.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/nimble/host/src/ble_hs.c b/nimble/host/src/ble_hs.c index e130c1ca1..bab8fe111 100644 --- a/nimble/host/src/ble_hs.c +++ b/nimble/host/src/ble_hs.c @@ -734,6 +734,11 @@ ble_hs_init(void) rc = ble_l2cap_init(); SYSINIT_PANIC_ASSERT(rc == 0); +#endif + rc = ble_gap_init(); + SYSINIT_PANIC_ASSERT(rc == 0); +#if NIMBLE_BLE_CONNECT + rc = ble_att_init(); SYSINIT_PANIC_ASSERT(rc == 0); @@ -746,8 +751,6 @@ ble_hs_init(void) rc = ble_gatts_init(); SYSINIT_PANIC_ASSERT(rc == 0); #endif - rc = ble_gap_init(); - SYSINIT_PANIC_ASSERT(rc == 0); ble_hs_stop_init();