This is an automated email from the ASF dual-hosted git repository. janc pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/mynewt-nimble.git
The following commit(s) were added to refs/heads/master by this push: new 854fc2fa nimble/host: no random address fix 854fc2fa is described below commit 854fc2fafc9c488abdd851fb00af1c7a2e59644c Author: Jakub <jakub.rotkiew...@codecoup.pl> AuthorDate: Wed Sep 1 16:49:39 2021 +0200 nimble/host: no random address fix The app didn't build on dialog_da1469x-dk-pro board. Couldn't load random address. --- nimble/host/util/src/addr.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/nimble/host/util/src/addr.c b/nimble/host/util/src/addr.c index b3112f12..830ff025 100644 --- a/nimble/host/util/src/addr.c +++ b/nimble/host/util/src/addr.c @@ -55,8 +55,13 @@ ble_hs_util_ensure_rand_addr(void) /* Otherwise, try to load a random address. */ rc = ble_hs_util_load_rand_addr(&addr); + if (rc != 0) { - return rc; + /* If it didn't work, generate random address */ + rc = ble_hs_id_gen_rnd(0, &addr); + if (rc != 0) { + return rc; + } } /* Configure nimble to use the random address. */