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

Muse lsl connection timeout argument #200

Merged
merged 5 commits into from
Apr 22, 2024

Conversation

aureateAnatidae
Copy link
Contributor

@aureateAnatidae aureateAnatidae commented Sep 22, 2023

Either my laptop is slow or it's because I have an original muse, it seems to have an issue timing out before it can establish a connection. This pull request adds a -t --timeout argument to the argument parser, allowing my machine to try connecting for longer before the timeout argument.

Also, a variable setting the default timeout length AUTO_DISCONNECT_DELAY in constants.py was commented out, and its only use was in stream.py has been deleted. The default timeout length was set in the argument parsers in cli.py (10.0) to relieve its role. Please be wary that the connection timeout and scan timeout are different variables addressed by the same name. This pull request addresses the former.

I only have the means to test this with bluetoothctl/bleak, so I'm kinda just hoping it doesn't break something sending a timeout argument to gatt or hci or windows or something. I've been using python 3.11 on Debian 12, bluetoothctl 5.66.

I've never done this kind of open-source thing, so please provide advice liberally :).

Should resolve #178

Hadn't noticed this other person's issue before, but glad someone else mentioned it.

@aureateAnatidae aureateAnatidae changed the title Muse lsl timeout Muse lsl connection timeout argument Sep 22, 2023
@jdpigeon jdpigeon merged commit 524ce0e into alexandrebarachant:master Apr 22, 2024
1 of 4 checks passed
@aureateAnatidae
Copy link
Contributor Author

2024-05-01_08:22:35

I fear I've messed something up. Could someone confirm that this is happening? Removing the int(self.timeout) from the logger.info line in cli.py seems to help.

@aureateAnatidae
Copy link
Contributor Author

Uh, this is a bit embarrassing, but I shadowed the AUTO_DISCONNECT_DELAY as timeout and now the program will only disconnect after --timeout seconds after not receiving info from the muse.

jdpigeon added a commit that referenced this pull request May 9, 2024
jdpigeon added a commit that referenced this pull request May 9, 2024
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.

Please increase tiemouts or add to command line options.
2 participants