rivalcfg icon indicating copy to clipboard operation
rivalcfg copied to clipboard

RIVAL 3 WIRELESS Support?

Open SecretSQL opened this issue 3 years ago • 57 comments

I have a new RIVAL 3 WIRELESS mouse, which has both USB and Bluetooth support. https://steelseries.com/gaming-mice/rival-3-wireless

I purchased it for the Bluetooth support. The mouse 'works' with both Bluetooth and USB. I installed rivalcfg and see that the Rival 3 Wireless is not supported. (Although I tried anyway. )

I am running a Debian derivative (Linux Mint 20). When connected via the USB dongle, the USB device lsusb info is: $ lsusb ID 1038:1830 SteelSeries ApS SteelSeries Rival 3 Wireless

When connected via Bluetooth, lsusb does not list the device. However hcitool lists the address: $ hcitool con Connections: < LE 28:9A:4B:A0:B3:D9 handle 7 state 1 lm MASTER AUTH ENCRYPT

Any chance of adding the Rival 3 wireless to the supported devices?

I am willing to help, but would need pointers on reverse engineering. I have some python experience, and have had a quick look through your code base, which is very well organized. Thanks.

SecretSQL avatar Oct 19 '20 08:10 SecretSQL

Hello,

Currently I am working on the Sensei TEN, and then I have to work on the Rival 500 and the Rival 650. Then I will ask SteelSeries for a Wireless Rival 3 to work on it.

I think this device will be supported in USB mode first, and maybe we will be able to support it in Bluetooth mode (but probably only on Linux, as the kernel's hidraw backend abstracts the communication part of HID devices).

flozz avatar Oct 19 '20 09:10 flozz

Hi, I code in python everyday and I have the mouse in question. Is there any info on how to go about implementing a new mouse in your code, I would be happy to try creating a PR, if I can manage that. I guess the mouse has very similar capabilities to the wired rival 3 so at least the USB mode should be easy, I guess. Thanks for the great work anyway!

kosmiciatakuja avatar Jan 07 '21 20:01 kosmiciatakuja

@flozz actually it should work OOTB if you are using hidapi with the hidraw backend, instead of the libusb one, which is the default in Linux for some reason. This is the case in Arch Linux for eg. It should be a matter of just adding the bluetooth IDs there.

FFY00 avatar Jan 09 '21 22:01 FFY00

Keen to get this added as well. I have one and am happy to pass on anything required.

el1-x avatar Feb 03 '21 09:02 el1-x

@el1-x After installing Rivalcfg, can execute one of the following command (depending which python version your Rivalcfg installation is using):

sudo python -c "import hid;print(hid.enumerate())"
sudo python3 -c "import hid;print(hid.enumerate())"

and give me the output? :)

flozz avatar Feb 04 '21 11:02 flozz

Here is the output. I don't have python2 installed. https://gist.github.com/el1-x/0ca999c2eff6f08783baa3ca45141a37

el1-x avatar Feb 04 '21 12:02 el1-x

Thank you.

Can you change 0x1824 by 0x1830 in the rivalcfg/devices/rival3.py file of your Rivalcfg installation:

  • https://github.com/flozz/rivalcfg/blob/master/rivalcfg/devices/rival3.py#L11

And test if everything work?

NOTE¹: you may need to run rivalcfg as root as udev rules will not be up to date with this change NOTE²: if you do not know where Rivalcfg is installed, be sure you have the v4.3.0 (released monday), and run the following command: rivalcfg --print-debug. It will tell you where the module is installed :)

flozz avatar Feb 04 '21 15:02 flozz

I'm using Arch and the AUR package is out of date. I just flagged it.

Update: Making the changes specified provides more options when using --help as opposed to prior to the changes being made. As of writing this i am yet to attempt to make any changes to the mouse configuration.

  • I made the change to rival3.py
  • Running rivacfg as a regular user did not work.
  • No errors when run as root.

Error when run as standard user

