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.
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.
./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.
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.
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:
- Clones OpenRGB
release_0.9intoopenrgb-plugin/build/. - Builds the plugin. It compiles in
RGBController.cpp, because theopenrgbbinary exports almost no symbols. - Copies the plugin to
~/.config/OpenRGB/plugins/.
After the build:
- Restart OpenRGB.
- Use the new "Lexip Np93 ALPHA" device.
- 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.
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.
GPL-2.0, same as OpenRGB. The plugin compiles in OpenRGB's RGBController.cpp.