File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed
libraries/BLE/examples/Client_secure_static_passkey Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -195,6 +195,12 @@ void setup() {
195195 // Enable secure connection and MITM (for password prompts) for this example
196196 pSecurity->setAuthenticationMode (false , true , true );
197197
198+ // Set IO capability to KeyboardOnly
199+ // We need the proper IO capability for MITM authentication even
200+ // if the passkey is static and won't be entered by the user
201+ // See https://www.bluetooth.com/blog/bluetooth-pairing-part-2-key-generation-methods/
202+ pSecurity->setCapability (ESP_IO_CAP_IN);
203+
198204 // Retrieve a Scanner and set the callback we want to use to be informed when we
199205 // have detected a new device. Specify that we want active scanning and start the
200206 // scan to run for 5 seconds.
You can’t perform that action at this time.
0 commit comments