Nordic connect application does not always trigger pairing flow when reading out secure characteristic

Using the NRF connect app we can simulate the problem we have in our app Cowboy. Some customers cannot pair with the bike that uses the nRF52840. We have secure and non secure characteristics. Normally to trigger the pairing and entering the static pairing key we read out a secure characteristic. Using the NRF connect app we can do this with most of the products only some respond with authentication failed. 

So why does this not trigger the pairing again? 

 

The software versions that we are using is

  • SDK 17.0.2
  • Soft device S140 7.2.0

Workaround is that when we are stuck in this state the soft device keeps responding that authentication is needed when reading out a secure characteristic but does not trigger the pairing flow on the OS. We are however able to do a DFU update as that is not secured, or better secured different. After the DFU update the device seams to have been reset and the pairing is triggered correctly on the OS when reading out a secure characteristic.

Could this be a bug in the soft device? It should recover from the authentication needed by forcing the OS to start the pairing flow no? 

Conclusion

This happens in the Nordic connect application on both iOS and Android so we are now implementing a reset on a timeout if we are stuck in this state. But could you investigate why this is occurring?

  • We managed to sort of reproduce the issue

    1. Pair with an iOS device < iOS13

    2. Update the device to iOS 15

    3. pairing stops working and you have to pair again. Meaning the enter pairing code pops up again if our app reads out a secure value

    4. When other phones try to connect to the same nRF device they are not allowed anymore.

    Could it be that the stored token format somehow changed as the bleutooth specs changed? It seams we have no way to delete the stored information on the nRF device and that it us stuck in a loop. 

    Any help would be appreciated.

  • Hi again

    Some preliminary thoughts from me:

    • Are the nRF devices configured to be able to connect and pair to more than one central device?
    • In order to delete stored bonding information, check out the peer manager and the pm_peers_delete function that we use in our example projects.

    From the logs it seems like the phones find that they are not able to bond and therefore disconnects from the nRF device. Since you are able to recreate it with updating iOS, I guess this update deletes bonding information on the phone side, making it not remember it's bonded to the nRF. If you are able to pair successfully after this update, the nRF device will see the iOS 13 and 15 devices as two separate devices it seems.

    Best regards,

    Simon

Related