32Feet - 只发现范围内的设备

32Feet - Discover only devices in range

是否有任何方法可以发现当前使用 32Feet 范围内的所有设备?

我试过了

BluetoothDeviceInfo[] allDevicesInRange = client.DiscoverDevices(255, false, false, true);

此 returns 所有 未知 范围内的设备。一旦我与我的设备配对,如果我再次尝试此操作,它将不会再次找到该设备(因为它不再是未知的)。我必须进入 Windows 中的蓝牙设备小程序并将其删除,然后才能再次找到它。

我也都试过了

BluetoothDeviceInfo[] allDevicesInRange = client.DiscoverDevices(255, false, true, true);

BluetoothDeviceInfo[] allDevicesInRange = client.DiscoverDevices(255, true, false, true);

在这种情况下,它每次都能找到我的设备,但现在即使设备关闭也能找到它们!

BluetoothDeviceInfo[] DiscoverDevices(int maxDevices, bool authenticated, bool remembered, bool unknown, bool discoverableOnly);

您将不得不分两部分完成

  1. 发现所有经过身份验证的设备,即您拥有和配对的设备,然后依次手动尝试连接到每个设备,以测试它是否在范围内。

  2. 发现所有未通过身份验证的设备(这将 return 仅存在且在范围内但您尚未/未配对的设备)