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

Disconnected when press a #7

Open
ourfor opened this issue Jul 13, 2021 · 7 comments
Open

Disconnected when press a #7

ourfor opened this issue Jul 13, 2021 · 7 comments

Comments

@ourfor
Copy link

ourfor commented Jul 13, 2021

  • bluetooth Intel Wireless AC 8265
  • system Ubuntu 20.04.2 LTS
  • switch 12.0.1

bluetoothctl-show-output.txt
output.zip

cmd >> a
cmd >> [01:19:08] joycontrol.transport read::94 ERROR - No data received.
[01:19:08] joycontrol.protocol connection_lost::246 ERROR - Connection lost.
[01:19:08] asyncio default_exception_handler::1707 ERROR - Task exception was never retrieved
future: <Task finished name='Task-981' coro=<L2CAP_Transport.close() done, defined at /home/ourfor/Code/joycontrol/joycontrol/transport.py:203> exception=OSError(107, 'Transport endpoint is not connected')>
Traceback (most recent call last):
  File "/home/ourfor/Code/joycontrol/joycontrol/transport.py", line 219, in close
    await self._read_thread
  File "/home/ourfor/Code/joycontrol/joycontrol/transport.py", line 78, in _reader
    await self._protocol.report_received(await self.read(), self._itr_sock.getpeername())
OSError: [Errno 107] Transport endpoint is not connected
[01:19:08] asyncio default_exception_handler::1707 ERROR - Exception in callback create_error_check_callback.<locals>.callback(<Task finishe...t connected')>) at /home/ourfor/Code/joycontrol/joycontrol/utils.py:55
handle: <Handle create_error_check_callback.<locals>.callback(<Task finishe...t connected')>) at /home/ourfor/Code/joycontrol/joycontrol/utils.py:55>
Traceback (most recent call last):
  File "/usr/lib/python3.8/asyncio/events.py", line 81, in _run
    self._context.run(self._callback, *self._args)
  File "/home/ourfor/Code/joycontrol/joycontrol/utils.py", line 58, in callback
    future.result()
  File "/home/ourfor/Code/joycontrol/joycontrol/transport.py", line 219, in close
    await self._read_thread
  File "/home/ourfor/Code/joycontrol/joycontrol/transport.py", line 78, in _reader
    await self._protocol.report_received(await self.read(), self._itr_sock.getpeername())
OSError: [Errno 107] Transport endpoint is not connected
[01:19:08] joycontrol.protocol _writer::174 WARNING - Writer exited...
@ourfor ourfor changed the title Disconnect when press a Disconnected when press a Jul 14, 2021
@Android-KitKat
Copy link

Android-KitKat commented Jul 23, 2021

Same error.
It may happen as you leave the "Change Grip/Order" menu.

I seem to have found a solution. #4

Troubleshooting

  1. If you loose connection immediately when leaving the pairing screen, now try with the -r option (keep the pairing) and see if you can get a connection on the home screen

@lowlevel-1989
Copy link

automatic reconnection prototype
worked with https://github.com/formatcom/joytransfer

NINTENDO SWITCH

  • version 12.1.0
  • version 13.0.0

DEMO:
https://www.youtube.com/watch?v=GBxLCyi0jz8

connect joycon after sync cause disconnection
https://www.youtube.com/watch?v=XbHErgeM34E

@knoup
Copy link

knoup commented Oct 18, 2021

Hey, I am really desperate and having the same issue. I'm running this:

sudo python3 run_controller_cli.py PRO_CONTROLLER --nfc "/home/user/Downloads/Cards/biskit.bin"

It pairs, but as soon as I press A, it gets disconnected with exactly the same message as OP. I've tried to then CTRL+C and run the same command with -r auto at the end, doesn't make a difference.

Joytransfer works, but it seems I can't set NFC using it...

Is there any noob friendly way to get this to work? I just want to scan amiibo cards.

@knoup
Copy link

knoup commented Oct 20, 2021

Same error. It may happen as you leave the "Change Grip/Order" menu.

I seem to have found a solution. #4

Troubleshooting

  1. If you loose connection immediately when leaving the pairing screen, now try with the -r option (keep the pairing) and see if you can get a connection on the home screen

UPDATE: I can confirm this works. I wasn't doing it on the home screen. Might take a couple of attempts.

@Android-KitKat
Copy link

Android-KitKat commented Oct 21, 2021

Same error. It may happen as you leave the "Change Grip/Order" menu.
I seem to have found a solution. #4

Troubleshooting

  1. If you loose connection immediately when leaving the pairing screen, now try with the -r option (keep the pairing) and see if you can get a connection on the home screen

UPDATE: I can confirm this works. I wasn't doing it on the home screen. Might take a couple of attempts.

There is another way to try.

Run the pause command before the operation that causes the disconnection, and then run the unpause command after the operation is completed.

I found this mentioned here. #4

Pause input

If you get consistent disconnects in some situation do the following:

  1. [If you want it fixed]:
    install tshark and run tshark -i bluetooth0 -w output.pcapng while it happens (started preferably before joycontrol). Submit an Issue with the file (eg on Gdrive) and output of bluetoothctl show while joycontrol runs.
  2. try to issue pause just before it happens. This will stop any input and usually prevents disconnects for 10 seconds. But you have to unpause within those 10 seconds, else the connection times out.

My English is not good, forgive me for using translation.

@UnbalancedCat
Copy link

Same error. It may happen as you leave the "Change Grip/Order" menu.
I seem to have found a solution. #4

Troubleshooting

  1. If you loose connection immediately when leaving the pairing screen, now try with the -r option (keep the pairing) and see if you can get a connection on the home screen

UPDATE: I can confirm this works. I wasn't doing it on the home screen. Might take a couple of attempts.

There is another way to try.

Run the pause command before the operation that causes the disconnection, and then run the unpause command after the operation is completed.

I found this mentioned here. #4

Pause input

If you get consistent disconnects in some situation do the following:

  1. [If you want it fixed]:
    install tshark and run tshark -i bluetooth0 -w output.pcapng while it happens (started preferably before joycontrol). Submit an Issue with the file (eg on Gdrive) and output of bluetoothctl show while joycontrol runs.
  2. try to issue pause just before it happens. This will stop any input and usually prevents disconnects for 10 seconds. But you have to unpause within those 10 seconds, else the connection times out.

My English is not good, forgive me for using translation.

It worked! Thx a lot!

@SliceJosiah
Copy link

Same error. It may happen as you leave the "Change Grip/Order" menu.
I seem to have found a solution. #4

Troubleshooting

  1. If you loose connection immediately when leaving the pairing screen, now try with the -r option (keep the pairing) and see if you can get a connection on the home screen

UPDATE: I can confirm this works. I wasn't doing it on the home screen. Might take a couple of attempts.

There is another way to try.

Run the pause command before the operation that causes the disconnection, and then run the unpause command after the operation is completed.

I found this mentioned here. #4

Pause input

If you get consistent disconnects in some situation do the following:

  1. [If you want it fixed]:
    install tshark and run tshark -i bluetooth0 -w output.pcapng while it happens (started preferably before joycontrol). Submit an Issue with the file (eg on Gdrive) and output of bluetoothctl show while joycontrol runs.
  2. try to issue pause just before it happens. This will stop any input and usually prevents disconnects for 10 seconds. But you have to unpause within those 10 seconds, else the connection times out.

My English is not good, forgive me for using translation.

Neither of these work for me

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

No branches or pull requests

6 participants