fix(nimble): fix missing gatt caching header in examples

This commit is contained in:
Astha Verma
2026-03-31 12:33:12 +05:30
committed by Rahul Tank
parent b99e5ed88d
commit 14447b4d69
4 changed files with 15 additions and 1 deletions
@@ -14,6 +14,9 @@
#include "console/console.h"
#include "services/gap/ble_svc_gap.h"
#include "ble_prox_cent.h"
#if MYNEWT_VAL(BLE_GATT_CACHING)
#include "host/ble_esp_gattc_cache.h"
#endif
static const char *tag = "NimBLE_PROX_CENT";
static uint8_t link_supervision_timeout;
@@ -499,8 +502,9 @@ ble_prox_cent_gap_event(struct ble_gap_event *event, void *arg)
/* Connection attempt failed; resume scanning. */
MODLOG_DFLT(ERROR, "Error: Connection failed; status=%d\n",
event->connect.status);
ble_prox_cent_scan();
}
ble_prox_cent_scan();
return 0;
case BLE_GAP_EVENT_DISCONNECT:
@@ -14,6 +14,7 @@
#include "host/util/util.h"
#include "console/console.h"
#include "services/gap/ble_svc_gap.h"
#include "services/gatt/ble_svc_gatt.h"
#include "ble_prox_prph.h"
#if CONFIG_EXAMPLE_EXTENDED_ADV
@@ -300,6 +301,9 @@ void app_main(void)
ble_hs_cfg.sm_sc = 1;
ble_hs_cfg.sm_mitm = 1;
ble_svc_gap_init();
ble_svc_gatt_init();
int rc;
/* Set the default device name */
rc = ble_svc_gap_device_name_set(device_name);