7

According to Microsoft's latest docs:

Do I have to pair Bluetooth devices before using them? You don't have to for Bluetooth RFCOMM (classic) devices. Starting with Windows 10 release 1607, you can simply query for nearby devices and connect to them. The updated RFCOMM Chat Sample shows this functionality.

However, when I try to connect to my devices using this chat sample, I get a notification that asks me to "set up the device", like I was going through a normal pairing process.

Am I missing something?

The snippet of code that I changed from the sample:

var rfcommServices = await bluetoothDevice.GetRfcommServicesAsync(BluetoothCacheMode.Uncached);
Dirk
  • 6,774
  • 14
  • 51
  • 73

2 Answers2

3

Taken from msdn resources:

Windows 10 Mobile is currently limited to connections with only paired devices. In Windows 10, you can programmatically pair/unpair. See scenarios 8 and 9:

https://github.com/Microsoft/Windows-universal-samples/tree/master/Samples/DeviceEnumerationAndPairing

Here’s is the related MSDN documentation on pairing and the relevant device selectors for enumeration.

https://msdn.microsoft.com/en-us/library/windows/apps/windows.devices.enumeration.deviceinformationpairing.aspx

https://msdn.microsoft.com/en-us/library/windows/apps/windows.devices.bluetooth.bluetoothdevice.aspx

But I also know that you can use direct bluetooth connections on lower level and this way windows won't suggest you pairing. For example, that's how things work with 32feet.net library, discussed in this answer (I worked with it and it was fine, however it is currently unsupported so please beware of it).

Jehy
  • 4,729
  • 1
  • 38
  • 55
  • Unfortunately, the forum you linked is from 2016: https://learn.microsoft.com/en-us/windows/uwp/devices-sensors/bluetooth-dev-faq is where I took the comment from. – Dirk Dec 24 '17 at 16:11
  • Yup. Windows mobile is dead now but I don't think that anything changed for Windows 10. – Jehy Dec 25 '17 at 10:08
2

First thing to test is the bluetooth protocol used to be RFCOMM in both client and server. Link Check that both client and server hardware support the RFCOMM Check the bluetooth versions in both client and server link

based on wikipedia bluetooth has many protocols.

Second is to check windows version

enter image description here