btshell: Ensure ID address is properly read on init

This commit is contained in:
Szymon Janc
2021-03-23 10:38:36 +01:00
parent 33a73cee15
commit d8ffa4651b
2 changed files with 7 additions and 0 deletions
+1
View File
@@ -33,6 +33,7 @@ pkg.deps:
- nimble/host/services/gap
- nimble/host/services/gatt
- nimble/host/store/config
- nimble/host/util
- nimble/transport
pkg.deps.BTSHELL_ANS:
+6
View File
@@ -43,6 +43,7 @@
#include "host/ble_gatt.h"
#include "host/ble_store.h"
#include "host/ble_sm.h"
#include "host/util/util.h"
/* Mandatory services. */
#include "services/gap/ble_svc_gap.h"
@@ -2105,6 +2106,11 @@ btshell_on_reset(int reason)
static void
btshell_on_sync(void)
{
/* Make sure we have proper identity address set (public preferred) */
if (ble_hs_util_ensure_addr(0) != 0) {
console_printf("Failed to set identity address\n");
}
#if MYNEWT_VAL(BLE_SM_SC)
int rc;