ESP32 standard Bluetooth. How to force disconnect?

Pcborges
Posts: 37
Joined: Thu Aug 09, 2018 9:56 pm

ESP32 standard Bluetooth. How to force disconnect?

Postby Pcborges » Sat Jan 26, 2019 9:59 pm

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

chegewara
Posts: 2364
Joined: Wed Jun 14, 2017 9:00 pm

Re: ESP32 standard Bluetooth. How to force disconnect?

Postby chegewara » Mon Jan 28, 2019 9:47 am

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

Who is online

Users browsing this forum: No registered users and 96 guests