Hi there, I'm using ncs2.4.2 with the nrf52840dk_nrf52840 configuration of nrf desktop.
We have modified nRF desktop to be a bt peripheral composite mouse and keyboard.
1. Once connected to a central, I would like to restart advertising. Once advertising, if there is an incoming pairing request, we would like to connect to the incoming pairing request and unpair from the previously active connection. I am struggling to figure out how to do this within the nRF Desktop framework. I guess I could just do independent API calls in my own threads, but I would like to keep the nRF Desktop bt infrastructure properly synchronized. I see many references to erase advertising, but my understanding is that deletes bonds from a bt identity and changes identity, We would like to keep previously connected bonds and not change identity.
the enum "state" at the top of ble_bond.c feels close. Is there some example code or other resources you could point me to to help me implement this functionality?
2. The other thing I am not sure how to implement (perhaps due to my unfamiliarity with bluetooth) is to scan (discover?) previously bonded connections, and give some feedback on whether they are in range or not. I was imagining testing RSSI to a specific BT address. Is this how you would recommend implementing this?
Thank you very much for your time!