How to prevent ble_app_UART that implements pairing from connecting to ble_app_uart_c that does not implement pairing

Module: nRF52832

Implemented pairing for ble_app_UART (NUS).
However, I can connect with ble_app_uart_c, which does not have pairing implemented.
Please tell me how to prevent the ble_app_UART that implements pairing from being connected to ble_app_uart_c that does not implement pairing.

Parents
  • Hi,

    Bonding/pairing is a step that happens after connection, and there is no way to know beforehand if the peer supports bonding/pairing or not. The best you can do is probably to try to pair/bond early, and disconnect immediately if that is not an option. You should of corse also ensure that the security parameters of the characteristics that you want to protect are such that they cannot be accessed without pairing/bonding.

Reply
  • Hi,

    Bonding/pairing is a step that happens after connection, and there is no way to know beforehand if the peer supports bonding/pairing or not. The best you can do is probably to try to pair/bond early, and disconnect immediately if that is not an option. You should of corse also ensure that the security parameters of the characteristics that you want to protect are such that they cannot be accessed without pairing/bonding.

Children
Related