Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Cannot get notifications from some BLE characteristics with WhenNotificationReceived() from ManagedPeripheral #958

Closed
10 of 11 tasks
gsgou opened this issue Mar 18, 2022 · 2 comments
Labels
bug Something isn't working unverified This issue has not been verified by a maintainer

Comments

@gsgou
Copy link

gsgou commented Mar 18, 2022

Component/Nuget

BluetoothLE Client (Shiny.BluetoothLE)

What platform(s) are effected?

  • iOS 12
  • iOS 13
  • iOS 14
  • iOS 15
  • Android 8
  • Android 9
  • Android 10
  • Android 11
  • Android 12
  • UWP (Sponsors ONLY)

Steps To Reproduce

Call:
FAILS:
_managedPeripheral
.WhenNotificationReceived(serviceUuid, characteristicUuid)
.SubOnMainThread(data =>
{
System.Diagnostics.Debug.WriteLine($"== HR data from managed peripheral: {data[0]}");
});
WORKS:
_managedPeripheral
.WhenAnyNotificationReceived()
.SubOnMainThread(characteristicResult =>
{
System.Diagnostics.Debug.WriteLine($"== HR data from managed peripheral: {characteristicResult.Data[0]}");
});
WORKS:
_managedPeripheral
.WhenAnyNotificationReceived()
.Where(x =>
x.Characteristic.Service.Uuid.Equals(serviceUuid, StringComparison.InvariantCultureIgnoreCase) &&
x.Characteristic.Uuid.Equals(characteristicUuid, StringComparison.InvariantCultureIgnoreCase))
.Select(x => x.Data)
.SubOnMainThread(data =>
{
System.Diagnostics.Debug.WriteLine($"== HR data from managed peripheral: {data[0]}");
});

Expected Behavior

Data shown in "Application Output"

Actual Behavior

Data not shown in "Application Output"

Exception or Log output

No response

Code Sample

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@gsgou gsgou added bug Something isn't working unverified This issue has not been verified by a maintainer labels Mar 18, 2022
@aritchie
Copy link
Member

Please submit a PR in the future for something you have solved.

@gsgou
Copy link
Author

gsgou commented Mar 18, 2022

Thanks i will.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working unverified This issue has not been verified by a maintainer
Projects
None yet
Development

No branches or pull requests

2 participants