joycontrol icon indicating copy to clipboard operation
joycontrol copied to clipboard

Disconnected when press a

Open ourfor opened this issue 3 years ago • 7 comments

  • 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 avatar Jul 13 '21 17:07 ourfor

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

I seem to have found a solution. https://github.com/Poohl/joycontrol/issues/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

Android-KitKat avatar Jul 23 '21 15:07 Android-KitKat

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

lowlevel-1989 avatar Sep 15 '21 17:09 lowlevel-1989

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 avatar Oct 18 '21 21:10 knoup

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.

knoup avatar Oct 20 '21 13:10 knoup

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.

Android-KitKat avatar Oct 21 '21 01:10 Android-KitKat

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!

UnbalancedCat avatar Sep 07 '22 02:09 UnbalancedCat

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

SliceJosiah avatar Aug 11 '24 07:08 SliceJosiah