Problem connecting nrf51822 and ESP32 BLE with LESC while using static passkey.The ESP shows the following error logs:
W (1280) BT_SMP: Non bonding: No keys will be exchanged
lld_pdu_get_tx_flush_nb HCI packet count mismatch (0, 1)
W (7290) BT_APPL: bta_gattc_conn_cback() - cif=3 connected=0 conn_id=3 reason=0x0008
E (7300) BT_BTM: Device not found
E (7300) BT_APPL: bta_gattc_mark_bg_conn unable to find the bg connection mask for: e0:0a:3a:f0:75:4b
Both have no i/o capability. So nrf I/O caps is display only and ESP32 I/O caps is keyboard only. Both has MITM ON and LESC ON. When one or both devices have the LESC OFF then connection is successful. Connection is unsuccessful only when both has LESC ON.
The ESP32 is running the GATT security client code found in the examples. The following is the nrf code:
