可连接的可用蓝牙低功耗设备列表

时间:2019-06-13 13:21:50

标签: c# wpf list bluetooth-lowenergy

在我的WPF应用程序中,我需要能够显示所有可用的Bluetooth Low Energy设备。这样,用户可以选择要连接的那一个。最好将设备的名称列出来。

此示例不起作用

 BluetoothClient client = new BluetoothClient();
        List<string> items = new List<string>();
        BluetoothDeviceInfo[] devices = client.DiscoverDevicesInRange();
        foreach (BluetoothDeviceInfo d in devices)
        {
            items.Add(d.DeviceName);
        }

0 个答案:

没有答案
相关问题