Search code examples
bluetooth-lowenergypairingpsoc

Connecting to BLE using an initial out-of-band message


I am engineering two BLE devices, a central and peripheral. (Using a PSoC 4 BLE, not that it matters)

There will be a lot of these in a small space, maybe up to 8 within range, but hundreds of peripherals and tens of centrals all coming and going, with no particular rhyme or reason behind which one central/peripheral the user will want to pair at any given time.

I also have an unrelated technology that makes it very easy for the user to move a blob of data from the central to the peripheral of their choosing. I believe this will make pairing much easier in most but not all scenarios.

I figure the non-BLE blob would contain at least the central's mac address, and maybe a randomly generated pin or shared key. Because the blob can only go from the central to the peripheral, the receiving peripheral is really the only device that knows the addresses of the two devices that are supposed to connect.

However, as I understand it, peripherals can't make outgoing connections. I can't swap roles because I still need the BLE search to work the traditional way.

I can think of a lot of ways to get this done, but I'm very interested in hearing the opinion of someone who has worked with BLE long enough to know what might fit best (or if I'm wrong about some assumption).

Some constraints I'm working with:

  • The peripheral is battery powered.
  • The usual search and pair method must also still work.

My own half-baked ideas:

  • Make the peripheral able to be a central too, but then does that introduce more nuances and complications?
  • Broadcast from the peripheral, "whoever has X mac address, please connect to me"
  • Put a similar message in the advertising packet and increase advertising rate.
  • Directed advertising similar to above?

Solution

  • You could let the "non-BLE blob" contain a static random address which the central generates. After the peripheral receives that, it starts advertising with that static random address. The central is also configured to initiate a connection to that particular static random address. Will this work?