This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

NRF_ERROR_INTERNAL while bonding?

Hi,

After finding that Windows doesn't like HID devices if they can't be bonded to, I've been attempting to add peer_manager and bonding into my application.

However, having added it I'm getting loads of problems. I can connect normally, but:

Bonding (using nRF Connect) appears to work, but immediately after disconnecting, I get NRF_ERROR_NOT_FOUND from pm_whitelist_set in the BLE_GAP_EVT_DISCONNECTED handler (and the device resets).

Even after removing all the whitelist code (which I'm not too worried about), when attempting to bond I get NRF_ERROR_INTERNAL which comes via the PM_EVT_ERROR_UNEXPECTED handler (and the device also resets)

Any thoughts what could be the issue here? The internal error sounds a bit worrying.

The code that changed in order to add the peer manager without whitelist :

github.com/.../c969f3c52cb39cd0a66df6da4e22d61241486071...BLE_peer_manager_no_whitelist

Same code, but with the whitelist:

github.com/.../c969f3c52cb39cd0a66df6da4e22d61241486071...BLE_peer_manager

Is there anything obvious I've missed here? It kind of seemed like I'd got everything, but it's hard to tell from just looking through the HID example.

Parents
  • I realise I didn't respond to your other question about searching devzone. Other issues tend to be to do with FS_PAGE_END_ADDR, but on the DK there's no bootloader so it should sit at the very end of flash (0x80000) so I guess between 7f000-7ffff. That's not used by my code and I checked it was all erased. I then tried to bond, immediately it crashed, but on reboot I found 222,192,173,222,254,1,30,241 as the first 8 bytes - the rest are all 255.

Reply
  • I realise I didn't respond to your other question about searching devzone. Other issues tend to be to do with FS_PAGE_END_ADDR, but on the DK there's no bootloader so it should sit at the very end of flash (0x80000) so I guess between 7f000-7ffff. That's not used by my code and I checked it was all erased. I then tried to bond, immediately it crashed, but on reboot I found 222,192,173,222,254,1,30,241 as the first 8 bytes - the rest are all 255.

Children
No Data
Related