1

Context: I'm working on a Windows 10 app that will allow users to quickly connect to a Bluetooth device. Because the native API is difficult to work with, I'm using the 'In The Hand' library. Anyway, back to the point: whenever I make a connect request. Before allowing me to connect, I receive this Pair a device notification.

I'm wondering if I can set Windows to automatically accept this permission for connecting the device. Is there a method in the Windows API that I can use to accomplish this?

Here is the link to the code: https://github.com/hasham7861/bluetooth-le-experiment/blob/master/Program.cs

In the picture I make a connect request to a bluetooth headset and then I get the notification on the bottom right, and only if I click allow to pair device then it pairs the device. enter image description here

Hasham
  • 41
  • 7

1 Answers1

1

I hope this link helps you. I apologize in advance if I misunderstood the question or if the data were meaningless

Windows 10 Connect to Bluetooth Classic Device without Pairing

https://github.com/microsoft/Windows-universal-samples/blob/main/Samples/DeviceEnumerationAndPairing/cs/Scenario9_CustomPairDevice.xaml.cs

CMLEE
  • 23
  • 4
  • Thank you for answering. For the first link, the answer is for someone who is trying to communicate with Bluetooth devices without pairing the device itself. So I am wondering is this library not doing that? Is that the reason why Windows suggests this `pair the device` option. You also suggested a link to an example app which is using the windows API to do the pairing. I wonder if using the built in api then I can avoid this suggested pair notification. I will give that a go. Thank you. – Hasham Aug 08 '22 at 13:51
  • While a link may provide the answer, link only answers are not okay, because a link or it's destination may change. You can keep your link as reference, but the information on how the information provided by the website should be included in the answer. – FalcoGer Aug 10 '22 at 10:05