diff --git a/src/BLE/BleManager.c b/src/BLE/BleManager.c index 22bf5b68..cf56dd48 100644 --- a/src/BLE/BleManager.c +++ b/src/BLE/BleManager.c @@ -93,7 +93,6 @@ void ble_manager_init() { ble_manager_init_gatt(); ble_manager_init_db_discovery(); ble_manager_init_advertising(); - ble_manager_init_peer_manager(); ble_manager_init_services(); ble_manager_init_connection_params(); } diff --git a/src/BLE/BleManager.h b/src/BLE/BleManager.h index 68fdff9a..4424d665 100644 --- a/src/BLE/BleManager.h +++ b/src/BLE/BleManager.h @@ -34,6 +34,7 @@ extern "C" { void ble_manager_init(); void ble_manager_start_advertising(void *p_erase_bonds); +void ble_manager_init_peer_manager(); // TODO use signals from RTOS to notify new time void ble_manager_set_new_time_callback(void (*OnNewTime)(current_time_char_t* currentTime)); diff --git a/src/SystemTask/SystemTask.cpp b/src/SystemTask/SystemTask.cpp index e15846da..ca0c71e1 100644 --- a/src/SystemTask/SystemTask.cpp +++ b/src/SystemTask/SystemTask.cpp @@ -34,6 +34,7 @@ void SystemTask::Work() { NRF_LOG_INFO("Last reset reason : %s", Pinetime::Drivers::Watchdog::ResetReasonToString(watchdog.ResetReason())); APP_GPIOTE_INIT(2); bool erase_bonds=false; + ble_manager_init_peer_manager(); nrf_sdh_freertos_init(ble_manager_start_advertising, &erase_bonds); spi.Init();