Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Aerox 3 Wireless #167

Closed
gort818 opened this issue Aug 14, 2021 · 64 comments
Closed

Aerox 3 Wireless #167

gort818 opened this issue Aug 14, 2021 · 64 comments

Comments

@gort818
Copy link

gort818 commented Aug 14, 2021

I did some reverse engineering this week, got quite a bit done, Attached is what I have found so far.
ACTIVE LED colors are not saved to device memory all other settings seem to be.
I could not write to the device unless I was root.. Udev rules are in place and no luck.

For the LEDs I have a systemd service running every few seconds just like the Steel Series Software.

Wireless Mode:
VID:1038
PID:1838

Wired Mode:
VID:1038
PID:183a

Below is what I have found out so far.

WIRELESS:
aerox3-wireless.txt

WIRED:
aerox3-wireless-wired.txt

Here is repo I created as well, I will update it as I find more info
https://github.com/gort818/aerox3-wireless

@flozz
Copy link
Owner

flozz commented Aug 18, 2021

Hello,

I am working on the Aerox 3 (#156).

  • The wired mode of the Aerox 3 Wireless seems to work the same than the non-wireless Aerox 3, so I will start there.

  • For the wireless mode, I am not able to find the 1038:1838 device in the database (I updated it, but maybe I should extract more things to it, I will check that)). Can you confirm it is the ID of the USB dongle for the 2.4 GHz mode?

  • Also, have you some information about the Bluetooth mode? Is the device handled by the SS Engine with Bluetooth mode?

@flozz
Copy link
Owner

flozz commented Aug 18, 2021

A first shot is available on the aerox3 branch, more info here:

please test and report info in the issue #156, we will keep that one (#167) for the wireless mode of the mouse :)

@flozz flozz mentioned this issue Aug 19, 2021
@flozz
Copy link
Owner

flozz commented Aug 19, 2021

I updated the branch with this mouse. Currently, ONLY wired mode is supported, not the wireless one.

Available settings are:

SteelSeries Aerox 3 Wireless (wired mode) 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)
  --top-color Z1_COLOR, --z1 Z1_COLOR
                        Set the color of the top LED (e.g. red, #ff0000, ff0000, #f00, f00,
                        default: red)
  --middle-color Z2_COLOR, --z2 Z2_COLOR
                        Set the color of the middle LED (e.g. red, #ff0000, ff0000, #f00,
                        f00, default: lime)
  --bottom-color Z3_COLOR, --z3 Z3_COLOR
                        Set the color of the bottom LED (e.g. red, #ff0000, ff0000, #f00,
                        f00, default: blue)
  -l LED_BRIGHTNESS, --led-brightness LED_BRIGHTNESS
                        Set the brightness of the LEDs (from 0 to 16, default: 16)
  -r, --reset           Reset all settings to their factory default

can you check it work?

if it do not work at all, try to change the endpoint (https://github.com/flozz/rivalcfg/blob/aerox3/rivalcfg/devices/aerox3_wireless.py#L11)

@fluffynuts
Copy link

fluffynuts commented Aug 19, 2021

@flozz wired mode works fine (tested colors). Wireless mode - not so much, after adding a model with product_id of 0x1838. The app does --help correctly and looks like it attempts to do stuff, but I don't see any effect.

--print-debug mentions 5 endpoints - trying 0-4 makes no difference (and 5 errors, predictably)

@flozz
Copy link
Owner

flozz commented Aug 19, 2021

For the wireless mode it is normal it do not work, all command number are different, I will add it after ;)

@gort818
Copy link
Author

gort818 commented Aug 20, 2021

In Wired mode colors are working, sensitivity is working, not sure how to check polling rate,
LED brightness is not working ValueError: Input range and output range must have the same length

@gort818
Copy link
Author

gort818 commented Aug 20, 2021

Ok fixed it input range should be input_range": [0, 15, 1],

Here is the device file for wireless mode.
https://gist.github.com/gort818/590f3c43b77afb917f81da0ec4bac877

