ESP32 BLe Password Pairing

schkillll
Posts: 16
Joined: Tue Jul 23, 2019 1:46 pm

ESP32 BLe Password Pairing

Postby schkillll » Sun Jul 28, 2019 6:52 am

Can i preset pairing password to an ESP32 and trigger a motor upon pairing with any device using that password only?

phantomBlurrr
Posts: 19
Joined: Mon Jun 10, 2019 4:01 pm

Re: ESP32 BLe Password Pairing

Postby phantomBlurrr » Mon Jul 29, 2019 8:48 pm

Hello,
Are you trying to make it so that when you connect to the ESP for the first time, it requests for you to pair your device. Not only that, but it requires a password to pair? This is what you want, right? If so, check out this:

Sample code provided by Espressif:
https://github.com/espressif/esp-idf/tr ... ity_server

Tutorial to understand this code:
https://github.com/espressif/esp-idf/bl ... through.md

Use those resources to figure out how to set the pairing password. Then look at the service table example to find how to make the GATT database and use that to communicate with the phone application. Lastly, put the commands you want into the GATT database, to be called by a button in the phone application. One of those commands can be something like turn on a motor, it would probably use GPIO on the ESP to send signal???
Good luck!

schkillll
Posts: 16
Joined: Tue Jul 23, 2019 1:46 pm

Re: ESP32 BLe Password Pairing

Postby schkillll » Wed Aug 28, 2019 3:56 pm

Thanks, figured it out.

Who is online

Users browsing this forum: No registered users and 228 guests