Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save doylecnn/4df70f78b41f020decace02e5afcfdf8 to your computer and use it in GitHub Desktop.
Save doylecnn/4df70f78b41f020decace02e5afcfdf8 to your computer and use it in GitHub Desktop.
amiibo-emulation-with-linux-vm.md

Easy Amiibo Emulation - https://bit.ly/2z0m09k

(^ that's a short-link to this page, so you can open it in Linux)

(Windows|Linux PC) + JoyControl + Bluetooth = AMIIBO EMULATION

Overview

This guide shows you how to use joycontrol to emulate Amiibos. You only need a Linux PC (or a Windows|MacOS running a Linux VM) and a Bluetooth adapter.

Thanks to @mart1nro for joycontrol and @spacemeowx2 for the Amiibo support!

Warning: Some Bluetooth adapters don't seem to work. One user has reported that their Switch disconnected any time they navigated away from the "Change Grip" screen, even when using the Linux program to send buttons. (It seems like internal laptop BT cards are hard to get working.)

If you have this, or other problems, many users have gone on to have success by either:

  1. Trying another adapter, or,
  2. Burning the Linux ISO on a USB drive and booting their computer temporarily in order to do these steps.

Get Linux, bro!

Skip this if you are running Linux.

  1. Boot an Ubuntu Linux machine. You can either use VirtualBox/VMware to run a VM, or you can "burn" the ISO to a USB drive and boot your computer into Linux temporarily (do NOT choose the "Install" button, hit "Try"). We recommend the light Xubuntu: https://mirror.us.leaseweb.net/ubuntu-cdimage/xubuntu/releases/20.04/release/

  2. Make sure your Bluetooth adapter is plugged in. If you're using a VM, you must share your Bluetooth adapter into the VM. Ask in the Discord if you need help with this, there are instructions. (Additionally, you might need to disable Bluetooth in Windows 10, there are instructions for that below too)

  3. Get your Amiibo bank .bin files into the VM. (Shared folders, drag drop, ssh/scp, etc). Alternatively, you can download them directly into the VM with a browser or curl, etc.

JoyControl Setup

Run these commands in the VM:

(If you need to open this page in the VM to copy/paste, this link (to this page) is shorter: https://bit.ly/2z0m09k.)

sudo true # hopefully sudo is happy

sudo apt-get update -qy
sudo apt-get upgrade -qy
sudo apt-get install -qy git python3-pip libglib2.0-dev libhidapi-hidraw0 libhidapi-libusb0 libdbus-1-dev
sudo pip3 install hid aioconsole crc8 dbus-python

mkdir -p ~/joycontrol
git clone https://github.com/mart1nro/joycontrol ~/joycontrol

Windows + VirtualBox Workaround

You may need to disable your BT adapter so VirutalBox can control it:

  1. Go into Device Manager
    • Find your Bluetooth adapter
    • Right-click -> Disable
  2. Go into Windows Services
    • Disable THREE Bluetooth services:
      • "Bluetooth Audio Gateway Service"
      • "Bluetooth Support Service"
      • "BluetoothUserService_xxxx"

Bluez Input Plugin Workaround

If you get stuck at ... "Please open the Change Grip menu".

Due to this issue, you need to modify your bluez settings in order to get the Switch to connect: mart1nro/joycontrol#8

Some users have reported this helped, even with the workaround that joycontrol performs (restarting bluetooth.service).

sudo sed -i 's|^ExecStart=/usr/lib/bluetooth/bluetoothd.*$|ExecStart=/usr/lib/bluetooth/bluetoothd --noplugin=input|g' /lib/systemd/system/bluetooth.service
sudo systemctl daemon-reload
sudo systemctl restart bluetooth

JoyControl Usage

Running the following commands will start the joycontrol program. If you have problems, you can press CTRL+c and it will kill the app. You can tap the up arrow to pull up the last command and run it again, or type the app command again.

cd ~/joycontrol
sudo python3 ./run_controller_cli.py PRO_CONTROLLER

# connect the control
# then after the messages and connection, press <ENTER>

# now you can send commands:
# you can send buttons (pressing enter after each line)
home
a
b
# whenever the Switch is ready for an amiibo, you can send one:
amiibo /home/pi/amiibo/bins/BOKOBLIN.bin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment