Setting Up The Dolphinbar On Garuda Linux
19 Dec 2023 [linux
garuda
emulation
lightgun
]
The Mayflash Dolphinbar allows the use of Wiimotes with devices other than a Wii. It can be adapted to be a sensor for light guns and various other IR-based peripherals. It’s designed with the Dolphin emulator running on Windows in mind but can be made to work with Linux, though it needs a little more work to configure it.
These instructions work for Garuda Linux on amd64 but the process should work with other distributions.
Hardware setup
Plug the Dolphinbar into a USB port. Click the ‘Mode’ button until mode 4 (Wiimote) is selected. Run lsusb
to see attached USB devices. You should see a line similar to this:
Bus 003 Device 015: ID 057e:0306 Nintendo Co., Ltd Wii Remote Controller RVL-003
The vendor part of the USB ID (057e
) ought to be identical but the device portion (in this case, 0306
) might be slightly different.
If you don’t see a line similar to the one above, run sudo dmesg
to check for errors with init’ing the Dolphinbar. You may see lines like these:
[77431.360102] usb 3-1.2.2: device descriptor read/64, error -71
[77431.467421] usb 3-1.2-port2: attempt power cycle
[77432.064347] usb 3-1.2.2: new high-speed USB device number 9 using xhci_hcd
[77432.064425] usb 3-1.2.2: Device not responding to setup address.
This generally means the device was unable to draw sufficient power. It’s surprisingly power-hungry, needing the full 500mA according to lsusb -v
and would not work for me when attached to a USB hub with just two dongles for a mouse and keyboard also attached. Connecting via a powered USB hub fixed this.
Pair a Wiimote
Hold down the ‘Sync’ button on the Dolphinbar until it starts flashing. Then hold down the red pairing button on the rear of the Wiimote. After a short period one of the four lights at the bottom of the Wiimote will turn solid. The light on the Dolphinbar may continue flashing; this doesn’t matter.
Adding a udev rule
A udev rule needs to be added to enable userspace access to the Mayflash adapter. The following rule may exist if you have already setup the GameCube Controller Adapter for the WiiU on your Linux system. If not, this will create an empty file:
sudo nano /etc/udev/rules.d/51-gcadapter.rules
Add the following line, save and close. Ensure that the numerical value for idProduct
matches the output from lsusb
:
SUBSYSTEM=="hidraw*", ATTRS{idVendor}=="057e", ATTRS{idProduct}=="0306", TAG+="uaccess", MODE="0666"
Userspace access to the device can now be enabled by either rebooting or running the following command then unplugging and re-attaching the Dolphinbar from the machine:
sudo udevadm control --reload-rules
Testing
If the Dolphinbar is put in mode 2 (mouse, game mode) then moving the Wiimote should move the mouse pointer on the desktop.
If this doesn’t work then you can check that the OS is receiving button presses from the Wiimote with the usb-hid
command. Run lsusb
again. Note the ‘Bus’ and ‘Device’ values. Assuming they’re the same as those from the initial run of lsusb
above (Bus 003 Device 015
) the test command would be as follows:
sudo usbhid-dump -s 3:15 -f -e stream
Watch the output closely. Pressing any of the buttons other than Home and Power should register by changing the numerical values displayed.
Firmware update
My Dolphinbar was bought several years ago and it had the latest version of the firmware out of the box so this may well not be an issue. I tend to avoid low-level USB operations such as firmware updating via WINE because it’s inherently risky as it is, so used a Windows 10 VM to attempt the (unneeded) update.
Use
The small manual which comes in the box can be downloaded here. A user, osoalex, on the Dolphin forums has written a much better one which can be found here here.