More actions
(Created page with "{{Infobox Switch Homebrews |title=Joycontrol MS |image=joycontrolmsswitch.png |description=Emulate Nintendo Switch Controllers over Bluetooth. |author=marcus-stevenson |lastupdated=2020/07/08 |type=PC Utilities |version=2020 |license=GPL-3.0 |download=https://dlhb.gamebrew.org/switchhomebrews/joycontrolmsswitch.7z |website=https://github.com/marcus-stevenson/joycontrol-ms |source=https://github.com/marcus-stevenson/joycontrol-ms |donation= }} {{#seo: |title=Switch Homebr...") |
No edit summary |
||
Line 1: | Line 1: | ||
{{Infobox Switch Homebrews | {{Infobox Switch Homebrews | ||
|title=Joycontrol MS | |title=Joycontrol MS | ||
|image= | |image=joycontrolmsnx.png | ||
|description=Emulate Nintendo Switch Controllers over Bluetooth. | |description=Emulate Nintendo Switch Controllers over Bluetooth. | ||
|author=marcus-stevenson | |author=marcus-stevenson | ||
Line 8: | Line 8: | ||
|version=2020 | |version=2020 | ||
|license=GPL-3.0 | |license=GPL-3.0 | ||
|download=https://dlhb.gamebrew.org/switchhomebrews/ | |download=https://dlhb.gamebrew.org/switchhomebrews/joycontrolmsnx.7z | ||
|website=https://github.com/marcus-stevenson/joycontrol-ms | |website=https://github.com/marcus-stevenson/joycontrol-ms | ||
|source=https://github.com/marcus-stevenson/joycontrol-ms | |source=https://github.com/marcus-stevenson/joycontrol-ms | ||
|donation= | |donation= | ||
}} | }} | ||
Joycontrol-ms is a modified version of [https://github.com/mart1nro/joycontrol Joycontrol], an open-source project that allows you to emulate Nintendo Switch Controllers on a Raspberry Pi over Bluetooth. This adds keyboard control, macro recording and playback. It also integrates the [https://www.sparkfun.com/products/16301?_ga=2.239021640.918075716.1594175635-1216658051.1509937706 SparkFun Top pHAT] and allows you to write your own custom commands. | |||
Tested on Raspberry Pi 4B. | |||
==Features== | |||
*Emulation of JOYCON_R, JOYCON_L and PRO_CONTROLLER. | |||
**button commands | |||
**stick state | |||
**nfc data | |||
**controller keybinding | |||
**controller macro recording, playback, deleting | |||
**[https://www.sparkfun.com/products/16301?_ga=2.239021640.918075716.1594175635-1216658051.1509937706 SparkFun Top pHAT] integration | |||
==Installation== | |||
Set up your Top pHAT by following the guide [https://learn.sparkfun.com/tutorials/sparkfun-top-phat-hookup-guide?_ga=2.239584971.918075716.1594175635-1216658051.1509937706 here]. | |||
Install dependencies: | |||
* Ubuntu: | |||
** Install the <code>dbus-python</code> <code>libhidapi-hidraw0</code> and <code>keyboard</code> packages: | |||
** <code>sudo apt install python3-dbus libhidapi-hidraw0 keyboard</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> | |||
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:// | *[https://github.com/dekuNukem/Nintendo_Switch_Reverse_Engineering Nintendo_Switch_Reverse_Engineering] | ||
https:// | *[https://github.com/timmeh87/switchnotes/blob/master/console_pairing_session console_pairing_session] | ||
*[https://www.digikey.sg/en/maker/projects/nintendo-switch-macro-recording-on-the-raspberry-pi/ba8b3233b9a34e2596168f22a02b8c48 Usage guide] by PNP MARCUS. | |||
https:// | |||
== | ==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 [https://github.com/mart1nro/joycontrol/issues/8 #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. | |||
== External links == | == External links == | ||
* | * GitHub - https://github.com/marcus-stevenson/joycontrol-ms | ||
Revision as of 03:15, 12 Haziran 2023
Joycontrol MS | |
---|---|
General | |
Author | marcus-stevenson |
Type | PC Utilities |
Version | 2020 |
License | GPL-3.0 |
Last Updated | 2020/07/08 |
Links | |
Download | |
Website | |
Source | |
Joycontrol-ms is a modified version of Joycontrol, an open-source project that allows you to emulate Nintendo Switch Controllers on a Raspberry Pi over Bluetooth. This adds keyboard control, macro recording and playback. It also integrates the SparkFun Top pHAT and allows you to write your own custom commands.
Tested on Raspberry Pi 4B.
Features
- Emulation of JOYCON_R, JOYCON_L and PRO_CONTROLLER.
- button commands
- stick state
- nfc data
- controller keybinding
- controller macro recording, playback, deleting
- SparkFun Top pHAT integration
Installation
Set up your Top pHAT by following the guide here.
Install dependencies:
- Ubuntu:
- Install the
dbus-python
libhidapi-hidraw0
andkeyboard
packages: sudo apt install python3-dbus libhidapi-hidraw0 keyboard
- Install the
- Arch Linux Derivatives:
- Install the
hidapi
andbluez-utils-compat
(AUR) packages.
- Install the
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 .
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.