Windows 10 - create a BLE device connection with system when BLE device is not in advertising from code. RRS feed

  • Question

  • Is there a API or approach to create the connection between BLE device and system automatically without device advertising?

    It means we can got the BLE device pairing information from other media(OOB), and then application can use this data to setup the connection automatically and without device advertising needed. 
    Wednesday, September 11, 2019 9:31 AM

All replies

  • If you fully control the BLE device and the BLE host controller, you can do anything (like, simulate receiving device advertisements for Windows stack).

    The BLE spec requires that a server is in advertising state to become connectable. In theory you can tweak the advertising parameters so that no advertisements are actually sent before the device gets a connect request.

    -- pa

    Wednesday, September 11, 2019 6:54 PM
  • Hey Marvin,

    I am not sure how Pavel would achieve what he suggests on Windows.  However, we expect the server to be advertising as connectable to connect to it, and we need to see at least a single advertisement to connect on Windows.  If you review BLUETOOTH CORE SPECIFICATION Version 5.1 | Vol 6, Part D, 5.1 INITIATING A CONNECTION you'll see the sequence we expect to occur.

    Also on Windows you don't explicitly control the connection and disconnection, you use GATT services. What are you trying to achieve?



    Wednesday, September 11, 2019 8:05 PM
  • Hi, Frank,

    Actually, we would like to achieve this BLE pairing to be completed automatically like OOB pairing method, we will have a media to store our BLE device information like NFC NDEF BLE pairing information , when our application get the information , we hope we can use this data to setup the BLE connection even though device is not in advertising. Can I know it is possible?



    Thursday, September 12, 2019 1:49 AM
  • Hi Marvin,

    There is no way to have a pairing complete without an advertisement as we can't connect (see previous post).  However you could facilitate the OOB key material before the initial connection in two ways:

    1) Bluetooth Automated LE Device Pre-pairing if you own the host image and the peripheral, like Surface Studio with Surface Accessories. 

    2) If the devices is dual-mode and supports Secure Pairing and cross-transport key exchange, you could pair the BR portion first using BluetoothAutenticateDeviceEx and the LE portion will pair via cross-transport key exchange.

    If you're not the manufacture of both devices, and your device doesn't meet the requirements for the second suggestion, then the question is do our UWP APIs support BLUETOOTH CORE SPECIFICATION Version 5.1 | Vol 3, Part H | Out of band? Current , we do not, you can see it's missing from the list of pairing kinds. It's not in our backlog yet if you file Feedback Hub feedback and share the link, I'll promote it to a backlog item.



    Thursday, September 12, 2019 2:08 AM