From 3de15c9615a9587ee1346d9a6cb57ad65a08ea22 Mon Sep 17 00:00:00 2001 From: Michal Gorecki Date: Wed, 31 Aug 2022 15:25:26 +0200 Subject: [PATCH] apps/peripheral: Fix not saving conn_handle after connection Even though conn_handle is defined and later used in connection params update request event callback, it was never initialized with a proper value. --- apps/peripheral/src/main.c | 1 + 1 file changed, 1 insertion(+) diff --git a/apps/peripheral/src/main.c b/apps/peripheral/src/main.c index f22579a73..28e8afb14 100755 --- a/apps/peripheral/src/main.c +++ b/apps/peripheral/src/main.c @@ -50,6 +50,7 @@ adv_event(struct ble_gap_event *event, void *arg) MODLOG_DFLT(INFO, "connection %s; status=%d\n", event->connect.status == 0 ? "established" : "failed", event->connect.status); + conn_handle = event->connect.conn_handle; break; case BLE_GAP_EVENT_CONN_UPDATE_REQ: /* connected device requests update of connection parameters,