@gort818
Copy link
Author

gort818 commented Aug 20, 2021

Added button mappings, rainbow effect, and reactive led

@fluffynuts
Copy link

@gort818 YAS, works like a charm. Nicely done.

@fluffynuts
Copy link

I have an orange-to-red static color flow over my rig and this was the final piece of the puzzle

image

@gort818
Copy link
Author

gort818 commented Aug 20, 2021

Nice, there are a few more settings I need to add, also the colors will not stay after a reboot or if the mouse goes inactive.. might want a script to keep writing the colors. use the no-save option since the colors are not written to memory

@fluffynuts
Copy link

yeah, I noticed that they don't persist after the mouse sleeps; I gather that SS removed practically everything to get the weight down on this device.

@gort818
Copy link
Author

gort818 commented Aug 21, 2021

I am going to need some help with the sensitivity settings.. they are 100–18,000 in 100 CPI Increments

@fluffynuts
Copy link

how can I help?

@flozz
Copy link
Owner

flozz commented Aug 21, 2021

Updates:

  • I fixed the brightness command
  • I added the button mapping

→ Can you check it works?


Questions:

  • I saw you added the rainbow effect command but kept only the 0b111 (all) option. Is it because the other options do not work?
  • For the commands that are specific to the wireless mode, are they working in wired mode too? For example, the "wireless sleep time" (0x69), can it be changed in wired mode with the 0x29 command?
  • What is the command to get the battery level? Is this command available in both wired and wireless mode?
    • Looking at your text files, it seems to be 0x12 (in wired mode?)
    • If 0x12 is the command in wired mode, is 0x52 the corresponding command in wireless mode?

NOTE: I still work only on the wired mode as the wireless one is identical with only the command ids that change (once the wired mode finished I will duplicate the profile for the wireless mode)

@gort818
Copy link
Author

gort818 commented Aug 21, 2021

Brightness command and button mapping work in wired mode.

  1. Rainbow effect only affects all the LEDs.
  2. The same settings are available in both wired and wireless modes.
  3. That was actually the response I got when the mouse as plugged in couldn't see any corresponding command. I haven't found the command to get battery level yet.

@fluffynuts
Copy link

I also need to figure out how to determine when the mouse "wakes up" - if I cron a script to ping the mouse with colors every minute, the mouse never goes to sleep, so ideally, I'd like to ping it once when it wakes up / connects and not again until next time; as noted before, colors are forgotten when the mouse has a nap.

Battery level indicator would be aces - I'd like to configure a plasmoid to watch that.

@flozz
Copy link
Owner

flozz commented Aug 23, 2021

That was actually the response I got when the mouse as plugged in couldn't see any corresponding command. I haven't found the command to get battery level yet.

Can you try sending the 0x12 command to the mouse (maybe it worth trying with 0x52 too in wireless mode) to see if the device respond with the battery level?

Here is a Python code that can help you to test:

import hid


def open_device(vendor_id, product_id, endpoint):
    path = None
    device = hid.device()
    for interface in hid.enumerate(vendor_id, product_id):
        if interface["interface_number"] == endpoint:
            path = interface["path"]
            break
    if path:
        device.open_path(path)
        return device
    raise Exception("Requested device or endpoint not found: %04x:%04x:%02x" % (  # noqa
        vendor_id, product_id, endpoint))


# Mabe try with 0x183a in wired mode too?
device = open_device(0x1038, 0x1838, 0x03)
device.write(b"\x12")  # Mabe try with \x52 in wireless mode too?
print(device.read(31))
device.close()

@fluffynuts
Copy link

ok, I've tried all combinations for:

  • device ids: 0x1838 (wireless) 0x183a (wired)
  • bytes to write: 0x12 and 0x52

Initially, 0x12 against wireless hung, 0x52 returned an array of mostly zeros, leading with 64, 255. However, after switching to wired and performing the tests there (both hung) now wireless hangs on the read for both input bytes. I've tried turning the mouse off and on again - no difference. Even if I reduce the buffer size to 1 byte, the script hangs on the read now.