Traceback (most recent call last):
  File "/usr/bin/rivalcfg", line 33, in <module>
    sys.exit(load_entry_point('rivalcfg==4.2.0', 'console_scripts', 'rivalcfg')())
  File "/usr/lib/python3.9/site-packages/rivalcfg/__main__.py", line 45, in main
    mouse = get_first_mouse()
  File "/usr/lib/python3.9/site-packages/rivalcfg/__init__.py", line 27, in get_first_mouse
    return mouse.get_mouse(
  File "/usr/lib/python3.9/site-packages/rivalcfg/mouse.py", line 30, in get_mouse
    hid_device = usbhid.open_device(vendor_id, product_id, profile["endpoint"])
  File "/usr/lib/python3.9/site-packages/rivalcfg/usbhid.py", line 93, in open_device
    device.open_path(path)
  File "hidraw.pyx", line 74, in hid.device.open_path
OSError: open failed

Output from rivalcfg --list SteelSeries Rival 3:

1038:1830 | SteelSeries Rival 3 1038:184c | SteelSeries Rival 3 (firmware v0.37.0.0)

Output from rivalcfg --help

SteelSeries Rival 3 Options:
  -s SENSITIVITY, --sensitivity SENSITIVITY
                        Set sensitivity preset (DPI) (up to 5 settings,
                        from 200 dpi to 8500 dpi, default: '800, 1600')
  -p POLLING_RATE, --polling-rate POLLING_RATE
                        Set polling rate (Hz) (values: 125, 250, 500,
                        1000, default: 1000)
  --strip-top-color Z1_COLOR, --z1 Z1_COLOR
                        Set the color of the top LED of the strip (e.g.
                        red, #ff0000, ff0000, #f00, f00, default: red)
  --strip-middle-color Z2_COLOR, --z2 Z2_COLOR
                        Set the color of the middle LED of the strip (e.g.
                        red, #ff0000, ff0000, #f00, f00, default: lime)
  --strip-bottom-color Z3_COLOR, --z3 Z3_COLOR
                        Set the color of the bottom LED of the strip (e.g.
                        red, #ff0000, ff0000, #f00, f00, default: blue)
  -c LOGO_COLOR, --logo-color LOGO_COLOR, --z4 LOGO_COLOR
                        Set the color of the logo LED (e.g. red, #ff0000,
                        ff0000, #f00, f00, default: purple)
  -e LIGHT_EFFECT, --light-effect LIGHT_EFFECT
                        Set the light effect (values: rainbow-shift,
                        breath-fast, breath, breath-slow, steady, rainbow-
                        breath, disco, default: steady)
  -b BUTTONS_MAPPING, --buttons BUTTONS_MAPPING
                        Set the mapping of the buttons (default:
                        buttons(button1=button1; button2=button2;
                        button3=button3; button4=button4; button5=button5;
                        button6=dpi; scrollup=scrollup;
                        scrolldown=scrolldown; layout=qwerty))
  -r, --reset           Reset all settings to their factory default

el1-x avatar Feb 05 '21 01:02 el1-x

Thank you @el1-x

  • For the AUR package, I forgot it... I will update it very soon :)
  • Running rivacfg as a regular user did not work, as expected (permission issue, you can try to run rivalcfg --update-udev as root to fix that ; a reboot may be required)
  • The --help option shows the Rival 3 options, as expected, but does it work (can you try to change de DPI, colors, etc to confirm it works?)

flozz avatar Feb 05 '21 15:02 flozz

(AUR package updated!)

flozz avatar Feb 05 '21 17:02 flozz

I have updated to the latest release via the AUR.

  • I had already tried running --update-dev but was unable to launch rivalcfg without root permissions.
  • However, since updating and performing a reboot --help performs as expected with regular user permissions.

I attempted to make a change to the polling rate and set it to 500. I assume because i received no error message that the change was successful. However, i checked the setting via the Steelseries Engine software and it was reporting the polling rate remained at 1000.

Here is the --print-debug output.

RIVALCFG
========
Version: 4.3.0
udev rules installed: True
udev rules up to date: True
Installation path: /usr/lib/python3.9/site-packages/rivalcfg

OPERATING SYSTEM
================
OS: Linux
Platform: Linux-5.10.13-arch1-1-x86_64-with-glibc2.32
Version: #1 SMP PREEMPT Wed, 03 Feb 2021 23:44:07 +0000
Distribution issue: Arch Linux \r (\l)

PYTHON
======
Python version: 3.9.1
HIDAPI version: 0.10.1

PLUGGED STEELSERIES DEVICES ENDPOINTS
=====================================
1038:1830 | 00 | SteelSeries Rival 3 Wireless (firmware v)
1038:1830 | 00 | SteelSeries Rival 3 Wireless (firmware v)
1038:1830 | 01 | SteelSeries Rival 3 Wireless (firmware v)
1038:1830 | 01 | SteelSeries Rival 3 Wireless (firmware v)
1038:1830 | 02 | SteelSeries Rival 3 Wireless (firmware v)
1038:1830 | 03 | SteelSeries Rival 3 Wireless (firmware v)

I have updated the firmware using Windows and the Steelseris Engine software. Here is a screenshot of the software and available mouse settings. The Rival 3 Wireless is a no frills mouse so all of the RGB settings available for the standard Rival 3 are of no use.

steelseries-rival3w-engine

el1-x avatar Feb 06 '21 05:02 el1-x

For the DPI Settings, you will not be able to check them back in the SSE3. SSE3 will not read them from the mouse, it will just send the settings it saved on you HDD to the device when you plug it.

So to check the DPI, set the lowest available DPI to your mouse, move it (it should be slow), then set the maximum DPI and the cursor should move very quickly.


For colors... if there is no LED those options will not do anything... ^^'

→ I will implement this device as se separated mouse family to not have useless options :)


You can also check the button mapping setting:

rivalcfg --buttons "buttons(button5=A)"

Now the B5 of the mouse should correspond to the keyboard "A" button (of a QWERTY keyboard)

To reset this setting:

rivalcfg --buttons default

:)

flozz avatar Feb 06 '21 10:02 flozz

Neither adjusting the buttons, nor the DPI had any effect.

rivalcfg -b "buttons(button5=A)" rivalcfg -s 2000

el1-x avatar Feb 06 '21 16:02 el1-x

OK... So this device will need some reverse engineering then...

flozz avatar Feb 06 '21 18:02 flozz

What do you need from me?

el1-x avatar Feb 07 '21 03:02 el1-x

Hello, sorry for the long time I took to answer...

If you are able to do some reverse engineering, it would help, else I will have to find an other way to work on this device :)

flozz avatar Feb 23 '21 07:02 flozz

Don't worry about taking time to answer, life gets in the way. I'm just the same. What do you need me to do specifically? I will give you whatever information I can.

el1-x avatar Apr 02 '21 04:04 el1-x

I wrote articles about reverse engineering USB devices:

  • Reverse engineering of the Rival 100 Mouse: https://blog.flozz.fr/2016/03/27/steelseries-rival-100-reverse-engineering-dun-peripherique-usb/
  • Reverse engineering of the Arctis 7 Headset: https://blog.flozz.fr/2020/05/25/reverse-engineering-recuperer-le-niveau-de-batterie-du-casque-sans-fil-steelseries-arctis-7/

The articles are in French but Google Translate should help. I think it should not be too difficult to try on the Wireless Rival 3 using the USB dongle (I have no experience with the Bluetooth mode).

What you can do is to capture packets as described in the articles and post what you get here:

  • Change one parameter at time
  • capture the corresponding packet

so we will see what we can do :)

flozz avatar Apr 02 '21 11:04 flozz

Hi,

i've a problem with my new Rival 3 Wireless. After some days, wheel start blinking green (or yellow) and then stops. I've replaced batteries and it was ok for (may be) ten days. And then green blinking starts again and mouse stops working. Any idea?

Thanks for your help

G.

GoboTheGeek avatar Aug 28 '21 12:08 GoboTheGeek

That is normal operation. The flashing green/yellow indicator lets you know the batteries are low. It will blink faster as the battery drains. From my experience you'll never get the advertised 400hr battery life from the device, to extend it as far as possible you need to enable 'High Efficiency Mode' which disables all lighting and drops the polling rate to 125Hz. This needs to be done using the Windows based software.

el1-x avatar Aug 28 '21 14:08 el1-x

What is your average battery life time? In my case it drains in about a week or so with several hours a day of use. It is without battery saving mode.

tomaszg7 avatar Aug 28 '21 14:08 tomaszg7

My experience is the about the same as yours @tomaszg7

el1-x avatar Aug 28 '21 15:08 el1-x

It's hard to estimate battery life time but i'll say around 35 hours (approx. 15 days as i mainly use my computer on week-ends). This mouse is not expensive to buy but if i need to change 1 battery set (or more) per month, it's a wreck and i'll have to think about changing it...

