How to ask for a passkey on connection

Hello,

I'm transitioning from the old SDK to the ncs, and have been through the nRF Connect SDK Fundamentals and Bluetooth Low Energy Fundamentals courses.

With pairing and bonding in the old SDK, the peer manager will handle everything, as well as you would call the pm_sec_params_set() to set up for example just works:

https://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.sdk5.v15.2.0%2Flib_pm_usage.html

The ncs doesn't seem to have the "peer manager", but more specifically I want to set up my device to ask for a passkey when connecting. Lesson 5 exercise 1 of the Bluetooth Low Energy Fundamentals course, only does this if there is an attempt to write to the characteristic. How can this be done?

Related