Toggle menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Joycontrol Switch: Difference between revisions

From GameBrew
(Created page with "{{Infobox Switch Homebrews |title=Joycontrol |image=joycontrolswitch.png |description=Emulate Nintendo Switch Controllers over Bluetooth. |author=mart1nro |lastupdated=2020/12/19 |type=PC Utilities |version=2020 |license=GPL-3.0 |download=https://dlhb.gamebrew.org/switchhomebrews/joycontrolswitch.7z |website=https://github.com/mart1nro/joycontrol |source=https://github.com/mart1nro/joycontrol |donation= }} {{#seo: |title=Switch Homebrew PC Tools (PC Utilities) - GameBrew...")
 
No edit summary
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
{{Infobox Switch Homebrews
{{Infobox Switch Homebrews
|title=Joycontrol
|title=Joycontrol
|image=joycontrolswitch.png
|image=joycontrolnx.png
|description=Emulate Nintendo Switch Controllers over Bluetooth.
|description=Emulate Nintendo Switch Controllers over Bluetooth.
|author=mart1nro
|author=mart1nro
|lastupdated=2020/12/19
|lastupdated=2020/12/19
|type=PC Utilities
|type=Remote Play and Streaming
|version=2020
|version=2020
|license=GPL-3.0
|license=GPL-3.0
|download=https://dlhb.gamebrew.org/switchhomebrews/joycontrolswitch.7z
|download=https://dlhb.gamebrew.org/switchhomebrews/joycontrolnx.7z
|website=https://github.com/mart1nro/joycontrol
|website=https://github.com/mart1nro/joycontrol
|source=https://github.com/mart1nro/joycontrol
|source=https://github.com/mart1nro/joycontrol
|donation=
|donation=
}}
}}
{{#seo:
|title=Switch Homebrew PC Tools (PC Utilities) - GameBrew
|title_mode=append
|image=joycontrolswitch.png
|image_alt=Joycontrol
}}
{{cleanup|article|Needs cleanup}}
Emulate Nintendo Switch Controllers over Bluetooth.
Emulate Nintendo Switch Controllers over Bluetooth.


==Media==
Tested on Ubuntu 19.10, and with Raspberry Pi 3B+ and 4B Raspbian GNU/Linux 10 (buster).
<youtube></youtube>
 
==Features==
* Emulation of JOYCON_R, JOYCON_L and PRO_CONTROLLER.
* Able to send:
** button commands
** stick state
 
==Installation==
Install dependencies:
* Ubuntu:
** Install the <code>dbus-python</code> and <code>libhidapi-hidraw0</code> packages
** <code>sudo apt install python3-dbus libhidapi-hidraw0</code>
* Arch Linux Derivatives:
** Install the <code>hidapi</code> and <code>bluez-utils-compat</code>(AUR) packages
 
Clone the repository and install the joycontrol package to get missing dependencies:
* (Note: Controller script needs super user rights, so python packages must be installed as root).
* In the joycontrol folder run: <code>sudo pip3 install .</code>
 
Consider to disable the bluez "input" plugin, see [https://github.com/mart1nro/joycontrol/issues/8 #8].
 
==User guide==
===Command line interface example===
Run the script:
* <code>sudo python3 run_controller_cli.py PRO_CONTROLLER</code>
* This will create a PRO_CONTROLLER instance waiting for the Switch to connect.
 
Open the "Change Grip/Order" menu of the Switch:
* The Switch only pairs with new controllers in the "Change Grip/Order" menu.
* Note: If you already connected an emulated controller once, you can use the reconnect option of the script (-r "<Switch Bluetooth Mac address>"). This does not require the "Change Grip/Order" menu to be opened. You can find out a paired mac address using the "bluetoothctl" system command.
 
After connecting, a command line interface is opened. Note: Press <enter> if you don't see a prompt.
* Call "help" to see a list of available commands.
* If you call "test_buttons", the emulated controller automatically navigates to the "Test Controller Buttons" menu.


===Resources===
* [https://github.com/dekuNukem/Nintendo_Switch_Reverse_Engineering Nintendo_Switch_Reverse_Engineering]
* [https://github.com/timmeh87/switchnotes/blob/master/console_pairing_session console_pairing_session]


==Screenshots==
==Known issues==
https://dlhb.gamebrew.org/switchhomebrews/joycontrolswitch-01.png
* Some bluetooth adapters seem to cause disconnects for reasons unknown, try to use an usb adapter instead.
https://dlhb.gamebrew.org/switchhomebrews/joycontrolswitch-02.png
* Incompatibility with Bluetooth "input" plugin requires a bluetooth restart, see [https://github.com/mart1nro/joycontrol/issues/8 #8].
https://dlhb.gamebrew.org/switchhomebrews/joycontrolswitch-03.png
* It seems like the Switch is slower processing incoming messages while in the "Change Grip/Order" menu. This causes flooding of packets and makes pairing somewhat inconsistent. Not sure yet what exactly a real controller does to prevent that. A workaround is to use the reconnect option after a controller was paired once, so that opening of the "Change Grip/Order" menu is not required.
https://dlhb.gamebrew.org/switchhomebrews/joycontrolswitch-04.png
https://dlhb.gamebrew.org/switchhomebrews/joycontrolswitch-05.png
https://dlhb.gamebrew.org/switchhomebrews/joycontrolswitch-06.png
https://dlhb.gamebrew.org/switchhomebrews/joycontrolswitch-07.png
https://dlhb.gamebrew.org/switchhomebrews/joycontrolswitch-08.png


==Changelog==
==Credits==
'''v.1.0'''
*Special thanks to https://github.com/dekuNukem/Nintendo_Switch_Reverse_Engineering for reverse engineering of the joycon protocol.
* First Release.
*Thanks to the growing number of contributers and users.


== External links ==
== External links ==
* Gbatemp - https://github.com/mart1nro/joycontrol
* GitHub - https://github.com/mart1nro/joycontrol
* Github - https://github.com/mart1nro/joycontrol
* Reddit -

Latest revision as of 11:39, 20 Haziran 2023

Joycontrol
Joycontrolnx.png
General
Authormart1nro
TypeRemote Play and Streaming
Version2020
LicenseGPL-3.0
Last Updated2020/12/19
Links
Download
Website
Source

Emulate Nintendo Switch Controllers over Bluetooth.

Tested on Ubuntu 19.10, and with Raspberry Pi 3B+ and 4B Raspbian GNU/Linux 10 (buster).

Features

  • Emulation of JOYCON_R, JOYCON_L and PRO_CONTROLLER.
  • Able to send:
    • button commands
    • stick state

Installation

Install dependencies:

  • Ubuntu:
    • Install the dbus-python and libhidapi-hidraw0 packages
    • sudo apt install python3-dbus libhidapi-hidraw0
  • Arch Linux Derivatives:
    • Install the hidapi and bluez-utils-compat(AUR) packages

Clone the repository and install the joycontrol package to get missing dependencies:

  • (Note: Controller script needs super user rights, so python packages must be installed as root).
  • In the joycontrol folder run: sudo pip3 install .

Consider to disable the bluez "input" plugin, see #8.

User guide

Command line interface example

Run the script:

  • sudo python3 run_controller_cli.py PRO_CONTROLLER
  • This will create a PRO_CONTROLLER instance waiting for the Switch to connect.

Open the "Change Grip/Order" menu of the Switch:

  • The Switch only pairs with new controllers in the "Change Grip/Order" menu.
  • Note: If you already connected an emulated controller once, you can use the reconnect option of the script (-r "<Switch Bluetooth Mac address>"). This does not require the "Change Grip/Order" menu to be opened. You can find out a paired mac address using the "bluetoothctl" system command.

After connecting, a command line interface is opened. Note: Press <enter> if you don't see a prompt.

  • Call "help" to see a list of available commands.
  • If you call "test_buttons", the emulated controller automatically navigates to the "Test Controller Buttons" menu.

Resources

Known issues

  • Some bluetooth adapters seem to cause disconnects for reasons unknown, try to use an usb adapter instead.
  • Incompatibility with Bluetooth "input" plugin requires a bluetooth restart, see #8.
  • It seems like the Switch is slower processing incoming messages while in the "Change Grip/Order" menu. This causes flooding of packets and makes pairing somewhat inconsistent. Not sure yet what exactly a real controller does to prevent that. A workaround is to use the reconnect option after a controller was paired once, so that opening of the "Change Grip/Order" menu is not required.

Credits

External links

Advertising: