<tfoot id='GOhwm'></tfoot>
<i id='GOhwm'><tr id='GOhwm'><dt id='GOhwm'><q id='GOhwm'><span id='GOhwm'><b id='GOhwm'><form id='GOhwm'><ins id='GOhwm'></ins><ul id='GOhwm'></ul><sub id='GOhwm'></sub></form><legend id='GOhwm'></legend><bdo id='GOhwm'><pre id='GOhwm'><center id='GOhwm'></center></pre></bdo></b><th id='GOhwm'></th></span></q></dt></tr></i><div id='GOhwm'><tfoot id='GOhwm'></tfoot><dl id='GOhwm'><fieldset id='GOhwm'></fieldset></dl></div>
  • <legend id='GOhwm'><style id='GOhwm'><dir id='GOhwm'><q id='GOhwm'></q></dir></style></legend>
      <bdo id='GOhwm'></bdo><ul id='GOhwm'></ul>

    <small id='GOhwm'></small><noframes id='GOhwm'>

        在 Windows 10 上获取已连接的蓝牙设备列表

        时间:2023-09-13
      1. <tfoot id='GJy9n'></tfoot>
        • <bdo id='GJy9n'></bdo><ul id='GJy9n'></ul>
        • <legend id='GJy9n'><style id='GJy9n'><dir id='GJy9n'><q id='GJy9n'></q></dir></style></legend>

              • <i id='GJy9n'><tr id='GJy9n'><dt id='GJy9n'><q id='GJy9n'><span id='GJy9n'><b id='GJy9n'><form id='GJy9n'><ins id='GJy9n'></ins><ul id='GJy9n'></ul><sub id='GJy9n'></sub></form><legend id='GJy9n'></legend><bdo id='GJy9n'><pre id='GJy9n'><center id='GJy9n'></center></pre></bdo></b><th id='GJy9n'></th></span></q></dt></tr></i><div id='GJy9n'><tfoot id='GJy9n'></tfoot><dl id='GJy9n'><fieldset id='GJy9n'></fieldset></dl></div>

                <small id='GJy9n'></small><noframes id='GJy9n'>

                  <tbody id='GJy9n'></tbody>
                  本文介绍了在 Windows 10 上获取已连接的蓝牙设备列表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  这个问题可能很愚蠢,也许第一个被接受的答案会解释为什么这不是预期的用例.

                  This question might be stupid, and maybe the first accepted answer will be one that explains why this is not an intended use-case.

                  是否可以获得已经连接到机器的BT设备列表?

                  Is it possible to get a list of BT devices, that are already connect to the machine?

                  这台机器是 Win10 机器,使用纯"C#/.Net 会很好,虽然也有 32 英尺.BT 设备不是 BTLE(低能量).

                  The machine is a Win10 box and using "pure" C#/.Net would be nice, although there is also 32feet. The BT device is not BTLE (low energy).

                  设备已通过正常的 Windows 例程连接,目标是获取有关设备和连接状态的某种状态信息.

                  The device is already connected via the normal Windows routines and the goal would be to get some kind of status information about the device and the connection status.

                  附录:我搜索了很多,大多数结果都在谈论如何配对和/或连接,Win7、8 和 10 的不同功能让我很困惑.这就是为什么我这次不想包含任何代码:-)

                  Addendum: I searched a lot and most results talk about how to pair and/or connect and the different capabilities of Win7, 8 and 10 confused me quite a lot. That's why I don't want to include any code, this time :-)

                  我看到 在 C# .NET 框架中获取蓝牙设备列表,并阅读了答案和评论.它显然不是关于 UWP 而是 CLI,而且它似乎不起作用.即使是 32 英尺,因为对 DiscoverDevicesInRange 的建议 API 调用会查找范围内且处于可发现模式"的设备.尚未连接.在问题本身中,它声明它应该清楚地与 Windows.Devices.Bluetooth 一起使用,但我找不到任何真正有效的东西.

                  I saw Getting a list of bluetooth devices in a C# .NET framework and read through the answer and the comments. It is explicitly not about UWP but a CLI and furthermore, it doesn't seem to work. Even with 32feet, as the suggested API call to DiscoverDevicesInRange looks for devices that are in range and are in ‘discoverable mode’. Not connected yet. In the question itself it states that it should clearly work with Windows.Devices.Bluetooth, but I couldn't find anything that actually works.

                  推荐答案

                  您可以使用 DeviceInformation.FindAllAsync(String) 方法,可以指定字符串为BluetoothDevice.GetDeviceSelectorFromPairingState(true)code> 或 BluetoothDevice.GetDeviceSelectorFromConnectionStatus(BluetoothConnectionStatus.Connected) 如下代码.

                  You can find the Paired or Connected Bluetooth device by using the DeviceInformation.FindAllAsync(String) method, you can specify the string to be BluetoothDevice.GetDeviceSelectorFromPairingState(true) or BluetoothDevice.GetDeviceSelectorFromConnectionStatus(BluetoothConnectionStatus.Connected) as the following code.

                  //Paired bluetooth devices
                  DeviceInformationCollection PairedBluetoothDevices =
                         await DeviceInformation.FindAllAsync(BluetoothDevice.GetDeviceSelectorFromPairingState(true));
                  //Connected bluetooth devices
                  DeviceInformationCollection ConnectedBluetoothDevices =
                         await DeviceInformation.FindAllAsync(BluetoothDevice.GetDeviceSelectorFromConnectionStatus(BluetoothConnectionStatus.Connected));
                  

                  有关详细信息,您可以查看主题 Enumeratedevices 和官方 DeviceEnumerationAndPairing 示例.

                  For more information, you can see the topic Enumerate devices and the official DeviceEnumerationAndPairing sample.

                  这篇关于在 Windows 10 上获取已连接的蓝牙设备列表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                      <bdo id='ctQYB'></bdo><ul id='ctQYB'></ul>
                      <i id='ctQYB'><tr id='ctQYB'><dt id='ctQYB'><q id='ctQYB'><span id='ctQYB'><b id='ctQYB'><form id='ctQYB'><ins id='ctQYB'></ins><ul id='ctQYB'></ul><sub id='ctQYB'></sub></form><legend id='ctQYB'></legend><bdo id='ctQYB'><pre id='ctQYB'><center id='ctQYB'></center></pre></bdo></b><th id='ctQYB'></th></span></q></dt></tr></i><div id='ctQYB'><tfoot id='ctQYB'></tfoot><dl id='ctQYB'><fieldset id='ctQYB'></fieldset></dl></div>
                        <tbody id='ctQYB'></tbody>

                      <small id='ctQYB'></small><noframes id='ctQYB'>

                      1. <legend id='ctQYB'><style id='ctQYB'><dir id='ctQYB'><q id='ctQYB'></q></dir></style></legend>
                        <tfoot id='ctQYB'></tfoot>