Skip to content

Instantly share code, notes, and snippets.

@archeYR
Last active April 10, 2025 20:28
Show Gist options
  • Save archeYR/d687de5e484ce7b45d6a94415a04f3dc to your computer and use it in GitHub Desktop.
Save archeYR/d687de5e484ce7b45d6a94415a04f3dc to your computer and use it in GitHub Desktop.
8BitDo Firmware Updater in Wine

This is about running 8BitDo's Firmware Update tool for Windows in Wine. It can be used for updating newer 8BitDo devices that may not be supported by fwupd on Linux.

This tool needs Segoe UI Symbol font, on Arch this font is provided by ttf-ms-win10-auto package. For other distributions there is install script.

You will have to let Wine access device's HID interface for updating firmware, something like this should work for 8BitDo Ultimate Bluetooth Controller

sudo nano /etc/udev/rules.d/71-8bitdo-boot.rules

# 8BitDo Ultimate Bluetooth Controller's boot HID interface
SUBSYSTEM=="hidraw", ATTRS{idProduct}=="3208", ATTRS{idVendor}=="2dc8", TAG+="uaccess"

# 8BitDo Ultimate BT receiver's HID interface
SUBSYSTEM=="hidraw", ATTRS{idProduct}=="3109", ATTRS{idVendor}=="2dc8", TAG+="uaccess"

You might need to change product IDs depending on your device (lsusb prints vendor and product IDs)

sudo udevadm control --reload-rules && sudo udevadm trigger

Disable SDL mode in winebus because it prevents firmware updater from accessing the device, can be done through Wine registry.

wine regedit

add DWORD value of 0 named "Enable SDL" at HKLM\System\CurrentControlSet\Services\winebus

Can be re-enabled after updating firmware (set the "Enable SDL" value to 1 or just remove it).

Shutdown wine server to save and apply registry changes: wineserver -k

Updating the controller works only in manual mode (press LB+RB and connect the controller through USB cable, then select appropriate device)

USB wireless dongle should be detected by the tool when controller is not connected.

@darthcircuit
Copy link

darthcircuit commented Dec 21, 2024

Thank you! I followed these steps with a portable wine appimage, and it worked great. I'm on Linux Mint LMDE. I was able to update my USB Adapter 2. I used this font install tool to get the correct font set: https://github.com/mrbvrz/segoe-ui-linux

@libr3
Copy link

libr3 commented Mar 22, 2025

Thank you very much for the tutorial. I can confirm that it works on Gentoo. I have updated an 8BitDo USB Wireless Adapter 2 [1] to the latest available version at this moment (1.07) using 8BitDo Firmware Updater [2] via Wine.

For installing the necessary fonts for the 8BitDo Firmware Updater, I preferred a simpler method; I did not need to install the font in another directory:

git clone https://github.com/mrbvrz/segoe-ui-linux  
cp segoe-ui-linux/font/* $HOME/.wine/drive_c/windows/Fonts/  

In the file /etc/udev/rules.d/71-8bitdo-boot.rules, I had to add:

# 8BitDo USB Wireless Adapter 2's boot HID interface  
SUBSYSTEM=="hidraw", ATTRS{idProduct}=="3208", ATTRS{idVendor}=="2dc8", TAG+="uaccess"  

The directory where I needed to add the DWORD with a value of 0 named "Enable SDL" in my case was HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\winebus.

To use "manual mode" (Bootloader mode), you must hold the pairing button while connecting the USB, showing the following in dmesg:

new full-speed USB device number 103 using xhci_hcd  
New USB device found, idVendor=2dc8, idProduct=3208, bcdDevice= 2.00  
New USB device strings: Mfr=1, Product=2, SerialNumber=3  
Product: BOOT  
Manufacturer: 8BitDo  
SerialNumber: XXXXXXXXXXXX  

For now, it is not possible to use fwupd to update the 8BitDo USB Wireless Adapter 2, but it is possible to download the update using 8bitdo-firmware.py from this repository [3]. The 8BitDo USB Wireless Adapter 2 is the number 39 (listed as "USB Adapter 2" when running 8bitdo-firmware.py).

[1] https://www.8bitdo.com/wireless-usb-adapter-2/
[2] https://support.8bitdo.com/firmware-updater.html
[3] https://github.com/fwupd/8bitdo-firmware

@archeYR
Copy link
Author

archeYR commented Mar 26, 2025

The directory where I needed to add the DWORD with a value of 0 named "Enable SDL" in my case was HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\winebus.

Sorry for the confusing mistake. Corrected.

@vanfanel
Copy link

vanfanel commented Apr 6, 2025

Many, many thanks for this. Really, this is very important to me, I don't want to use Windows for this kind of stuff (or ANY kind of stuff, in fact).

This worked for me using the 8BitDo RetroKeyboard offline updater (RetroKeyboard177.zip)

However, I have noticed that this propietary 8BitDo updater uses DFU under the hood (as in fact it includes and uses an executable named dfu4.exe).
So, shouldn't we be able to use dfu-util directly on GNU/Linux instead of the propietary 8BitDo program that uses DFU after all?

However, I can't see the 8BitDo RetroKeyboard listed in sudo dfu-util --list... so I don't quite understand what's going on here. Maybe the 8BitDo propietary flasher puts the keyboard into DFU mode somehow?

@archeYR
Copy link
Author

archeYR commented Apr 10, 2025

Many, many thanks for this. Really, this is very important to me, I don't want to use Windows for this kind of stuff (or ANY kind of stuff, in fact).

This worked for me using the 8BitDo RetroKeyboard offline updater (RetroKeyboard177.zip)

Interesting, seems like it is a different kind of tool than what is discussed here. Nice that it helps, though.

However, I have noticed that this propietary 8BitDo updater uses DFU under the hood (as in fact it includes and uses an executable named dfu4.exe). So, shouldn't we be able to use dfu-util directly on GNU/Linux instead of the propietary 8BitDo program that uses DFU after all?

However, I can't see the 8BitDo RetroKeyboard listed in sudo dfu-util --list... so I don't quite understand what's going on here. Maybe the 8BitDo propietary flasher puts the keyboard into DFU mode somehow?

I guess this is something that could be looked into. Maybe there is some combination that would trigger the bootloader mode (for example, holding some key(s) while connecting the keyboard)? Otherwise one would have to figure out what the tool does to update the keyboard and try to replicate the behaviour.

@vanfanel
Copy link

@archeYR I tried asking 8BitDo how to put the keyboard in DFU mode and they answered:
Running the updater directly is DFU mode.
Whatever that means...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment