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

Small inconsistency between iOS and Android with short/long UUID #76

Closed
xvrh opened this issue Jun 19, 2020 · 5 comments
Closed

Small inconsistency between iOS and Android with short/long UUID #76

xvrh opened this issue Jun 19, 2020 · 5 comments

Comments

@xvrh
Copy link
Contributor

xvrh commented Jun 19, 2020

Full disclosure: I don't really understand what I'm talking about :-) I'm just reporting this in case it helps someone.

Describe the bug
I noticed a small difference between Android and iOS when registering a characteristic for Notification (subscribeToCharacteristic).

My device "somehow" uses "short UUID" (16 bits) but I was using the long form (128bits) in my code (QualifiedCharacteristic).
It works for Read and Write on both Android and iOS. But for "Subscribe" it only works for Android.

On iOS I had no error but I never received the data.

With the short Uuid, the notification worked on both platform.

Expected behavior
It should work the same on both Android and iOS. The iOS code should probably map the short Uuid (sent by the device?) to the long form registered on the phone?

Smartphone / tablet

  • Device: iPhone 11 and Moto G5
  • OS: iOS 13, Android 8.1
  • Package version: 2.2.0

Peripheral device

  • Vendor, model: ESP32
  • Does it run a custom firmware / software: custom firmware based on ESP-IDF v4
@werediver
Copy link
Collaborator

@xvrh I imagine it wasn't easy to figure this out, thank you for sharing your findings.

The library doesn't do any transformations on service or characteristic IDs and at the moment I am not sure there is a strict rule of mapping short IDs to long or vice versa that would consistently work in all cases with all devices.

I'm afraid, your solution is a solution for a particular kind of devices and may not work with others. If you have reasons to think otherwise, I'd appreciate if you provide your references.

@xvrh
Copy link
Contributor Author

xvrh commented Jun 23, 2020

Hi Raman, Thanks for the answer.

What surprise me, is that it worked with the plugin "flutter_blue".
I will try to dig into this a bit to understand where the data is lost.

@remonh87
Copy link
Contributor

remonh87 commented Jul 24, 2020

@xvrh any luck on your investigation why the data is lost?

@xvrh
Copy link
Contributor Author

xvrh commented Jul 24, 2020

@remonh87 sorry, not yet.
I will close this issue until I have more concrete information to report :-)

Thanks.

@LiangHuangBC
Copy link

Any update on this issue? I have same issue, subscribeToCharacteristic is only working on android, there is no data on IOS. Not sure what you mean by shot UUID or long. Anyway to pass this around?

@remonh87 sorry, not yet. I will close this issue until I have more concrete information to report :-)

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants