flozz / rivalcfg

CLI tool and Python library to configure SteelSeries gaming mice
https://flozz.github.io/rivalcfg/
Do What The F*ck You Want To Public License
761 stars 61 forks source link

Aerox 5 wired not listed #192

Closed jblankfeld closed 4 months ago

jblankfeld commented 1 year ago

Bug description

What happened

I used rivalcfg from source for my Aerox 5 wired model and the device is not listed.

What was expected

I can change the colors.

Step to reproduce

Always

System information

ArchLinux, rivalcfg from git, installed with pip.

Hi,

I have a Aerox 5 wired and I think the productId for the current config does not match my model.

`

lsusb Bus 003 Device 009: ID 1038:1850 SteelSeries ApS SteelSeries Aerox 5 `

The device has another product id here https://github.com/flozz/rivalcfg/blob/master/rivalcfg/devices/aerox5_wireless_wired.py#L13

I "hacked" the python package to match my model and it partially worked. I could only change the top color but the color was wrong and bottom and middle colors were not working. I then realized that the commands for this mouse actually match the Aerox 3 device https://github.com/flozz/rivalcfg/blob/master/rivalcfg/devices/aerox3.py After a new hack it finally worked.

flozz commented 1 year ago

The Aerox 5 is not supported by Rivalcfg yet. We will need some reverse engineering to support it. :)

NOTE: Aerox 5 Wireless and Aerox 5 are two different devices (we already found differences in the protocols of the Aerox 3 / Aerox 3 Wireless)

mxiia commented 1 year ago

is there anything that can be done to help with the wired Aerox 5?

flozz commented 1 year ago

@mxiaa yes. I need someone to capture packet sent by the GG Engine to the mouse when changing each options. This will allow me to reverse engineer its protocol and to implement it in Rivalcfg.

Here is an example of what has been done for the Aerox 3 Wireless: https://github.com/gort818/aerox3-wireless/blob/aa1020d493bfcb451438a5cd5e00aed249d9bc29/aerox3-wireless.txt

mxiia commented 1 year ago

I'll mess around with wireshark for this soon and let you know what I gather!

leon-matthews commented 1 year ago

I too have a Wired Aerox 5, and would be happy to run whatever tests that you need. To start with, here's the output requested on the Contributing page.

$ lsusb -d 1038:
Bus 001 Device 008: ID 1038:1850 SteelSeries ApS SteelSeries Aerox 5
$ rivalcfg --print-debug

RIVALCFG
========
Version: 4.8.0
udev rules installed: True
udev rules up to date: True
Installation path: /home/leon/.virtualenvs/rivalcfg/lib/python3.10/site-packages/rivalcfg

OPERATING SYSTEM
================
OS: Linux
Platform: Linux-5.19.0-38-generic-x86_64-with-glibc2.36
Version: #39-Ubuntu SMP PREEMPT_DYNAMIC Fri Mar 17 17:33:16 UTC 2023
Distribution issue: Ubuntu 22.10 \n \l

PYTHON
======
Python version: 3.10.7
HIDAPI version: 0.13.1

PLUGGED STEELSERIES DEVICES ENDPOINTS
=====================================
1038:1850 | 00 |  (firmware v0)
1038:1850 | 01 |  (firmware v0)
1038:1850 | 02 |  (firmware v0)
1038:1850 | 03 |  (firmware v0)
Krivers29 commented 4 months ago

Is there any news on the subject? I too have a wired aerox 5 (by the way, does someone has a scrolling issue on linux with it?) I'll be happy to help if needed.

flozz commented 4 months ago

I am working on the implementation if the Aerox 5 (wired) on the feat-aerox5 branch.

I currently "merged" some data from the Aerox 3 and Aerox 5 Wireless profiles to have a base to start from.


Here is the list of features that needs to be checked (and how to check) to know if they are working or not:

I will try to get more information Monday.


To test, first prepare the dev environment:

# install some system dependencies
sudo apt install python3-dev python3-venv

# clone the Git repository and go to the branch
git clone https://github.com/flozz/rivalcfg.git
cd rivalcfg
git checkout feat-aerox5

# create / activate venv and install dependencies
python3 -m venv __env__
source __env__/bin/activate
pip install -e ".[dev]"

# NOTE: next time you will only need to run the "source __env__/bin/activate" command to reactivate the virtualenv :)

Then we have to configure udev to allow rivalcfg to comunicate with the device without being root. Add the following lines to the /etc/udev/rules.d/99-steelseries-rival.rules file (create it if it does not exist):

# SteelSeries Aerox 5 Wireless (wired mode)
SUBSYSTEM=="hidraw", ATTRS{idVendor}=="1038", ATTRS{idProduct}=="1854", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="1038", ATTRS{idProduct}=="1854", MODE="0666"

then reload the rules:

sudo udevadm control --reload-rules

and finally unplug/replug the mouse to the computer.

You can now test commands like this:

python -m rivalcfg -h
python -m rivalcfg -z1 lime
python -m rivalcfg -z2 aqua
python -m rivalcfg -z3 red
Krivers29 commented 4 months ago

Some of those command weren't working, not because of compatibility but because of the syntax, for example :

python -m rivalcfg -z1 red

returned a unrecognized argument error, whereas :

python -m rivalcfg --top-color red

worked flawlessly. I don't know if it was intended, but I used the second syntax when this happened.

  • [ ] polling_rate

    No easy way to test. I will confirm this later.

  • [ ] save_command

    No easy way to test for now. I will confirm this later.

flozz commented 4 months ago

Some of those command weren't working, not because of compatibility but because of the syntax, for example :

python -m rivalcfg -z1 red

returned a unrecognized argument error, whereas :

python -m rivalcfg --top-color red

worked flawlessly. I don't know if it was intended, but I used the second syntax when this happened.

Oopsie, the param is --z1 not -z1... I edited my comment to fix this, sorry ^^'

Thank you for your help! :)

flozz commented 4 months ago
flozz commented 4 months ago

The support of the Aerox 5 is now complete and merged on master. It will be released with the next Rivalcfg version by the end of the week :)

flozz commented 4 months ago

→ Released in v4.12.0 :)