nrf_sdh_enable_request() fails with ERROR 8 [NRF_ERROR_INVALID_STATE]

Hi,


I tried to add a pairing PIN code feature for connection with a central device (based on the reference: Migrating to Peer Manager) in the ble_app_uart example of the nrf5_sdk_17.1.0_ddde560 SDK, using the nRF52840-DK.

However, the following error occurred. I have already set the following in sdk_config.h:

#define NRF_SDH_ENABLED 1
#define NRF_SDH_BLE_ENABLED 1

Error message from nrf_sdh_enable_request():

<info> app_timer: RTC: initialized. <error> app: ERROR 8 [NRF_ERROR_INVALID_STATE] at ...\nrf5_sdk_17.1.0_ddde560\examples\ble_peripheral\ble_app_uart\main.c:473 PC at: 0x00027B41 <error> app: End of error report

Please help me understand and define the cause of this error. Thank you.

Parents Reply
  • Hello,

    Which toolchain/IDE are you using for this project? The only case I can think of where nrf_sdh_enable_request() would return this error is if the softdevice reset handler wasn’t executed at startup. This can happen if the debugger starts execution from the application's start address.

    Due to the number dependencies you have to manually add to the project to integrate the Peer manager (especially if you want to support LE secure connections pairing) it may be easier another example such as ble_app_hrs and replace the Bluetooth services in that project for the Nordic UART service.

Children
No Data
Related