@flozz
Copy link
Owner

flozz commented Aug 23, 2021

That mean this is not the right command to get the battery level...

Thank you for the tests! :D

@flozz
Copy link
Owner

flozz commented Aug 23, 2021

Updates... :)


I added the rainbow effect command. To try it: rivalcfg --rainbow-effect (it takes no parameter).

After trying this command, please check the content of the ~/.config/rivalcfg/1838_183*.device.json files: the rainbow_effect setting sould not be present. :)


I added the profile for the Aerox 3 Wireless in 2.4 GHz mode. Can you try everything work as expected?

@gort818
Copy link
Author

gort818 commented Aug 23, 2021

Everything seems to be working great.. the sensitivity is wrong though.. it is 100–18,000 in 100 CPI Increments

@flozz
Copy link
Owner

flozz commented Aug 24, 2021

he sensitivity is wrong though.. it is 100–18,000 in 100 CPI Increments

Oh yes, you are right, I forget to update it /o\

Should be OK now :)

@flozz
Copy link
Owner

flozz commented Aug 24, 2021

Update: I added the reactive color option:

  -a REACTIVE_COLOR, --reactive-color REACTIVE_COLOR
                        Set the color of the LEDs in reaction to a button click (e.g. off,
                        disable, red, #ff0000, ff0000, #f00, f00, default: off)

can you check it works in both wired and 2.4 GHz wireless mode? :)

@mewtlu
Copy link

mewtlu commented Aug 24, 2021

Both rainbow and reactive worked perfectly first time for me over wireless, thanks a lot! :D

@gort818
Copy link
Author

gort818 commented Aug 28, 2021

@fluffynuts Think I got the battery level sorted
WIRED

    Device.write(b"\x92")
    data = device.read(2)
    print(data)
    percent = "{:.0%}".format(data[1] / 149)
    print(percent)

WIRELESS

    device.write(b"\xD2")
    data = device.read(2)
    print(data)
    percent = "{:.0%}".format(data[1] / 21)
    print(percent)

@flozz
Copy link
Owner

flozz commented Aug 30, 2021

Thank you for the tests, I will work on this as soon as possible.

Also it seems we should read-back after each commands on this device. I will implement that too, but I do not know how much Bytes I should read. If you can check that too... :)

@flozz
Copy link
Owner

flozz commented Sep 1, 2021

Hello,

I implemented the battery level:

  --battery-level       Print the battery level of the mouse and exit

You should have results like

Charging [========= ] 95 %
Discharging [========= ] 95 %

Can you check it works?

@flozz
Copy link
Owner

flozz commented Nov 14, 2021

Ok, the non-wireless Aerox 3 support is merged on master. I can now focus on the Aerox 3 Wireless.

The work continue on the aerox3-wireless.

@mewtlu I think I found the issue with the DPI... I will work on this tomorrow... But I will need someone to check it works :)

@flozz
Copy link
Owner

flozz commented Nov 15, 2021

Can someone try something for me with DPIs?

Can you test if there is differences in the cursor speed when you run following commands?

rivalcfg -s 100,100
rivalcfg -s 100,2000

(only changing the value of the second preset... I think the second preset is the one automatically selected when updating the values)

@mewtlu
Copy link

mewtlu commented Nov 15, 2021

Looks like you're right, just changing the second value seems to adjust it exactly to whatever I input!

@flozz
Copy link
Owner

flozz commented Nov 16, 2021

Yes, good news! :)

I just have to handle this in the multidpi_range handler now :)

@flozz
Copy link
Owner

flozz commented Nov 16, 2021

It should now work. Can you try it?

rivalcfg -s 100
rivalcfg -s 18000

@mewtlu
Copy link

mewtlu commented Nov 16, 2021

Awesome, seems to work great now

@flozz
Copy link
Owner

flozz commented Nov 16, 2021

Can you test one last thing on DPIs?

Can you try to first set it to 18000

rivalcfg -s 18000

Then set it to 200

rivalcfg -s 200

Does it work as expected?

@mewtlu
Copy link

mewtlu commented Nov 16, 2021

Yep that seems to do exactly what I'd expect, super high DPI when I set it to 18000 then went down to a low 200, and works fine to reset it back to my standard 800.

@flozz
Copy link
Owner

flozz commented Nov 16, 2021

Ok, thank you very much :)

@vith
Copy link

vith commented Nov 17, 2021

sensitivity is working for me too 🎉

@flozz
Copy link
Owner

flozz commented Nov 23, 2021

I pushed a thing to test in the branch. Can you try to run some command and to tell me what was the command and the output?

@vith
Copy link

vith commented Nov 23, 2021

rivalcfg -s 2400
Data:
[109, 0, 0, 46, 49, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]

@mewtlu
Copy link

mewtlu commented Nov 23, 2021

When I ran rivalcfg -s 800 for the first time I got:
[109, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]

I then ran rivalcfg -s 600 and got:
[81, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]

and it appears running any other sensitivity command past that gives me the same response as the second, so I then tried rivalcfg -e which gave me:
[98, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]

Then running the first command again gave me the same response as it did the first time.
Hope this helps, let me know if there's anything else I can do!

@flozz
Copy link
Owner

flozz commented Nov 23, 2021

Thank you for your tests. I hope I will be able to finish the Aerox 3 Wireless support by the end of the week :)

@mewtlu
Copy link

mewtlu commented Nov 24, 2021

Been having some issues this morning with my Ubuntu machine not noticing the mouse even after replugging it and trying it both wired and wireless, though at some point it just started working fine in both modes, but since then I seem to be having issues with the scroll where it seems to disable for ~0.5s every few seconds of constant scrolling?

I've also noticed there's some jitters with the cursor movement for a couple seconds right after setting my sensitivity, and the "Data:" log is just echoing out an empty array now.

While typing this out the mouse also just suddenly stopped responding at all until I re-plugged it, and now strangely the cursor is completely jittery.

Apologies if this info doesn't help much, just had some weird cases I've not seen before so thought I'd report in case it might be related to the software. Let me know if there's anything else I can provide to help work out what might be happening here.
Thanks!

Edit: Plugged the mouse directly into a USB 3 port rather than a 2.0 on an extender with power issues and that appeared to fix the jitter issues, though the mouse still stopped working a few seconds after running the sensitivity command and the Data log seems intermittent, so some of these issues may have just been caused by low power?

I also ran rivalcfg -r in hopes it might fix the scroll issue and it reset the sensitivity but it doesn't appear to have affected the scroll.
The issue seems to be prevalent after a reboot, and upon startup I got some "USB: Unable to enumerate device" errors. Taking a look at my syslog when plugging the device in I see the following:

