nimble/host: no random address fix
The app didn't build on dialog_da1469x-dk-pro board.
Couldn't load random address.
@@ -55,9 +55,14 @@ 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) {
+ /* 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. */
rc = ble_hs_id_set_rnd(addr.val);
