Change passkey via Android

mycstrange@gmail.com
Posts: 1
Joined: Tue Mar 23, 2021 8:27 pm

Change passkey via Android

Postby mycstrange@gmail.com » Sun May 09, 2021 8:51 pm

I haven't seen a clear way to do this so maybe it can't be done but I am trying to create a 'device flow' like this:

User connects via Android phone to ESP32 BLE for the first time and enters the default passkey to complete connection
The User can then choose to change what that passkey is
The passkey persists through power cycles (guessing via stored on EEPROM)


Thanks for any help!

ns1668
Posts: 50
Joined: Tue Mar 16, 2021 2:00 pm

Re: Change passkey via Android

Postby ns1668 » Fri May 21, 2021 9:36 am

Seems fine to me.

There is a default storage area in the partition map already, take a look at https://docs.espressif.com/projects/esp ... flash.html

You can also add your own partitions if you wanted to. And yes this is non-volatile so it is persistent between power cycles.
You would need to send a message from your android device to the ESP32 which contains the new key, and then set the key on the ESP32.

I have not tried, but I assume that there is a way to send custom data via GATT profile in BLE - thats where I would start.

Simple design, just need to write the code.

Who is online

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