Page 1 of 1

ESP32 standard Bluetooth. How to force disconnect?

Posted: Sat Jan 26, 2019 9:59 pm
by Pcborges
Hi, I am using ESP32 regular Bluetooth (Not BLE).
I had to implement passcode protection inside my sketch to compensate for the lack of PIN authentication on ESP32 Bluetooth.

I would like to force Bluetooth disconnection from current user if he fails to enter right passcode.

Is there a way to do that?

Thanks
Paulo

Re: ESP32 standard Bluetooth. How to force disconnect?

Posted: Mon Jan 28, 2019 9:47 am
by chegewara
Hi,
im not sure why you are trying to reinvent wheel. There is pretty good pairing with PIN implemented in esp-idf. Even legacy pairing has been added (pairing with fixed PIN).
https://docs.espressif.com/projects/esp ... Pv7uint8_t

https://github.com/espressif/esp-idf/bl ... emo.c#L289