简体   繁体   English

为什么BluetoothLEDevice FromIdAsync返回断开连接的设备?

[英]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.

相关问题 UWP BluetoothDevice.FromIdAsync() 返回 null - UWP BluetoothDevice.FromIdAsync() returns null 在Qt上检测到新的USB设备已连接/断开连接 - Detected new usb device connected/disconnected on Qt 如何检测蓝牙HID设备是否断开连接? - How to detect if a Bluetooth HID device was disconnected? 远程桌面断开连接时,GetForegroundWindow返回Null - GetForegroundWindow returns Null when remote desktop is disconnected Winsock sendto 返回错误 10049 (WSAEADDRNOTAVAIL) 广播地址后。网络适配器被禁用或物理断开 - Winsock sendto returns error 10049 (WSAEADDRNOTAVAIL) for broadcast address after network adapter is disabled or physically disconnected LdrLoadDll 返回 STATUS_DLL_NOT_FOUND 的原因? - Reason why LdrLoadDll returns STATUS_DLL_NOT_FOUND? SetDIBitsToDevice返回错误代码(0)时如何查找错误原因 - How can I find reason of the error when SetDIBitsToDevice returns error code (0) GetRawInputDeviceInfo在Windows XP中返回错误的USB HID设备名称语法 - GetRawInputDeviceInfo returns wrong syntax of USB HID device name in Windows XP WsKSendTo返回STATUS_INVALID_DEVICE_STATE:这是什么意思? - WsKSendTo returns STATUS_INVALID_DEVICE_STATE: what does it mean? GetRawInputDeviceInfo 在 Windows 10 中返回错误的 USB HID 设备名称语法 - GetRawInputDeviceInfo returns wrong syntax of USB HID device name in Windows 10
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM