The root of the problem is that the host doesn't really know whether or not the device "remembers" an authentication that happened in the past: the device could have deleted the information. My first attempt was to use BluetoothDeviceInfo.Authenticated,
but that only checks the host's information.
The symptom is that a call to BluetoothClient.Connect will pop a pair dialog on the device side that is currently guaranteed to fail (if the device is not already authenticated). The information that that unexpected authentication attempt requires
isn't available yet, and gathering it ahead of time makes the usual case (the device hasn't lost its authentication) cumbersome.
My question therefore is to ask what the appropriate way to establish a connection with a device that may or may not remember its authentication?
The options I see are:
1) Call connect in a way that it will fail without popping a dialog on the device.
2) Check ahead of time if connect will pop a dialog on the device.
3) Use BluetoothWin32Authentication - that looks perfect. It appears to only be supported as MSFT/Win32 right now. I'm fine with the Win32 limitation, but we're hoping to support widcomm as well.