Hi Guys!
Could you help me with one issue.
I am trying to run my own project that I build according to the example "ble_app_hrs_freertos". If I am calling "nrf_pwr_mgmt_run()" in "vApplicationIdleHook":
void vApplicationIdleHook( void )
{
#if NRF_LOG_ENABLED
vTaskResume(m_logger_thread);
#endif
nrf_pwr_mgmt_run();
}
my BLE does not want to work. The NRF Connect application sees the device, but can not connect to it. From the log I see next:
V 22:57:56.889 Connecting to E2:ED:AD:A0:FE:F8... D 22:57:56.889 gatt = device.connectGatt(autoConnect = false, TRANSPORT_LE, preferred PHY = LE 1M) D 22:57:57.540 [Broadcast] Action received: android.bluetooth.device.action.ACL_CONNECTED D 22:57:57.586 [Callback] Connection state changed with status: 0 and new state: CONNECTED (2) I 22:57:57.586 Connected to E2:ED:AD:A0:FE:F8 V 22:57:57.627 Discovering services... D 22:57:57.627 gatt.discoverServices() I 22:57:57.840 Connection parameters updated (interval: 7.5ms, latency: 0, timeout: 5000ms) D 22:58:27.658 [Callback] Connection state changed with status: 22 and new state: DISCONNECTED (0) E 22:58:27.658 Error 22 (0x16): GATT CONN TERMINATE LOCAL HOST I 22:58:27.658 Disconnected D 22:58:27.730 [Broadcast] Action received: android.bluetooth.device.action.ACL_DISCONNECTED
If I remove "nrf_pwr_mgmt_run()" from "vApplicationIdleHook", the BLE starts working properly.
Thanks!