Hi, I have many questions related to BLE pairing/bonding process, search through the internet gives no valued result, so I ask here.
Firstly I meet problem trying to pair 2 CC2540 central and peripheral (I use simpleBLE sample code, BLE lib version 1.3).
Setting for central device: GAPBOND_PAIRING_MODE_INITIATE, MITM=TRUE, BONDING_MODE=FALSE, GAPBOND_IO_CAP_DISPLAY_ONLY.
Setting for peripheral: GAPBOND_PAIRING_MODE_WAIT_FOR_REQ, MITM=TRUE, BONDING_MODE=FALSE, GAPBOND_IO_CAP_NO_INPUT_NO_OUTPUT
But the pairing process is always SUCCESS, event if I program 2 different passcode into 2 device. What is wrong?
And I have some questions:
1. Are pairing and bonding 2 different process? Pairing is process to share passcode, create keys, encrypt link... and Bonding is process to save these key, is it right?
2. In simpleBLE sample project, the link encryption is done in pairing process or I need to add this function myself?
3. I use only passcode (6 digits PIN) to pair 2 device, and then the connection is keep in long run, and no more authentication is done in this long time, so is there any chance the man-in-the-middle can trick my connection and fake 1 of 2 devices?
Any comment helps me very much. Thank you.