Search code examples
bluetooth-lowenergypairing

Can I auto pairing and connect 2 BLE devices?


  1. If I develop 2 BLE devices(not phone, not android), can I program them to auto pairing and connect? Let's say, BLE A advertise BLE B, B authenticate A, B request connect to A, A and B connected, B is a master of A, A and B exchange data, A and B disconnect. The whole process without any human touch, is it possible?
  2. If yes, how fast can it be from advertise to connected?

Solution

  • Yes you can, but for BLE there is no need for pairing, just connect or even send and read advertising data without connecting.

    Set one device up as beacon or server.
    The other device as scanner or client.
    Finding a server or advertising device can be up to a few seconds, depending upon how many devices are in reach, and the signal strength.
    A connection can be established on average by 500 ms.
    Advertising intervals depend on the devices used and how much data is send, but can be as short as 40 ms. These numbers are based on my experience only, using a few android phones, my laptop, some esp32 boards and some HM10 devices.