Bluetooth UWP-Xamarin表单上的蓝牙串行端口

Bluetooth UWP-Xamarin表单上的蓝牙串行端口,bluetooth,serial-port,uwp,xamarin.forms,xamarin.uwp,Bluetooth,Serial Port,Uwp,Xamarin.forms,Xamarin.uwp,我正在尝试使用xamarin.forms应用程序中的串行端口连接到财政打印机。 我设法让它在android上工作,但我在UWP上遇到了一些麻烦。 我目前正在桌面上测试它,如果它重要的话 wait DeviceInformation.FindAllAsync()-无论我是否使用选择器调用它,此行都不会返回 var sel = SerialDevice.GetDeviceSelector("COM7"); var coll = await DeviceInformation.FindAllAsyn

我正在尝试使用xamarin.forms应用程序中的串行端口连接到财政打印机。 我设法让它在android上工作,但我在UWP上遇到了一些麻烦。 我目前正在桌面上测试它,如果它重要的话

wait DeviceInformation.FindAllAsync()-无论我是否使用选择器调用它,此行都不会返回

var sel = SerialDevice.GetDeviceSelector("COM7");

var coll = await DeviceInformation.FindAllAsync(sel);
它只是挂着。有人知道如何使用FindAllSync/有类似的问题吗?我在网上找到了一些例子,但它们似乎不起作用,这个方法对我来说总是挂起

我还尝试使用另一种方法,使用devicewatcher,我能够获得所有设备的列表和bluetoothdevice对象,但是我无法为它创建serialport