For now, i've set polling rate to 250.

GoboTheGeek avatar Aug 29 '21 06:08 GoboTheGeek

Hey, nice to see other people having the same needs. Any news on reverse engineering?

TheBready avatar Dec 12 '21 19:12 TheBready

I followed your manual and was tracking the data fragments for some things. Is this helpful? I was not able to test it but I was able to reproduce it in Wireshark.

rival3w.txt

TheBready avatar Dec 13 '21 02:12 TheBready

Yes, it is very useful. Here what I learn for DPI and Polling rate with the data you provided:

Sensitivity

  • Range: 100 - 18000 dpi (00 00 - D6 00)

  • Increment: ??

  • Endianess: Little Endian?

  • First preset: 1

  • Max presets: 5

  • Packet:

    | 20      | 05           | 05            | 04 00 | 09 00 | 0d 00 | 12 00 | 17 00 |
    | Command | Preset count | Active preset | Prst1 | Prst2 | Prst3 | Prst4 | Prst5 |
    

Polling rate

  • Choice: 1k, 500, 250, 125 Hz (default: 1k)

  • Packet:

    | 17      | 00    |
    | Command | Value |
    
  • Values:

    • 0x00: 1 kHz
    • 0x01: 500 Hz
    • 0x02: 250 Hz
    • 0x03: 125 Hz

flozz avatar Dec 13 '21 13:12 flozz

The increments of the sensitivity are 100. If my math is correct then there are 180 levels. Is it possible to add a profile for the rival 3 wireless that? I would try it myself but I am not really used working with data like that. Would be a real hassle to get into.

TheBready avatar Dec 13 '21 13:12 TheBready

The sensor of the Rival 3 Wireless is the same as the one of the Aerox 3 Wireless (and Prime Wireless and Prime Mini Wireless too). So I already know it is not perfectly linear:

Capture d’écran de 2021-11-15 13-22-21

So we will be able have an increment of 50 dpi with a +/- 50 dpi of error margin:

Capture d’écran de 2021-11-16 13-01-48


I am currently working on the Rival 650, but I will try to start a branch with a minimal set of feature to let you test if it work :)

flozz avatar Dec 13 '21 13:12 flozz

That sounds great. I think +/- 50 dpi is nothing noticeable. Let me know when the branch is ready for testing.

Have this coffee.

TheBready avatar Dec 13 '21 16:12 TheBready

Thank you for the coffee :coffee: :)


I implemented the sensitivity and the polling rate. But as the save command is missing, you will have to add the --no-save parameter to test:

python -m rivalcfg --no-save --sensitivity 100
python -m rivalcfg --no-save --sensitivity 400,800,1600
python -m rivalcfg --no-save --polling-rate 125
python -m rivalcfg --no-save --polling-rate 1000

You will find everything in the rival3-wireless branch, please test with various configuration to check if it works :)


I need to know what is the save command in order to have a minimal working profile. When you hit the "save" button of the SSE/GG Engine, what is the last packet sent to the device? (generally it is 09, but it is different on some devices)


Also this device seems to have a LED on the wheel, can you capture packets when you change the LED color?

flozz avatar Dec 13 '21 17:12 flozz