Skip to content

Trigger service discovery if interrupted in onConnectionUpdated #610

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

cwgthornton
Copy link

It appears that when a service discovery is in progress and onConnectionUpdated is called, the service discovery callback onServicesDiscovered is never invoked. By checking to see serviceDiscoverRequested is set, we can restart the service discovery and get a result back.

This may potentially fix #536, but I was seeing this behaviour consistently when connecting to another BLE device

It appears that when a service discovery is in progress and
`onConnectionUpdated` is called, the service discovery callback
`onServicesDiscovered` is never invoked. By checking to see
`serviceDiscoverRequested` is set, we can restart the service discovery
and get a result back.

This may potentially fix NordicSemiconductor#536, but I was seeing this behaviour
consistently when connecting to another BLE device
@CLAassistant
Copy link

CLAassistant commented Feb 22, 2025

CLA assistant check
All committers have signed the CLA.

@philips77
Copy link
Member

philips77 commented Jun 5, 2025

Hi!
Wow, I just found this PR. It has been hanging here for 4+ months now. Sorry for that!
Do you still remember anything about this issue?
I think I understand it, but will need some time to do some testing.

@philips77 philips77 self-assigned this Jun 5, 2025
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

Successfully merging this pull request may close these issues.

Sometimes onServiceDiscoverd is not called when connecting.
3 participants