Nov 24 10:45:19 omega kernel: [  365.929167] usb 1-5.2: new full-speed USB device number 34 using xhci_hcd
Nov 24 10:45:19 omega kernel: [  366.056997] usb 1-5.2: device descriptor read/64, error -32
Nov 24 10:45:19 omega kernel: [  366.297020] usb 1-5.2: device descriptor read/64, error -32
Nov 24 10:45:19 omega kernel: [  366.537078] usb 1-5.2: new full-speed USB device number 35 using xhci_hcd
Nov 24 10:45:19 omega kernel: [  366.669236] usb 1-5.2: device descriptor read/64, error -32
Nov 24 10:45:20 omega kernel: [  366.905012] usb 1-5.2: device descriptor read/64, error -32
Nov 24 10:45:20 omega kernel: [  367.013275] usb 1-5-port2: attempt power cycle
Nov 24 10:45:21 omega kernel: [  368.541227] usb 1-5.2: new full-speed USB device number 36 using xhci_hcd
Nov 24 10:45:21 omega kernel: [  368.541384] usb 1-5.2: Device not responding to setup address.
Nov 24 10:45:21 omega kernel: [  368.753245] usb 1-5.2: Device not responding to setup address.
Nov 24 10:45:22 omega kernel: [  368.960948] usb 1-5.2: device not accepting address 36, error -71
Nov 24 10:45:22 omega kernel: [  369.088964] usb 1-5.2: new full-speed USB device number 37 using xhci_hcd
Nov 24 10:45:22 omega kernel: [  369.089153] usb 1-5.2: Device not responding to setup address.
Nov 24 10:45:22 omega kernel: [  369.297337] usb 1-5.2: Device not responding to setup address.
Nov 24 10:45:22 omega kernel: [  369.508962] usb 1-5.2: device not accepting address 37, error -71
Nov 24 10:45:22 omega kernel: [  369.509256] usb 1-5-port2: unable to enumerate USB device```

@flozz
Copy link
Owner

flozz commented Nov 24, 2021

@mewtlu The powering issue may have corrupted the internal memory? Can you try to plug the mouse on a Windows machine with the SSE3 to try to reset everything / update the firmware?

@flozz
Copy link
Owner

flozz commented Nov 24, 2021

I just pushed the property implemented readback feature for the Wireless mode and added tests. The only missing features are the ones related to power management (sleep timer, etc.). I will try to implement this before merging on master

@mewtlu
Copy link

mewtlu commented Nov 24, 2021

It seems SSE doesn't have any way of forcing a firmware update and it will only prompt if it notes the firmware version is out of date, any idea whether we might be able to decrease the version number on the device to try trigger the update prompt?

@flozz
Copy link
Owner

flozz commented Nov 24, 2021

No I have no idea :(

@vith
Copy link

vith commented Nov 24, 2021

@mewtlu I found these instructions for resetting a different SteelSeries mouse. Maybe something similar will work for the Aerox 3 Wireless?

  1. Unplug your mouse.
  2. Hold down the left, right, and CPI (the button directly under the mouse wheel) buttons together
  3. Plug your mouse back in. Continue holding buttons for 5 seconds until the LEDs on the mouse blink.

https://www.reddit.com/r/steelseries/comments/cbvsa5/reset_steelseries_mouses_internal_flash_memory/

@mewtlu
Copy link

mewtlu commented Nov 24, 2021

Thanks vith, I saw that too but unfortunately it doesn't appear to do anything for my Aerox as far as I can tell. And no worries flozz, I'll try having a play with Wireshark on SSE later and see if I can work out where the firmware version check is being done and whether I might be able to update it or trick SSE into thinking it's something else.

@flozz
Copy link
Owner

flozz commented Dec 1, 2021

I merged the branch to master.

I do not implemented the "power saving" features yet, I will work on this later.

Published in v4.4.0

@bitnimble
Copy link

I have a 2022 version of the Aerox 3 Wireless, and the battery level doesn't seem to be correct when in wireless mode (--battery-level reports -5%). Possible that the HID command or battery level logic has changed?

I didn't debug it, but a response of 0x00 would result in a decimal -5 output: https://github.com/flozz/rivalcfg/blob/master/rivalcfg/devices/aerox3_wireless_wired.py#L138

so perhaps the id / command has changed?

@fluffynuts
Copy link

it's quite likely that it's changed - afaik the newer revision is practically a new piece of hardware, sharing a name only

@finnjames
Copy link

To correct the lack of on-device memory for LED colors, I put together a daemon that runs a shell script upon recognizing the Aerox 3 Wireless. It appears to work upon both plugging in the 2.4GHz receiver and when powering on the mouse. Unfortunately, setting it up is a bit involved and it uses systemd so it's currently macOS only, but check out this gist if you had this issue and want to see my solution.

@flozz
Copy link
Owner

flozz commented Aug 17, 2022

The support of this mouse has been improved in Rivalcfg v4.6.0: sleep and dim timers are now configurable.

@adamdev-id
Copy link

WOAH THANK YOU GUYS

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants