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

Nintendo Switch compatibility regression #825

Closed
indirect opened this issue Mar 27, 2020 · 7 comments · Fixed by #833
Closed

Nintendo Switch compatibility regression #825

indirect opened this issue Mar 27, 2020 · 7 comments · Fixed by #833

Comments

@indirect
Copy link
Contributor

indirect commented Mar 27, 2020

The Nintendo Switch dock has 3 USB type A ports, and connecting any keyboard to those ports allows you to provide typed input. The easiest way to test out a keyboard is:

  1. Take a screenshot of your home screen using the ⏺ screenshot joycon button
  2. Open the Albums app in the row of circular system apps along the bottom
  3. Select the picture by pressing "A", then "A" again to choose "Editing and Posting"
  4. Navigate down to "Add Text", and press "A".
  5. Type some text!

You can leave your Switch on that screen while connecting and disconnecting keyboards, and that's the main way that I was able to bisect the issue I found.

Now the issue. I've tried using my Model01 and Atreus2 with my Switch, and discovered that older firmwares work normally and as expected, but newer firmwares... don't work as well. The symptoms I observed are: space/backspace getting stuck and repeating after being typed, individual letters not being able to be typed more than once, and no further output after typing 5-10 letters.

A git bisect on the Kaleidoscope-Bundle-Keyboardio repository found a specific commit that caused the regression: keyboardio/Kaleidoscope-Bundle-Keyboardio@340de89.

That seems to track, since the issues with the Switch seem to be HID issues. Happy to provide additional testing or bisecting if that would help narrow it down!

@indirect
Copy link
Contributor Author

indirect commented Mar 29, 2020

Today, I managed to get my Atreus2 working with my Switch via some silly git machinations:

  1. Check out keyboardio/Kaleidoscope-Bundle-Keyboardio@55065ce, which is the last commit before the regression.
  2. Update all submodules with git submodule update.
    1. Go back to my personal A2 firmware at indirect/Atreus2-Firmware@920eaba, and run make build to compile the firmware using the Switch-compatible Kaleidoscope libraries.
  3. Go and update just the avr/libraries/Kaleidoscope submodule to the latest master (which is currently 919d873), to get the flashing tools needed for A2.
  4. Go back to my personal A2 firmware at indirect/Atreus2-Firmware@920eaba, and run my bin/flash wrapper around make flash. It won't compile, but it will flash the previously-compiled firmware.
  5. A2 now works perfectly on Switch!

@indirect
Copy link
Contributor Author

...and of course, today, I cannot get my A2 working with my Switch even by following my own instructions. 🤔🤨

[30 minutes of frantic testing]

Aha! I found a super important missing step: you have to build the firmware with the old Kaleidoscope, but then install it with the new Kaleidoscope (which can skip the build using maybe_build, and has the tooling to talk to an Atreus 2). Phew. I'll update my steps.

@nevd
Copy link
Contributor

nevd commented Apr 26, 2020

thanks @indirect these instructions also work users of OSX+filevault where you cannot stop the key repeat either

@obra
Copy link
Member

obra commented Apr 27, 2020

@algernon provided a bit of insight:

"we have multiple HID symbols
that... confuses things" It's documented a bit in keyboardio/KeyboardioHID#59

The solution that needs to happen is to remove duplicated HID constructors, but he's not currently sure -why- they're getting duped.

@indirect
Copy link
Contributor Author

Thanks for the update! Looking forward to a less wonky HID situation. 🙂

obra added a commit that referenced this issue Apr 27, 2020
obra added a commit that referenced this issue Apr 27, 2020
@obra
Copy link
Member

obra commented Apr 27, 2020 via email

@obra obra closed this as completed in #833 Apr 27, 2020
@indirect
Copy link
Contributor Author

I can confirm this is fixed by #833. Atreus2 + Switch working great now. 🎉

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 a pull request may close this issue.

3 participants