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

Server connection events #521

Merged
merged 3 commits into from Sep 29, 2023
Merged

Server connection events #521

merged 3 commits into from Sep 29, 2023

Conversation

philips77
Copy link
Member

This PR fixes #506. At least I hope so. @nadrolinux, please check.

When a server disconnection event is received and corresponding BleManager exists, the server manager will call notifyDeviceDisconnected(...), which should reset the states to STATE_DISCONNECTED and notify the requests.

Also, when the server manager was set for a BleManager, and the device is used as client (that is connect(..) is used, the manager now calls connect(..) method in the BluetoothGattServer. This should make the connection reference persistent in the server. I don't think this is necessary, as it was working before, but should work with it as well.

@philips77 philips77 merged commit 03299f1 into main Sep 29, 2023
1 check passed
@philips77 philips77 deleted the improvement/server-events branch September 29, 2023 09:52
@nadrolinux
Copy link

Hi @philips77
Sorry, I'm replying so late. I can confirm that this PR solved an issue. Thanks.

@philips77 philips77 mentioned this pull request Oct 18, 2023
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.

attachClientConnection problem on Android 10 devices.
2 participants