Is there a way to refuse to re-pair with an Android device?

I am developing with nrf52832 (s132 v7.0.1, SDK v17.0.0) as a peripheral device.

I am communicating with an Android device (SH-M05) as central.

There are times when I want to refuse to re-pair with an Android device, but before I can set up the refusal, a "Pair Setup Request" appears.

The current situation that is displayed is the following procedure.
(1) Connect to the device and pair it.
(2) On the Android device, delete the pairing information of nRF52832.
(3) Connect with the device.

To reject the re-pairing, we thought we could set conn_sec_config.allow_repairing to false in PM_EVT_CONN_SEC_CONFIG_REQ, but before PM_EVT_CONN_SEC_CONFIG_REQ occurs, "pair Configuration Request" is displayed.

Is there an effective way to prevent the "Pair Configuration Request" from being displayed?
Is there any other way to deny re-pairing?

Thank you in advance.

 

Parents
  • Not really possible.

    If you delete the pairing on Android, you still have the old pairing key in the device.

    Upon connecting, PM will notice the key and offer it to the android device since the address matches. That is what makes android display the pairing dialog, since because the key is missing on the "host".

    There is no way of knowing that the host key was deleted at this point.

    And PM_EVT_CONN_SEC_CONFIG_REQ only arrives after the user confirmed the re-pairing dialog on android.

Reply
  • Not really possible.

    If you delete the pairing on Android, you still have the old pairing key in the device.

    Upon connecting, PM will notice the key and offer it to the android device since the address matches. That is what makes android display the pairing dialog, since because the key is missing on the "host".

    There is no way of knowing that the host key was deleted at this point.

    And PM_EVT_CONN_SEC_CONFIG_REQ only arrives after the user confirmed the re-pairing dialog on android.

Children
No Data
Related