-
Notifications
You must be signed in to change notification settings - Fork 280
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
persistent pairing #14
Comments
#15 attempts to solve this. There can be better solutions, since that I'm not exactly familiar with the joycon protocol To test the implementation, run
|
@mart1nro I'm replying here to your comment in #15. I totally agree that this might not be desirable for inclusion in the library; however, I had to make changes to protocol.py and server.py to let the protocol supports interrup/pausing. I did some research into how to perform BT reconnection. To my understanding, we need a dedicated process for a paired bluetooth session, and we need to implement something like page scan, as mentioned here. My question: is it correct that we need a dedicated process for this? because if so, my current approach will be necessary. |
I was probably wrong. I just tried to manually reconnect to a transport._sock and it worked! The catch is that the connection needs to be properly closed in the initial paring session. |
What exactly did you do? |
Sorry, that didn't work (i.e. getting a running protocal).
I do get a connection, but it appears that switch does not send anything back. |
I added a pull request #16. An input report mode can be registered as a replacement reader in the transport. This makes some cleanup possible, if transport.close() is called, which I'm kinda neglecting at the moment. Would those changes be enough to run your code? Gonna do some testing and another review at a later date. |
closing this issue. Resolved by #17 |
I was wondering if the library can be made to persist paired session? Currently I have to go to the paring switch menu to pair the simulated controller every time I made some change to the script.
One possibility would be to create a separate process that connects the controller, and use RPC for scripts to invoke the controller in that process. Is there a better approach?
The text was updated successfully, but these errors were encountered: