Unable to connect BLE device with BLE privacy enabled

ty wang 41 Reputation points
2021-05-11T12:41:38.687+00:00

Hi,
I'm writing a program to read data from a custom BLE peripheral. Pairing works, but if the peripheral is disconnected then reconnected, I can't read secured services or pair again. The error is "Device Unreachable".
On other devices(android phone/iphone), reconnecting is not a problem.
To narrow down the problem, I disabled the BLE privacy function on peripheral, and the problem disappears. So, does windows support BLE privacy? And If so, how to make it aware of the randomized MAC?

==============
Update: it turns out windows doesn't randomize its own MAC, so the peripheral thinks it's unsafe and rejects the connection. Is there any way to make windows randomize its own MAC?

Developer technologies | Universal Windows Platform (UWP)
{count} votes

Accepted answer
  1. AryaDing-MSFT 2,916 Reputation points
    2021-05-13T02:34:15.02+00:00

    Hi,

    Welcome to MIcrosoft Q&A!

    Windows currently doesn’t use private random address when connecting to the device (it only randomizes during advertising) so unfortunately that peripheral is not currently compatible with Windows if it rejects the connection. This issue might be addressed in the future but it’s not clear what the timeframe is.

    In addition, I have found a similar question, you could try the way the author mentioned, you could reconfigure your peripheral to have a static random address to instead the private address pairing.


    If the response is helpful, please click "Accept Answer" and upvote it.

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.