BLE auto bonding after pairing once

joe_fang_iD
Posts: 7
Joined: Thu Aug 01, 2019 11:59 pm

BLE auto bonding after pairing once

Postby joe_fang_iD » Mon Apr 26, 2021 11:04 pm

Hello,

This probably is a simple feature that is already implemented, so if someone can point me out some example look at, that would be great. I'm looking for a way for an esp32 to automatically connect with a phone/ble device once in range or once that phone/device turns on ble, AFTER they've already paired in a previous connection. I'm not sure if the later automatic connections are called bonding. I would like to do this on arduino-esp32 if possible.

Thanks.

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

Re: BLE auto bonding after pairing once

Postby chegewara » Tue Apr 27, 2021 1:49 am

This can be done only if esp32 will advertise itself as a "special" device class, for example BLE HID keyboard.
What you can do is to add to your IOS/android app to scan for device and connect to it when it is that app, but it will drain battery a lot.
There was similar question already on this forum, when user wanted to control when son is at home.

grginho
Posts: 3
Joined: Tue Nov 29, 2022 12:54 pm

Re: BLE auto bonding after pairing once

Postby grginho » Mon Jul 31, 2023 10:50 am

Is auto reconnecting to the Android phone only available if the ESP device is advertising itself as some HID device, or it can be done as 'normal' BLE device with custom services and chars?

Who is online

Users browsing this forum: Bing [Bot] and 54 guests