Code Monkey home page Code Monkey logo

joycontrol-bridge-private-master's Introduction

Joycontrol Bridge

Use your PC controller to control your Nintendo Switch via bluetooth. This is essentially a fork of joycontrol. I simply added an interface that accepts controller inputs and forwards them to the Switch.

Do not expect this to be low latency. Analog controls theoretically work but induce a lot of delay. Because of this I commented out all the relevant code.

Latency is fine for casual Mario Kart 8 (imho) but way too high for Super Smash Bros.

Tested on Manjaro.

Installation

  • Install the dbus-python and libhidapi-hidraw0 packages

Manjaro:

sudo pacman -S python-dbus hidapi

Debian/Ubuntu:

sudo apt install python3-dbus libhidapi-hidraw0
  • 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:
git clone https://github.com/z80z80z80/joycontrol-bridge.git
cd joycontrol
sudo pip install .

Using the Bridge

  • Run the script

Manjaro:

sudo python bridge.py PRO_CONTROLLER

Debian/Ubuntu:

sudo python3 bridge.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. Alternatively, when connecting via "Change Grip/Order" menu, you'll see something like:

[19:55:58] joycontrol.server create_hid_server::100 INFO - Accepted connection at psm 19 from ('XX:XX:XX:XX:XX:XX', 19)

XX:XX:XX:XX:XX:XX is the bluetooth MAC address of your Switch.

  • After connecting, the preconfigured controller layout is translated to pro controller commands that are then sent to the Switch.

TODO

  • basic GUI to easily configure different controllers
  • saving & loading of controller configurations and the Switch MAC address

Resources

joycontrol

Nintendo_Switch_Reverse_Engineering

console_pairing_session

joycontrol-bridge-private-master's People

Contributors

pharrowboy avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.