-
Notifications
You must be signed in to change notification settings - Fork 277
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
V12 compatability and Amiibo-NFC support. #110
base: master
Are you sure you want to change the base?
Conversation
Don't know how to respond to that yet...
this is to fetch the nre class-fixes
added logging levels removed some angry comments
Tested with the latest 12.0.2 firmware. Controller (Pro controller) connects reliably (ASUS BT-400). Also tested the NFC spoofing, working flawlessly in Animal Crossing New Horizons 👍 |
Cheers! Can I get a link to which version of JoyControl you used? Also I have a few questions. Did you make changes to ExecStart parameters in bluetooth.service, MAC address using change_btaddr.sh, and device class using |
|
I tried this version, but it seems to disconnect when a second input is provided through the terminal. There is a way to work around the disconnect though. I close the Change Grip/Order menu manually using the Switch's touch-screen and navigate to the home menu. Then I input " Sadly, reading Amiibo still gives the same error (2115-0064) and immediately disconnects. Additional information: ExecStart changed, MAC not changed, device class not changed manually and was not changed automatically even after connecting with the Switch, tried with both JoyCons detached and JoyCons attached. |
@munichi-jasuda The Amiibo read error is known, yet we don't know where it comes from. The only pattern we have is the unchanged class (see Poohl#5). Try to change it manually and see if that helps. |
Ok, this will be pretty long since I will try to explain different scenarios I encountered and how I worked my way around them when connecting to Switch and reading NFC bins. Firstly, my Switch is updated to 12.0.2v and I was able to connect to JoyControl even with JoyCons attached. One thing to note is that I had connected JoyControl with my Switch before the 12.0.0 update, so it's possible that may have helped reconnect, but I'm not sure. Another thing to note is that that the method I've used to get JoyControl to work may not work for everyone. A different user (@d-lindahl) got JoyControl to work as well, but they used a different method which did not work for me. Hence, it's quite random and not guaranteed to work for everyone sadly. VERY IMPORTANT: I was suggested to use the -r command of the JoyControl to connect to my Switch but it gave me Error (2113-3204), forcing me to switch off my system. Make sure you save beforehand, and also try this at your own risk.Let's get started. First, you'll need to download this version of JoyControl (by @Poohl). Follow the instructions to complete installation and setting up. Next, you'll need to make changes to a system file (located in /lib/systemd/system/bluetooth.service of your VM Ubuntu system). Instructions are provided on the download page, but you'll need permission to make those changes, and I also recommend creating a backup of the file (bluetooth.service). Run the code Changing your MAC address may not be necessary; I didn't need to do that. Once you change the ExecStart parameters in the bluetooth.service file, open the terminal and run the command If the connection was established, you can proceed to the next step. Otherwise, you'll probably just have to wait until someone else figures out a different method to successfully connect. Next, you can either input You can also try running the command When in-game, try running the command Finally, it's time to test if you can read Amiibo using JoyControl. Remember to run the That's probably it from me. Please note that this is what I tried to get JoyControl to work with my Switch. The way it works is quite random, and hence may not work for everyone. |
@munichi-jasuda Thanks for the detailed report. I'll work it into the README. Only one question: what brand/type bluetooth controller are you using? Edit: I thought they were the same. The module 113 is the bluetooth, meaning there is some big vulnerability in the bluetooth stack itself. This is probably related to what joycontrol is doing but I'd guess Nintendo will patch this sooner than later. |
You might be right about the issue being related to Bluetooth hardware. I don't know how to check what brand/type my Bluetooth controller is (my device is Acer); seems like it is Qualcomm Atheros since I can't find anything else in my Bluetooth settings. The other user reported being able to get Also, I didn't encounter Error 2115-0064 once I ran |
@munichi-jasuda You are in luck: I also have an acer laptop with qualcomm atheros bluetooth and will try to get it working today (ubuntu 20.04). Will keep this thread posted and try to reproduce these issues (I usually test on a raspi 4B). If this is some hardware problem caused by the controller that is simulating, I should be able to see some difference in the bluetooth controller captures between the raspi and the qualcomm. Update: I can't get it to work. It paired once and kicked me after the second button-press but other than that it just instantly axes the connection. I'm suspecting the SDP shit, as BlueZ gives no fuck about what I tell it. Even manually deleting them from the database doesn't remove them so I'm stuck with 4-7 of them and anything above 3 is known to not work... |
Update 2: I'm very sorry, but after 4 Hrs of testing I declare ubuntu 20.04 (i don't think this is a hardware issue, might be mistaken) a lost cause. Reasons for all the problems:
What I tried:
So if anyone wants to try with 19.10 again... or you could try to prevent ubuntu's shit from ever accessing bluetooth, no idea on how to do that though. |
I used to encounter the same issue, but I work around it by manually navigating to the Switch's home menu using the touchscreen, and executing the command Another way of working through it is to enter the command I am using Ubuntu 20.04.2 LTS by the way. Also, I only installed dependencies and made changes to bluetooth.service file in /lib/systemd/system/ and directly got started with pairing to my Switch using the commands Edit: This is how I manage to connect to my Switch and read NFC flawlessly. Pre-requisites: Install dependencies (
Reading Amiibo success: |
Thanks for the PR! I was able to successfully use this on a Raspberry Pi 3 v1.2 on the latest Raspian. IIRC the controller state seems to be a bit wonky sometimes, but once it's paired and I've used the emulated Pro Controller for inputs in the game, the NFC stuff worked fine. As a sidenote: The generated Amiibo dumps didn't cut it for me, they were rejected by the game I've tested. I guess that's what supposed to happen, but as I didn't saw the info anywhere: It seems that you need the Amiibos in encrypted form to make this work (which does make sense IMHO as the encryption is most probably done by the Switch and not the controller/reader itself). Anyhow, everybody's work here is much appreciated! |
@@ -1,60 +1,120 @@ | |||
# joycontrol | |||
|
|||
Branch: master->amiibo_edits |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you mean to leave this in the readme for the PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, that's just there because ppl got confused with what Readme is up to date for what branch.
Just tell me and I'll remove it.
I want to thank you for making this effort, because like you I want the NFC support very badly. I ran this on my Xubuntu VM (on which the main branch runs bluetooth flawlessly using a USB dongle), and I'm sorry to say that on your branch I'm consistently getting "address already in use." I think this is a known issue. Please let me know if there are other ways I can help you by testing. I do not have raspberry pi at the moment. |
@ChristinMilloy there are two ways this can happen: plugins (probably |
Thanks Poohl, scratch my last comment, it worked on Xubuntu once I took your advice and disabled input plugins. In fact I had an easier time connecting than on mart1nro |
Disregard that, I forgot ending quote. Now everything is working, I am able to read a bin file in ("added nfc content") but the game does not respond to it even though the button inputs are still working. |
@ChristinMilloy Do you get any messages on the terminal/logger? as soon as the read/registration screen is entered, you should get a message stating the MCU was stated and initiallized. |
On Raspberry Pi it didn't connect until I ran the HCI command mentioned in issue 4, so it's not just random disconnects. Also fixed a typo.
Some small fixes to README
Overview
This pull request is a combination of my 2 previous ones (#102 and #89), as it was built on top of those and also also has the fixes necessary to work with switchOS V12+ (tested on V12.0.1).
Switch V12 support
This closes #104, potentially #93. It also includes optional flow-control (disabled by default) thus presumably can replace #90.
To make all this happen
HCI
sockets were used, potentially hindering porting efforts to other systems.It also makes heavy use of more system-commands to change the MAC-address, which however might not be necessary with the other fixes, according to some new testing.
NFC for Amiibos.
As stated this pull includes #89 and #102. It includes reading amiibos and registering owners. Arbitrary writing is not working yet and the solution to get out of the "writing" screen again is quite hacky but works, but not with anything but registering owners. For this the old
--nfc
option and thenfc
command were reused.This closes #82 and #77.
The implementation is also not based on joycondroid, thus should not have the issue as in #80 again.
Misc features
click BTN
command clicksBTN
once. Useful for navigating menus from the cli.pause
andunpause
commands disable and enable the input-writer and thus make the controller act more like interrupt mode. This can be useful, as the switch doesn't disconect you for 10s when silent but may if some response is wrong/unexpected. In this mode only buttons work.debug X
command to set the input frequency toX
Hz. This is intended to be removed, but for now is still very useful to get rid ofrunning too slow
problems.Credit
Special thanks to @thxomas for a V12 POC, @JaredEzz for clarifying it and @Yamakaky for improving the debug scripts.
Also thanks to everyone who helped with debugging to get here.
TODO / Issues