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?

Parents
  • Hi again

    Thank you for the updated information. I've asked our developer team if they're able to explain what's going on here and I'll get back to you when I hear from them. Glad you found a possible workaround. Can you provide some error messages from the nRF device you're trying to read from as well if possible? And can you select debug in nRFConnect so we can get a better look? It might also be necessary to see a sniffer trace.

    Best regards,

    Simon

    UPDATE: One thought is that one of the devices have the pairing information stored already in the flash, which will cause trying to pair yet again to fail. Can you try deleting bonding information on both devices when this occurs and see if that fixes the issue?

  • 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.

Reply
  • 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.

Children
No Data
Related