Skip to content

About

Lexip Np93 ALPHA mouse (04d8:fd0a) LED control on Linux: OpenRGB plugin, CLI and udev rule

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

Repository files navigation

Lexip Np93 ALPHA LED control on Linux (OpenRGB plugin + CLI)

Set the LED colour of the Lexip Np93 ALPHA gaming mouse (first generation, USB ID 04d8:fd0a, shows up as "Lexip Gaming") on Linux. The official Lexip Control Software is Windows-only.

This repo contains three things:

  • lexip_led.py: a dependency-free Python CLI that sets the colour.
  • A udev rule that reapplies your colour whenever the mouse is plugged in.
  • An OpenRGB plugin that adds a working "Lexip Np93 ALPHA" device to OpenRGB.

Why OpenRGB detects the mouse but can't change the colour

OpenRGB has a built-in Lexip driver ("Np93 ALPHA - Gaming Mouse"). It builds the correct colour packet, but sends it to the wrong USB interface, so the mouse ignores it.

The mouse exposes five HID interfaces. The built-in detector (REGISTER_HID_DETECTOR_IPU(..., 0, 0x0001, 2)) selects interface 0, the boot-protocol mouse, which has only an IN endpoint. Only interface 4 (usage page 0xFF00, 64-byte output report, no report IDs) has an interrupt OUT endpoint (0x05), and that interface accepts the packet.

Colour packet (64 bytes, sent after a leading report-number byte 00):

24 01 RR GG BB 00 64 80 00 ... 00

Byte 64 is not a brightness value: changing it does nothing. To dim the LED, use a darker colour.

Tested on firmware bcdDevice 0.05 with OpenRGB 0.9 on Ubuntu.

CLI

./lexip_led.py ff0000      # red
./lexip_led.py 202000      # dim yellow
./lexip_led.py 000000      # off

The script finds the right /dev/hidrawN from sysfs (HID_ID + input4), and --device /dev/hidrawN overrides that. You need write access to the hidraw node. OpenRGB's udev rules (60-openrgb.rules) already grant it through uaccess; otherwise run the script as root or add your own rule. With no colour argument, the script reads /etc/lexip-led.conf.

Reapply colour on plug-in (udev)

sudo ./install.sh ff0080

This installs:

  • /usr/local/bin/lexip_led.py
  • /etc/udev/rules.d/99-lexip-led.rules
  • /etc/lexip-led.conf (the colour)

It then applies the colour right away. Run it again to change the colour.

OpenRGB plugin

The plugin is built for OpenRGB 0.9 (Qt5, plugin API 3). It sends the same packet as the built-in driver, but to interface 4.

sudo apt install qtbase5-dev cmake g++ git
./openrgb-plugin/build.sh

build.sh does three things:

  1. Clones OpenRGB release_0.9 into openrgb-plugin/build/.
  2. Builds the plugin. It compiles in RGBController.cpp, because the openrgb binary exports almost no symbols.
  3. Copies the plugin to ~/.config/OpenRGB/plugins/.

After the build:

  1. Restart OpenRGB.
  2. Use the new "Lexip Np93 ALPHA" device.
  3. Disable the built-in "Np93 ALPHA - Gaming Mouse" under Settings > Supported Devices.

The mouse must be connected when OpenRGB starts. If it is replugged later, the plugin reopens the new hidraw node on its next write.

For other OpenRGB versions, change the branch in build.sh. The plugin API and the RGBController layout change between releases.

How the protocol was found

The official installer (lexip_control_software_4.exe) is an Advanced Installer wrapper. The MSI and CAB inside it are stored with their first 0x200 bytes XORed with 0xFF. The app inside is built with Flutter. It talks to the mouse through hiddriverx64_wired.dll, a thin HID transport that exports Hid_Write, SetFeature and GetFeature. The colour packet matches the one in OpenRGB's existing driver. Sending that packet to interface 4 changed the colour; sending it to interface 0 did not. No Lexip software or firmware is included in this repo.

License

GPL-2.0, same as OpenRGB. The plugin compiles in OpenRGB's RGBController.cpp.

About

Lexip Np93 ALPHA mouse (04d8:fd0a) LED control on Linux: OpenRGB plugin, CLI and udev rule

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages