TimoKinnunen / MauiXAMLBluetoothLE

.Net MAUI app using Plugin.BLE for Polar H10 Heart Rate Sensor. Bluetooth LE working solution on Android.
52 stars 12 forks source link

Impossible to scan devices on windows #3

Open andrenoel84 opened 1 year ago

andrenoel84 commented 1 year ago

Hi, I wanted to thank you for your code. It allows me to test Plugin.BLE before integration in a custom project. I succeed running the app on android but I have an issue on Windows. The app starts well and when I start the ble scan it returns "Unable to find nearby Bluetooth LE devices. Try again.".

Did you tried it on Windows ?

I'll search if permissions are set correctly

Thank you for your support Regards

cn-johndpope commented 1 year ago

possibly related https://github.com/TimoKinnunen/MauiXAMLBluetoothLE/issues/7

cn-johndpope commented 1 year ago

just rip HeartRateUuids.HeartRateServiceUuids -then you may see more devices.

        IReadOnlyList<IDevice> systemDevices = Adapter.GetSystemConnectedOrPairedDevices(HeartRateUuids.HeartRateServiceUuids);

->

        IReadOnlyList<IDevice> systemDevices = Adapter.GetSystemConnectedOrPairedDevices();

await Adapter.StartScanningForDevicesAsync(HeartRateUuids.HeartRateServiceUuids);

->

await Adapter.StartScanningForDevicesAsync();

TimoKinnunen commented 1 year ago

That is right!