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

Investigate support of retrieving connected peripherals upon scanning #17

Open
1 task done
Supereg opened this issue Feb 20, 2024 · 0 comments
Open
1 task done
Labels
enhancement New feature or request

Comments

@Supereg
Copy link
Member

Supereg commented Feb 20, 2024

Problem

CoreBluetooth provides support to retrieveConnectedPeripherals(withServices:). This returns a set of devices that are already connected to the device via different centrals.

We might need to check if that is a method CoreBluetooth should consider calling when scanning for a set of service ids. E.g., there might be peripherals connected the device via different applications that don't send bluetooth advertisements if their are already connected. This is where the above-linked method from CoreBluetooth comes in handy.

Solution

A solution would be to retrieve the list of connected devices upon scanning for nearby services. The biggest problem here is that we won't be able to reconstruct the AdvertisementData of a device. We would be missing their advertisedService and wouldn't be able to match it to a DeviceConfiguration (e.g., we have a similar problem in #16 where we would need a 2-step discovery step). Further, advertised information like he localName wouldn't be available and we might have unexpected naming if a device is retrieved via this route.

Additional context

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct and Contributing Guidelines
@Supereg Supereg added the enhancement New feature or request label Feb 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Backlog
Development

No branches or pull requests

1 participant