[英]Reason that BluetoothLEDevice FromIdAsync returns a disconnected device?
I'm running a UWP/C# app in Windows 10 and attempting to connect to a Bluetooth LE device (that was successfully paired) using BluetoothLEDevice.FromIdAsync(). 我在Windows 10中运行UWP / C#应用程序,并尝试使用BluetoothLEDevice.FromIdAsync()连接到Bluetooth LE设备(已成功配对)。 It returns a device object, but it's always in a disconnected state. 它返回设备对象,但始终处于断开状态。 I've tried re-pairing the device multiple times, but it doesn't help. 我已经尝试过多次重新配对设备,但这无济于事。 This device successfully connects in other environments - it's just Windows/UWP where I'm having trouble. 该设备可以在其他环境中成功连接-我遇到麻烦的只是Windows / UWP。 Thoughts? 有什么想法吗? After pairing, should a consent dialog automatically appear when attempting to connect? 配对后,尝试连接时是否应自动显示同意对话框?
You must interact with it in order to connect to it, for example read/write some GATT value. 您必须与之交互才能连接到它,例如读/写一些GATT值。 You can also enable notifications for some characteristic which then will make the Bluetooth stack have a connection open to the device. 您还可以启用某些特性的通知,这将使Bluetooth堆栈与设备的连接打开。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.