sys-hidplus: a brand new sysmodule that allows you to emulate gamepads over the network for Parsec

sys_hidplus.png

(v1.1 + New Client released!)
sys-hidplus: a brand new sysmodule that allows you to emulate controllers over the network


sys-hidplus is a sysmodule that allows you to emulate up to 3 controllers (and probably more in the future) over the network from a PC to a Nintendo Switch.
The objective of this is to allow services such as Parsec to be usable on the Switch without having to buy $100 worth of accessories to emulate a single controller.
Currrently, the sysmodule still has some bugs, but it's usable and, most importantly, playable and enjoyable.
You can check more details on the github repository and any kind of feedback is welcomed!

unknown.png

If anything here sounds familiar, is because I'm the same developer a hid-mitm-plus, a unstable fork of hid-mitm with the same objective, but it has been rewritten from scratch due to the crashes and bad performance.
So, yeah, this not a fork or an update, this is, in fact, a brand new sysmodule with newly written code and functionality too (such as experimental joy-con emulation)!
(just in case, development of hid-mitm-plus has ceased and won't be coming back, use this instead)

Requirements:
Instructions:
(This tutorial has yet to be updated for v1.1, please be patient!)
First, copy the contents of the "nswitch" folder in the build zip file to the Switch microSD card. Make sure to use Atmosphere because this sysmodule isn't tested with other CFWs.

After that, make sure you have Python3 installed and open cmd on the location of the extracted "pc" folder from the build zip file and execute
Code:
py -3 -m pip install inputs
(you'll have to do this step only once). Once inputs is installed, you can then connect to your switch by using
Code:
python3 input_pc.py {SWITCH IP}
replacing {SWITCH IP} with the IP address of your Switch (You can check it by going to Settings > Internet on your system) (Note: if using "python3" gives an error/prints an empty line, try using "py" instead. If that also gives issues, try reinstalling python making sure "add to paths" is enabled. If not even that works, try using the python3 path instead of using "python3" or "py".

If you did all the steps fine, your switch should now detect your controller as a Kirby colored Pro Controller (or a JoyCon, more details below).

You can modify the behaviour of the controller emulation on the python file by changing the conType values. If you set it to 0, you'll be able to disconnect the controller (useful if the Switch disconnects the controller for some reason). If you set it to 1, you'll be able to emulate a Pro Controller. If you set it to 2 or 3, you'll be able to use the experimental sideways joycon emulation, it has some issues but in some games such as Clubhouse Games, it'll be playable.

If for some reason you enter to the "Change Grip/Order" menu or when entering a game your controller is disconnected on the Switch, modify the python script, set the conType value of the disconnected controller to 0, execute the python script once, change the value back to 1 (or 2/3) and the controller will be functional again!​
Links:
Special Thanks to:
  • jakibaki - base and inspiration for this sysmodule (hid-mitm), a lot of the code comes from it
  • cathery - helping me with my dumb questions and issues
  • ReSwitched Discord Server - help in the support channels
  • Everyone using this sysmodule - thanks a lot!
 
Last edited by nachuz,

kenesu_h

Active Member
Newcomer
Joined
Jul 22, 2021
Messages
44
Trophies
0
XP
389
Country
United States
I've made a new release to my client that adds a GUI and anarchy mode. I think you'll be happy with this one @Chrisssj2.
https://github.com/kenesu-h/sys-hidplus-client-rs/releases/tag/1.1.0-alpha.4

From this point forward though I'll be posting updates on my client in a different thread to keep things cleaner, since I realize I've been kinda dominating this thread lately and it'd be way better to keep the two separate from each other. You can catch it over at:
https://gbatemp.net/threads/sys-hidplus-client-rs-an-alternative-client-for-sys-hidplus.593944/
 

kenesu_h

Active Member
Newcomer
Joined
Jul 22, 2021
Messages
44
Trophies
0
XP
389
Country
United States
Did hos 13.0.0 break this again?
I haven't updated to HOS 13.0.0 and the Atmosphere 1.1.0 pre-release myself, but yeah, this is probably broken. Don't take my word for it though.

The input handling library the sysmodule uses had some recent changes explicitly for 13.0.0 compatibility, so we can assume that something broke. Those changes aren't officially released yet though. Until then, I don't think we can do much.
 
  • Like
Reactions: Zap Rowsdower

FAKEdemicBioPYSCHONANOWAR

Well-Known Member
Member
Joined
Sep 26, 2021
Messages
207
Trophies
0
Age
35
XP
517
Country
Netherlands
Until Nachuz makes an official release for 13.0.0 support, I've decided to release a compatible version of the sysmodule here: https://github.com/kenesu-h/sys-hidplus/releases/tag/master-1.2.
Could there be a way to make it work better with parsec arcade? as people will have to login with their controllers by pressing L+R with their controllers. But this screen where you "activate" your controllers (switch HOS menu) Doesn't stream and gets seen by the viewers. so the viewers dont know they have to do shit...
 
Last edited by FAKEdemicBioPYSCHONANOWAR,

kenesu_h

Active Member
Newcomer
Joined
Jul 22, 2021
Messages
44
Trophies
0
XP
389
Country
United States
Could there be a way to make it work better with parsec arcade? as people will have to login with their controllers by pressing L+R with their controllers. But this screen where you "activate" your controllers (switch HOS menu) Doesn't stream and gets seen by the viewers. so the viewers dont know they have to do shit...
Sorry for such a late reply, I've been pretty busy with college and haven't been able to take a look. That said, and correct me if I'm wrong, the main problem here seems to be that the Switch's controller connection screen doesn't get streamed to whoever's connected to you.

The sysmodule only handles the inputs of controllers connected to your PC. It sounds like your guests being unable to see the controller connection screen is purely a video-related thing, which this doesn't handle. Can I ask what you're using to capture your Switch's video output?
 

FAKEdemicBioPYSCHONANOWAR

Well-Known Member
Member
Joined
Sep 26, 2021
Messages
207
Trophies
0
Age
35
XP
517
Country
Netherlands
Sorry for such a late reply, I've been pretty busy with college and haven't been able to take a look. That said, and correct me if I'm wrong, the main problem here seems to be that the Switch's controller connection screen doesn't get streamed to whoever's connected to you.

The sysmodule only handles the inputs of controllers connected to your PC. It sounds like your guests being unable to see the controller connection screen is purely a video-related thing, which this doesn't handle. Can I ask what you're using to capture your Switch's video output?
You are right. I use Sysdvr. But I think it was the same on capturecard.
 

kenesu_h

Active Member
Newcomer
Joined
Jul 22, 2021
Messages
44
Trophies
0
XP
389
Country
United States
You are right. I use Sysdvr. But I think it was the same on capturecard.
That might just do it. SysDVR says it won't capture home menu stuff (including the controller menu). That's unfortunately out of our control. You're going to have to use your capture card or, if it doesn't work out there, avoid going into that menu.
 

SansSans

Member
Newcomer
Joined
Jan 18, 2021
Messages
20
Trophies
0
Age
20
XP
518
Country
Japan
Hello, it's been how many months since the latest release, and I do wanna learn how to compile the master branch of the source code to the latest libnx, which, I don't know how. Can anyone here please guide me?
 

kenesu_h

Active Member
Newcomer
Joined
Jul 22, 2021
Messages
44
Trophies
0
XP
389
Country
United States
Hello, it's been how many months since the latest release, and I do wanna learn how to compile the master branch of the source code to the latest libnx, which, I don't know how. Can anyone here please guide me?
I can give some pointers here. You can do all of this on all OS's, but I honestly think it's easier if you use a Linux VM of some sort. I personally use Arch in WSL since Arch uses pacman as a package manager (which you'll need) and WSL allows me to easily access my files from within the VM. Hopefully I don't miss any steps here.

This is partially derived from the devkitPro installation guide, so consult that if some steps aren't working.
  1. Get your Arch VM installed and boot into it.
  2. Install git and base-devel - this package includes gcc and make.
  3. Create ~/.bashrc if it doesn't exist.
  4. In ~/.bashrc, add the following:
    DEVKITPRO="/opt/devkitpro"
    DEVKITA64="/opt/devkitpro/devkitA64"
    DEVKITARM="/opt/devkitpro/devkitARM"
    DEVKITPPC="/opt/devkitpro/devkitPPC"

  5. Import a required key - the guide says there might be an issue with this, so you may have to dig around for something that works:
    sudo pacman-key --recv BC26F752D25B92CE272E0F44F7FD5492264BB9D0 --keyserver keyserver.ubuntu.com
    sudo pacman-key --lsign BC26F752D25B92CE272E0F44F7FD5492264BB9D0

  6. Download the devkitPro keyring with:
    wget https://pkg.devkitpro.org/devkitpro-keyring.pkg.tar.xz

  7. Install the keyring with:
    sudo pacman -U devkitpro-keyring.pkg.tar.xz

  8. Add these lines to /etc/pacman.conf:
    [dkp-libs]
    Server = https://pkg.devkitpro.org/packages

  9. Run: sudo pacman -Syu
  10. Then run: sudo pacman -S switch-dev
  11. After this is done, you should have the latest libnx.
  12. Git clone the source, run: make
  13. You should end up with the compiled sysmodule. I forget which files actually make up the sysmodule itself, but you can probably guess based on the files in Nachuz and I's releases.

Let me know if any of these steps don't work and I can try to recreate this on my end too. It's been a while since I tried to compile this, but this should at least make up most of the steps.
 
Last edited by kenesu_h,

SansSans

Member
Newcomer
Joined
Jan 18, 2021
Messages
20
Trophies
0
Age
20
XP
518
Country
Japan
I can give some pointers here. You can do all of this on all OS's, but I honestly think it's easier if you use a Linux VM of some sort. I personally use Arch in WSL since Arch uses pacman as a package manager (which you'll need) and WSL allows me to easily access my files from within the VM. Hopefully I don't miss any steps here.

This is partially derived from the devkitPro installation guide, so consult that if some steps aren't working.
  1. Get your Arch VM installed and boot into it.
  2. Install git and base-devel - this package includes gcc and make.
  3. Create ~/.bashrc if it doesn't exist.
  4. In ~/.bashrc, add the following:
    DEVKITPRO="/opt/devkitpro"
    DEVKITA64="/opt/devkitpro/devkitA64"
    DEVKITARM="/opt/devkitpro/devkitARM"
    DEVKITPPC="/opt/devkitpro/devkitPPC"

  5. Import a required key - the guide says there might be an issue with this, so you may have to dig around for something that works:
    sudo pacman-key --recv BC26F752D25B92CE272E0F44F7FD5492264BB9D0 --keyserver keyserver.ubuntu.com
    sudo pacman-key --lsign BC26F752D25B92CE272E0F44F7FD5492264BB9D0

  6. Download the devkitPro keyring with:
    wget https://pkg.devkitpro.org/devkitpro-keyring.pkg.tar.xz

  7. Install the keyring with:
    sudo pacman -U devkitpro-keyring.pkg.tar.xz

  8. Add these lines to /etc/pacman.conf:
    [dkp-libs]
    Server = https://pkg.devkitpro.org/packages

  9. Run: sudo pacman -Syu
  10. Then run: sudo pacman -S switch-dev
  11. After this is done, you should have the latest libnx.
  12. Git clone the source, run: make
  13. You should end up with the compiled sysmodule. I forget which files actually make up the sysmodule itself, but you can probably guess based on the files in Nachuz and I's releases.

Let me know if any of these steps don't work and I can try to recreate this on my end too. It's been a while since I tried to compile this, but this should at least make up most of the steps.
I actually do have a VM software, it's the Oracle VM Virtual Box. I don't know if I should set up a new VM cuz I already set up a VM for a server that I had worked on. I guess if I needed to set up a new VM, I'll do step 2, I hope? or I'd get Arch in case if I get it wrong.
 

kenesu_h

Active Member
Newcomer
Joined
Jul 22, 2021
Messages
44
Trophies
0
XP
389
Country
United States
I actually do have a VM software, it's the Oracle VM Virtual Box. I don't know if I should set up a new VM cuz I already set up a VM for a server that I had worked on. I guess if I needed to set up a new VM, I'll do step 2, I hope? or I'd get Arch in case if I get it wrong.
I'd set up a new VM since it can't really hurt, plus it would keep all your libnx/devkitPro stuff isolated to that one VM. I think VirtualBox allows you to make as many VMs as you want. You'd pretty much start from step 2, yeah.

I don't know which distro your existing VM is using, but if you were using one that didn't already use pacman as a package manager, you'd have to jump through a lot of hoops. Ubuntu for example uses apt (or aptitude), so you'd have to go through a bit of effort to install pacman.
 

Meetreed

New Member
Newbie
Joined
Jul 14, 2022
Messages
1
Trophies
0
Age
28
Location
Fort Knox
XP
22
Country
United States
I'm not firecraft, but this should work without the curled brackets like you mentioned.

Python specifically returns an getaddrinfo error when a socket is given an IP that is either invalid or improperly formatted. I recreated this situation with my own Switch's IP and I get the same error when using curled brackets, and it works fine otherwise. Granted I'm using your build (firecraft might not be doing the same), but I'm pretty sure this issue can be attributed to the curled brackets.
Question: would a custom ip used for idn_mitm work? I inputted my switch's iP without brackets but it still returns the getaddrinfo error
 

kenesu_h

Active Member
Newcomer
Joined
Jul 22, 2021
Messages
44
Trophies
0
XP
389
Country
United States
Question: would a custom ip used for idn_mitm work? I inputted my switch's iP without brackets but it still returns the getaddrinfo error
Could you elaborate on the custom IP part? I don't use ldn_mitm, but I'm guessing it's the 10.13.XX.YY IP that you have to set as part of this setup guide.

If you're using this ldn_mitm IP, I don't think it'll work since it seems like it's the IP your Switch will use to connect to the lan-play server. The Python script expects the IP you give it to be the Switch's IP on the Internet network you're using. Chances are that the ldn_mitm IP isn't an IP that exists on your network and only exists on the lan-play servers, so you got that error.

tl;dr, it doesn't seem like it should work. That said, I never setup ldn_mitm alongside sys_hidplus, so I'm not sure what you can do in this situation.
 

TurTok06

New Member
Newbie
Joined
Aug 9, 2022
Messages
1
Trophies
0
Location
Russia
XP
23
Country
Russia
Hello I managed to install the inputs package with pip but when I try to run the command py input_pc.py {SWITCH IP} (starting it with python3 just returns me"Python")
And I keep getting this error
C:\Users\User\AppData\Local\Programs\Python\Python310\python.exe: can't open file 'C:\\Users\\User\\input_pc.py': [Errno 2] No such file or directory
 

kenesu_h

Active Member
Newcomer
Joined
Jul 22, 2021
Messages
44
Trophies
0
XP
389
Country
United States
Hello I managed to install the inputs package with pip but when I try to run the command py input_pc.py {SWITCH IP} (starting it with python3 just returns me"Python")
And I keep getting this error
C:\Users\User\AppData\Local\Programs\Python\Python310\python.exe: can't open file 'C:\\Users\\User\\input_pc.py': [Errno 2] No such file or directory
I think you're trying to run the command in a folder that doesn't have your input_pc.py file. Assuming you're using cmd (command prompt), you should find the folder your input_pc.py is in and make sure the current folder listed is that same folder. For example, if it were in "C:\Users\kenesu_h\Downloads" and cmd lists "C:\Users\kenesu_h\Downloads>", you should be able to run the command.

The rest goes into terminal stuff, which can be confusing if you haven't worked with one before, so feel free to DM me if you don't understand and still need help.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
    K3Nv2 @ K3Nv2: https://youtu.be/IihvJBjUpNE?si=CsvoEbwzNKFf0GAm cool