I'm using python code based on the heart_rate_collector.py example in pc-ble-driver-py to scan for devices and connect to a peripheral device. That works fine.
Now I'd like to pair/authenticate with a connected device (this uses a known passkey). Unfortunately I could not find any examples of establishing a secure connection in pc-ble-driver-py.
I looked around and the https://github.com/NordicSemiconductor/pc-nrfutil/blob/master/nordicsemi/dfu/dfu_transport_ble.py code has an example of using ble_gap_authenticate() and ble_gap_sec_params_reply() from python. Unfortunately, the ble_gap_sec_params_reply() calling signature there has more parameters than the one in the current version of pc-ble-driver-py, so I'm not sure if that code is expected to work or how to adapt it.
P.S. My environment is Ubuntu 16.04LTS, pc-ble-driver-py v0.11.4 (installed from pip) and nRD51 DK.