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

Apis 1081 explore desktop freezes when device is turned off during streaming #315

Draft
wants to merge 7 commits into
base: develop
Choose a base branch
from

Conversation

SonjaSt
Copy link
Contributor

@SonjaSt SonjaSt commented Dec 12, 2024

  • Removed reconnection counter / trying to reconnect multiple times (based on Maziar's request)
  • Added a step to check for services offered by the bleak client and exit if the EEG service is not listed anymore (not on Mac)
  • Also added unpairing (not on Mac)

This isn't tested on Linux and should be regarded as a hotfix for the issue, turning off the device, reconnecting, disconnecting all seems to work "as expected" now on Mac and Windows.

@SonjaSt SonjaSt requested a review from salman2135 December 12, 2024 10:43
@SonjaSt
Copy link
Contributor Author

SonjaSt commented Dec 13, 2024

I've added a wait on disconnect before trying to reconnect on Windows - only on Windows does not waiting cause ExploreDesktop to freeze in my (limited) tests. It seems to get the service and characteristic just fine and then... can't notify on the characteristic.

Anyway, this "fix" was tested on Mac, Linux and Windows and "works" (it worked for me).

In general, calls to connect, disconnect and get characteristics from the backend seem to occasionally freeze the program on the different OSes with different behaviour, which leads me to believe we're not handling disconnects or lack of updates correctly, this definitely should be revisited.

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.

1 participant