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

iOS 16.4.1 Scan doesn't return service uuids #528

Open
eppleton opened this issue Apr 26, 2023 · 8 comments
Open

iOS 16.4.1 Scan doesn't return service uuids #528

eppleton opened this issue Apr 26, 2023 · 8 comments
Labels
bug Something isn't working

Comments

@eppleton
Copy link

Up to iOS version 16.4.1 a BLE Scan without setting a filter for service ids would return devices with the service uuids from the advertisement. This behavior has changed and in version 16.4.1 the uuids are no longer returned.

Applying a filter for service uuids fixes thew problem. For background: we have a cross platform app and had to disable filters, because some older Android devices do not support filtering for services (they will simply not find any devices).

@eppleton eppleton added the bug Something isn't working label Apr 26, 2023
@ASHBAW
Copy link

ASHBAW commented Apr 26, 2023

It may be related to my #527 issue (missing local name in scan response). Somebody made the suggestion of trying allowDuplicates=true in the scan options. You will get duplicates but I am now able to see the local name.

@eppleton
Copy link
Author

eppleton commented Apr 26, 2023

Thanks for the quick reply, I can confirm that I do have the issue with local name as well, but it's not a problem in my case. Thanks for the hint with allowDuplicates. I use it sometimes for a subset of devices that send state info in the advertisments, but I wouldn't want to use it for everything. Gladly, I was able to fix my problem by applying a uuid filter when on iOS. I hope that the App Store review is fast this time, because we have angry customers and it costs us real money.

One of the problems with the issue is, that it doesn't occur on all devices. On my iPhone 11 Pro Max that I usually use for testing the issue doesn't appear. I think the reason might be that Apple caches some information about devices like the device name and service uuids. If you have scanned the device before the upgrade to 16.4.1 the information is in the cache and everything seems to work, whereas new users of the app would experience the issue.

I was only able to reproduce the issue after I used an iPhone that didn't have our app installed before.

@eppleton
Copy link
Author

I suspect this and the local name issue is not a bug in bluetooth-le, but rather in iOS bluetooth core: https://developer.apple.com/forums/thread/728842

@peitschie
Copy link

@eppleton iOS caches a lot of data about previously seen Bluetooth devices. To fully clear the caches, I believe you need a full phone factory reset to avoid the caching behaviour there for advertising packets.

@LgArcida
Copy link

Still an issue, is there any workaround on this?

@ASHBAW
Copy link

ASHBAW commented Dec 20, 2023

Somebody made the suggestion of trying allowDuplicates=true in the scan options. You will get duplicates but I am now able to see the local name.

@LgArcida
Copy link

Yeah tried that one but still the same
Name is partially correct and when adding any other type of filter like optionalServices devices wont be visible anymore

@robsonos
Copy link

robsonos commented Feb 8, 2024

Hi,
I am facing a similar issue. The number of UUIDs returned from iOS is smaller than from Android.
Is there any progress on this? Is there anything I can help with?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants