Skip to content
/ ufa Public

Project UFA brings the open ZMK firmware to gaming mice with compatible hardware, enabling deeper customization, transparency, and improved security. Its goal is to create a fully open, user-controlled ecosystem for modern pointing devices.

License

Notifications You must be signed in to change notification settings

aroum/ufa

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🖱️ Project UFA: ZMK Firmware Porting for Commercial Wireless Gaming Mice

Project to port the open-source ZMK firmware to factory wireless gaming mice.

logo

🚀 Introduction

The main goal of this project is to enable ZMK firmware on many commercially available wireless gaming mice without designing custom PCBs or 3D printing enclosures. The result is a factory-quality mouse with an open, fully configurable firmware, Bluetooth support, and high polling rates.

Many modern wireless mice use a suitable MCU/sensor pair: nRF52840 (microcontroller) and PAW3395/PMW3610 (sensor). This pair works well with ZMK.

Currently ZMK does not provide switching bt/ESB dongle modes without reflashing. However, switching between BT/USB modes is possible.

✨ Key features

  • Factory quality: Uses original shell and electronics for high build quality.

  • Full customization: ZMK features such as unlimited button layers, macros, and behavior settings.

  • Modes:

    • USB: 1000 Hz (when connected by cable)

    • BT / BT Dongle: 125 Hz (standard ZMK mode)

    • ESB (Enhanced ShockBurst): 1000 Hz (requires ZMK ESB module)

  • Power management: Battery level indicator (via ADC) and charge status (CHRG).

  • Sensor: Full support for high-precision optical sensors PAW3395/PMW3610.

💻 Compatible hardware

🐁 Mice

Theoretically any mouse based on nRF52833/nRF52840 + PAW3395/PMW3610 can work.

Model MCU Sensor Status Notes
VGN F1 MOBA nRF52840 PAW3395 ✅ Confirmed Pinout matches VXE R1 Pro.
VGN F1 Pro nRF52840 PAW3395 🧪 Requires testing High likelihood of compatibility.
VGN F1 Pro Max nRF52840 PAW3395 🧪 Requires testing High likelihood of compatibility.
VGN Y2 Ultra/Ultra + nRF52840 PAW3950 🧪 Requires testing High likelihood of compatibility.
VXE R1 Pro nRF52840 PAW3395 ✅ Confirmed Pinout matches VXE R1 Pro.
VXE R1 Pro Max nRF52840 PAW3395 🧪 Requires testing High likelihood of compatibility.
VXE MAD R/R+ nRF52840 PAW3395 🧪 Requires testing High likelihood of compatibility.
VXE MAD R Major/R Major+ nRF52840 PAW3950 🧪 Requires testing High likelihood of compatibility.
LAMZU Atlantis Mini 4K nRF52840 PAW3395 🧪 Requires testing High likelihood of compatibility.
LAMZU Maya nRF52840 PAW3395 🧪 Requires testing High likelihood of compatibility.
Pulsar X2V2 nRF52840 PAW3395 🧪 Requires testing High likelihood of compatibility.
Hitscan Hyperlight nRF52840 PAW3395 🧪 Requires testing High likelihood of compatibility.
Zaopin z2 nRF52840 PAW3395 ✅ Confirmed Pinout matches VXE R1 Pro except for bt/dongle switch
Finalmouse UltralightX Competition nRF52840 PAW3395 🧪 Requires testing High likelihood of compatibility.
Endgame Gear OP1W 4K V2 nRF52840 PAW3950 🧪 Requires testing High likelihood of compatibility.
Endgame Gear XM2w nRF52840 PAW3395 🧪 Requires testing High likelihood of compatibility.
Waizowl OGM PRO v1 nRF52840 PAW3395 🧪 Requires testing High likelihood of compatibility.
Obsidian Pathfinder nRF52840 PAW3950 🧪 Requires testing High likelihood of compatibility.
Darmoshark M2 nRF52840 PAW3395 🧪 Requires testing High likelihood of compatibility.
Darmoshark M2 Pro nRF52840 PAW3395 🧪 Requires testing High likelihood of compatibility.
Darmoshark M3 nRF52840 PAW3395 🧪 Requires testing High likelihood of compatibility.
Darmoshark M3 Pro nRF52840 PAW3395 🧪 Requires testing High likelihood of compatibility.
Darmoshark M3S Pro nRF52840 PAW3395 🧪 Requires testing High likelihood of compatibility.
Darmoshark M3V2 nRF52840 PAW3395 🧪 Requires testing High likelihood of compatibility.
Darmoshark M3S Max nRF52840 PAW3950 🧪 Requires testing High likelihood of compatibility.
Darmoshark M3 Pro Max nRF52840 PAW3950 🧪 Requires testing High likelihood of compatibility.
Darmoshark M3 Micro nRF52840 PAW3395 🧪 Requires testing High likelihood of compatibility.
Darmoshark M3 Micro Pro nRF52840 PAW3395 🧪 Requires testing High likelihood of compatibility.
Darmoshark M3XS nRF52840 PAW3950 🧪 Requires testing High likelihood of compatibility.
Darmoshark M5 nRF52840 PAW3395 🧪 Requires testing High likelihood of compatibility.
Darmoshark M5 Pro nRF52840 PAW3395 🧪 Requires testing High likelihood of compatibility.
Darmoshark M5 Air nRF52840 PAW3950 🧪 Requires testing High likelihood of compatibility.
Darmoshark N3 nRF52840 PAW3395 🧪 Requires testing High likelihood of compatibility.
Darmoshark N5 nRF52840 PAW3395 🧪 Requires testing High likelihood of compatibility.
Darmoshark N7 Max nRF52840 PAW3950 🧪 Requires testing High likelihood of compatibility.
HSK+ lite nRF52840 PAW3399 🧪 Requires testing High likelihood of compatibility.

NOTE: Mice with exotic hardware (displays, optical encoders, etc.) may need extra work for full porting.

♆ Dongles

The choice of dongle is critical for achieving high polling rates (1000Hz+) via the ESB module. However, many stock dongles use incompatible hardware.

CompX Based Dongles (VXE R1 Pro & others)

The standard 1K dongle for the VXE R1 Pro utilizes the CompX CX52850 chip.

  • Compatibility: Incompatible.

  • Notes: ZMK does not support CompX hardware. These dongles cannot be used for this project. Users must use a Nordic-based dongle (like a repurposed nRF52840 development board or a compatible Nordic dongle) to act as the receiver.

High-Speed Dongles (Endgame Gear, Darmoshark 4K/8K)

Models like the Endgame Gear XM2wOP1W 4K V2, and Darmoshark 4K/8K variants use a dual-chip architecture: a Nordic nRF52820 for wireless transmission and a Nuvoton M483 MCU for high-speed USB handling.

  • MCU Constraints: - The nRF52820 has significantly less Flash and RAM than the nRF52840. While ZMK fits without the BLE stack, standard bootloaders like Adafruit will not fit and must be rewritten to communicate with the Nuvoton M483 as the USB interface chip, as the nRF52820 lacks a direct USB connection in these designs.

  • Architecture Challenges: - On these boards, the nRF52820 usually lacks a direct USB connection; it communicates with the Nuvoton M483 (likely via I2C or SPI), which then handles the USB interface.

  • Firmware Status: - Nuvoton M483 is currently not supported by ZMK. Porting would require writing a custom ZMK module to interface between the two chips and developing custom firmware for the Nuvoton MCU itself.

  • Display (Darmoshark 8K): - The 8K version includes a monochrome OLED display. Driving this through the dual-MCU setup adds further layer of complexity for firmware development.

Recommended Path

For the most stable experience, it is recommended to use a Nordic nRF52840 Dongle (PCA10059) or a similar nRF52840-based board flashed with the ZMK ESB receiver firmware. This avoids the limitations of proprietary non-Nordic MCUs.

🛠️ Flashing firmware

WARNING: Everything below you do at your own risk. We bear no responsibility for the consequences of your actions.

Flashing requires a hardware programmer (for example, J-Link or ST-Link with SWD support).

Process to install ZMK on a mouse with a known pinout

1. Prepare the board

Prefer boards that have dedicated programming pads. Look for pads labeled VDD / GND / DIO / CLK. If no pads exist, you may need to remove the nRF52840, flash it separately, and re-solder it.

NOTE: On VGN and VXE the nRF52 is often covered with compound, but programming pads usually exist.

2. Flash the bootloader

WARNING: Powering VDD also powers the sensor. PAW3395 recommends up to 2.1V, while many programmers supply 3.3V. This could damage the sensor. In our experience we have not encountered damage, but you can desolder the sensor or use a lower-voltage programmer.

  1. Connect the programmer to the pads (VDD/DIO/CLK/GND).
  2. If needed, try to save the original firmware using nRF Connect.
  3. Erase the chip and flash the configured bootloader (with DFU button support).

Example command (adjust file names and port as needed):

arm-none-eabi-gdb --batch -ex "target extended-remote /dev/tty.usbmodem7FC1A2831" -ex "mon swdp_scan" -ex "file mouse_bootloader.hex" -ex "att 1" -ex "mon erase" -ex load

See this documentation for details.

The bootloader source is in a separate repository. Prebuilt binaries are available in the releases

DFU mode: Since reset is not exposed on known mice, enter DFU by holding the DPI button and plugging in USB. You can also enter DFU via the &bootloader keycode from ZMK firmware.

3. Build and flash ZMK

  1. Build ZMK firmware using provided device configuration files (boards, shields).
  2. Enter the bootloader (hold DPI button and plug in USB, toggle must be off).
  3. Copy the *.uf2 file to the USB mass storage device that appears.

ZMK config repository for VGN F1 MOBA / VXE R1 Pro / Zaopin z2

🔬 Reverse-engineering the mouse (find the pinout)

If the pinout for your mouse is unknown, you can help the project by discovering it and sharing the results.

Methods to find pinout

  1. Remove the chip and probe all contacts: Fastest method. Desolder nRF52840, trace pins with a multimeter, then resolder the chip.
  2. Measure voltage drops: Measure voltage drops on pins of a reference nRF52840 and compare to target board pin voltages (see docs/nrf52840_v_drops/README.md).
  3. Test firmware with Direct Pin: Create minimal firmware that logs a pin ID when grounded. Then ground pins one by one to find functions.

🙏 Thanks

Special thanks to @greengrocer98 for significant contributions to reverse engineering and development.

Links

About

Project UFA brings the open ZMK firmware to gaming mice with compatible hardware, enabling deeper customization, transparency, and improved security. Its goal is to create a fully open, user-controlled ecosystem for modern pointing devices.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published