ESP32 BLe Password Pairing
ESP32 BLe Password Pairing
Can i preset pairing password to an ESP32 and trigger a motor upon pairing with any device using that password only?
-
- Posts: 19
- Joined: Mon Jun 10, 2019 4:01 pm
Re: ESP32 BLe Password Pairing
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!
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!
Re: ESP32 BLe Password Pairing
Thanks, figured it out.
Who is online
Users browsing this forum: Bing [Bot], iParcelBox and 53 guests