-
Notifications
You must be signed in to change notification settings - Fork 276
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
Feature: Amiibo NFC reading support #89
Conversation
Thanks, I'm going to test this as soon as I have the time. Btw, besides the first google search result, MCU stands for microcontroller unit (https://en.wikipedia.org/wiki/Microcontroller) :) |
Sorry for the delay, but thanks I'll change the name. I checked BOTW myself and since this for some reason doesn't require you to register a owner it seems to just work. I also noticed that #90 also includes a fix for the flow control problem that seems to work better than mine, I can try to integrate that one or would you want to? |
Don't know how to respond to that yet...
this is to fetch the nre class-fixes
@DarkPro1337 Two things: First I assume you are on the 'register owner and name' screen in the settings, that sadly isn't working yet but you don't even need it, as botw works with unregistered amiibos. Second the 'not implemented length' means just that, the nfc tag you passed is not of the expected size. This might be an issue in the code (I'll check, I have a few commits only local but they should be unrelated), but please check that the file you use is exactly 540 bytes, anything else is not an amiibo. If you have another size you might have the decrypted version exported by tagmo or some format with the image embedded or UID stripped. This implementation needs the raw binary image that would be stored on the NFC tag. The 'set NFC tag data' is just telling you it picked up on the tag you set. |
@Poohl oh, thanks, I'll try to check these amiibo dumps later. Maybe they are just corrupted due the archivation. But just sending amiibos on the botw screen also does nothing (amiibos was enabled). |
I assume you have the Amiibo rune active. Does the terminal view that the Switch requested 0x31 Input mode? The Expected sequence of events is
|
added logging levels removed some angry comments
@Poohl thanks for your work. |
@thxomas are you on the I know of a few length issues on the |
Oh, I notice now, I used your fork, not a branch from this project. (I'm not really confident with git yet) I will try again with the amiibo_writing branch and report. EDIT: Yes, I was previously on amiibo_edits branch. and I'm having more lowlevel issues with the amiibo_writing branch ATM (connection from switch doesn't work, I have to use the reconnect option, and as soon as I leave the Grip screen I get No data received/Connection Lost). I'd be happy to help in DM if you want/need. |
The Regarding low level issues: look at the reset and restart Bluetooth scrips in Ps: are there dms on GitHub or are you talking of another platform? Help is always appreciated. |
The Mismatch in payload size is easily explainable:
https://gbatemp.net/threads/making-amiibo-ntag215s.413050/page-37 |
@choss So what you're saying is there is additional data at the NFC-tags end? I'll update the NFC-tag loader to accept these longer tags. Are they always 572 bytes long? |
Yes as far as I can tell from the spec it is always 572 bytes long. So it should be fine :) The last bytes are anyway only the vendor signature and "static" |
- change_btaddr now accepts a optional argument as the mac to set it to - change_btaddr has some doc how to get it working - remote_capture now works without sudo by default - hcimon: example script how to capture HCI messages - mount: example how to easily develop remotely (not on a raspi)
- transport not accepts an optional flow-control argument to prevent insane lag - refactored protocoll.py - now ues realtime instead of just bumping timer on every call - centrallized handling of report creation
- Manual workaround for V12 disconnects * Flow Control * pause & unpause commands to go to interrupt mode * automated mashing on pairing screen - Automated BT_addr change - "-r auto" to reconnect to a paired switch - warnings when connecting with weird settings
- transport now always has write_lock - changed naming to be similar to asyncio.Transport - Refactored outgoing flow control to conform to asyncio.Transport - disabled outgoing flow control by default - made user prompts silenced by default - removed anticipate mechnism - removed anticipate command
I will create a new Pull request with updated info for everything. Will edit the comment to contain a link. |
This mainly implements enough of the NFC functionality to simulate amiibos for reading. The implementations core is in mcu.py, but this is not some rewrite of the old copyrighted code.
There are still some hacks in detecting and storing the tag but it seems stable om my end.
This is currently only tested using Splatoon2 and Pro-Controller on my laptop (Acer spin 5) using PopOS based on Ubuntu 20.04 running bluez 5.53-0ubuntu3
my command to test this:
python3 run_controller_cli.py -d hci0 -r --nfc PRO_CONTROLLER
And it successfully transmits the amiibos data and wants me to register a user.
TODO:
Other changes in the merge: