Sith Siri
Sith Siri

Reputation: 53

ESP32 Bluetooth Pairing To Phone

I am trying to make it so that my ESP32 board can detect my phone when I approach it based on RSSI. However, the ESP32 cannot see the phone unless the phone is in discovery mode, which is not super useful. To solve this, I was hoping to pair my phone with the ESP32 so that the phone would always be looking for the ESP32, and connect when it is found without any human intervention.

I decided to try the Arduino integration, but as I was working through all of the examples I couldn't find any with this functionality, so I'm kind of lost. If this is not possible or easy with Arduino, I am willing to switch, but I was unable to find anything about pairing in the normal phone interface for ESP-IDF either.

So, basically, using an ESP32, how do I pair to a phone?

Upvotes: 1

Views: 1776

Answers (1)

RemyHx
RemyHx

Reputation: 365

The easiest way is to make the esp a gatt server and advertise a specific service. The phone will look for that specific service and connects if found.

You could make an app for your phone, like for ios its pretty easy. But keep in mind for mobile devices a continuous search for devices could be power unfriendly if misused.

If you use esp-idf instead of arduino, some examples are included. (You could use the vscode integrated esp-idd) Check learnesp32.com for an easy step into the basics, coming from Arduino.

Upvotes: 0

Related Questions