This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

nrf52832 auto pair

I have a requirement where a handheld device containing a nrf52832 needs to be automatically paired to a switch (another nrf52832 device) when powered on, how can this be achieved?

  • When it comes to pairing itself you can use Just Works or hardcoded pairing code (or even hardcoded OOB key). It's kind of defeating the security of whole procedure but I guess you understand it and just having some superstrong reason to do it anyway.

    The problem is how your devices recognize that exactly this is the peer to connect and pair. This could be typically done by pressing some button on both devices which will enable some time-limited advertisement pattern so the Master (GAP Central) can find the peer and connect to it. Otherwise you would need to be careful because your device could connect accidentally to any signal which mimics your desired target (note that even in first case with button you will be vulnerable to targeted MITM attack but that's probably not a concern for your users).

    In every case reading something about BLE Security Manager layer and pairing&bonding modes would help;) (google and blog zone + search button on this forum are your friends).

Related