This is a follow-up question from devzone.nordicsemi.com/.../
I finally got passkey support to work on ble_app_uart but don't quite understand the changes made to the code to get things working.
I had to make some changes in ble_nus.c. BLE_GAP_CONN_SEC_MODE_SET_OPEN(&attr_md.write_perm); was changed to BLE_GAP_CONN_SEC_MODE_SET_ENC_NO_MITM(&attr_md.write_perm);
If the code is set to BLE_GAP_CONN_SEC_MODE_SET_OPEN, nRF UART Android app will not be prompted for passkey. I need to use BLE_GAP_CONN_SEC_MODE_SET_ENC_NO_MITM so that nRF UART Android app will be prompted for password. Write permissions had to be changed to use BLE_GAP_CONN_SEC_MODE_SET_ENC_NO_MITM. Why is this required?