Hi
I am working on a BLE project and it requires some specific functionalities. I am not sure if all of them are doable. I have some questions about these. So, if someone could answer them, it would be very much helpful. I am using NRF52832 and 840 with NCS 2.1.x
1) I have a bluetooth android application and my NRF52 is my peripheral. What i want to do is every time my application attempts to connect to the NRF52 peripheral, it must be prompted to enter a passkey which is known at the NRF52 side. From what I understand, it is the central which initially enforces the passkey, which in my case is my phone. Is there some way I can do the other way around ? i.e configure my peripheral to enforce that the user should enter a passkey to connect with it ? If yes, how can it be done ? Is there an example I could refer to ?
2) My second idea is to update the passkey in discussion dynamically through an i2c channel. We can update the device information service parameters on the fly. Is there a similar functionality in case of BLE passkeys too ? I mean, can I send a new passkey via I2C or some other interface and use that as the new passkey so that the next time my application tries to connect, my peripheral would enforce the new passkey ?
I am pretty much new to all these and I am sorry for any dumb questions. But any help would be appreciated. Thanks in advance !!