Skip to content
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

[WIP]: Amiibo writing #102

Closed
wants to merge 37 commits into from
Closed

[WIP]: Amiibo writing #102

wants to merge 37 commits into from

Conversation

Poohl
Copy link

@Poohl Poohl commented Mar 21, 2021

I figured the basics of the switch writing to amiibos out. It isn't enough to just write like with the regular controllers, however it works in that it creates valid registered amiibos. It does so by executing all he write requests by the switch and then reverting some to remove the 'currently writing to tag' message.

This Pull is on top of #89 and as I said, it only works because I can recover failed amiibo writes, not because the write succeds so some parts are still very hacky.

This is only tested for registering users currently, I'll test splatoon gear save soon. Anyhow, the current way of doing things is as follows:

  • start joycontrol and set nfc
  • go to system settings->amiibo->regiter user
  • It'll read whatever is in your dump
  • continue and enter Mii & name
  • click ok
  • It'll try to write and you should see 15 'write amiibo' log messages, then 'created backup' and a 'saving amiibo' messages.
  • the switch will state that writing failed and prompt you to try again, don't do that
  • instead press home to get out of that screen.
  • Now the amiibo is registered as you entered.

@Poohl
Copy link
Author

Poohl commented Mar 21, 2021

After a few prayers I was gifted with a more successful write while proxieing and got a bit more info on what should happen after the write is through, I updated https://gist.github.com/Poohl/e0f254b3e02051b18c7e9f4f032883be again.

@mehak
Copy link

mehak commented Mar 22, 2021

Following your procedure (with minor modification) I was able to write-back with Super Smash Bros. Ultimate.

  1. start joycontrol and set nfc
  2. go to system settings->amiibo->regiter user
  3. It'll read whatever is in your dump
  4. continue and enter Mii & name
  5. click ok
  6. It'll try to write and you should see 15 'write amiibo' log messages, then 'created backup' and a 'saving amiibo' messages.
  7. the switch will state that writing failed and prompt you to try again, don't do that
  8. instead press home to get out of that screen.
  9. Press "x" and follow prompts to close Super Smash Bros. Ultimate
  10. Re-open and go back to the amiibo menu to confirm you can read it back after registering.
  11. Now the amiibo is registered as you entered.

Edit: After loading the amiibo fighter and then saving again, I was unable to re-read it. I will try to troubleshoot more later today or this week.

@Poohl
Copy link
Author

Poohl commented Mar 22, 2021

Update: I figured out a way to get around the "press home" on the error message: by briefly reporting another Tag it immediately exits this screen. I assume this is some kind of panic-behaviour by the switch but it works well. (That's the new commit 2bf640e)

and as @mehak reported writing other stuff to the amiibo failes for some reason. I'm testing on Splatoon's "save outfit" thing as I don't have SSBU. Kinda odd, since as far a I can tell it just rewrites the entire amiibo every time, but I'll look into that.

Also: If anyone knows other places where the "Please remove amiibo" prompt appears, please tell me I'd like to capture the "correct" way to get out of there.

- 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
@Lucaiii
Copy link

Lucaiii commented May 11, 2021

hehe longmiibo

Poohl added 2 commits May 12, 2021 00:06
- 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
@Poohl
Copy link
Author

Poohl commented May 11, 2021

Will create a new pull request to reflect the new changes and include all the additions. Will update the comment to include a link.

It's pull request #110

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants