Hi Franz
I've converted the HCI Dump into a .pklg to open it in Wirehshark, that's the recommended process, see attached sm-pairing.pklg.
When pairing starts, BTstack realizes that it does have bonding information but the remote side requests a new pairing. It then reports this issue and deletes / ignores the locally stored bonding information.
Then, during the new pairing which uses LE Secure Connections, the devices exchange their public keys, calculate a shared key, chose a random value, use the shared key to encrypt the random value and send this confirm value to the other side. After that, they each send the chosen random key, to allow the remote to verify the calculation. here, your remove device claims that the calculation is wrong.
This is weird as a) you probably didn't have a man-in-the-middle attack ongoing, and b) it works the next time.
I've attached another trace running sm_peripheral.c where I first pair from my iPhone, then delete the pairing on the iPhone and then successfully pair again.
hm.. I just remember some issue with resolvable private addresses which has been fixed, but pico-sdk hasn't updated their BTstack copy in a while.
Could you repeat your test without bonding information, capture the complete log from the beginning:
- start up
- first connection and pairing
- second connection and pairing
and convert it to .pklg and post here?
Best regards
Matthias
> --
> You received this message because you are subscribed to the Google Groups "btstack-dev" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to
btstack-dev...@googlegroups.com.
> To view this discussion visit
https://groups.google.com/d/msgid/btstack-dev/9137ced1-9dd3-498a-b0e5-6c796e52141an%40googlegroups.com.