-
Notifications
You must be signed in to change notification settings - Fork 13
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
Asus Spatha X support #50
Comments
Can you show output of |
My distro doesn't seem to have that binary. |
You may need to build libratbag then. You don't have to install it, you can run it from the source tree. ratbag-command doesn't require ratbagd daemon running. |
Its horribly broken for writing quite a few things to the mouse. |
|
I do have keyboard keys set to the extra buttons that say |
The 1050dpi profiles on the mouse are my own and the other 2 are factory. |
What action did you bind to your DPI button on your first profile? It's parsed as "e3". Looks like the driver was able to read only 8 buttons. Maybe another extra command is needed to read other buttons. Windows VM with ROG Armoury and USB debugger could help to figure this out.
This bug needs more testing. I'll suggest you to stop and disable ratbagd and play around with ratbag-command (with "-vvv" option for capturing the packets), try to change the color of leds, DPI. |
I think the "not working and its massively buggy" issue is an old version of ratbagd, it seems to work better/normally now as I think the running binary was old (I installed from Debian testing source packages over stable packages). I do have a windows PC which I've set the mouse up with but I'd rather move to Linux everywhere so I'd like to support this further. |
Does it work on Linux? I tried to bind it too, but it doesn't work for me.
It's not a problem. You can debug on bare-metal Windows installation or in the VM. Just run the busdog (https://github.com/djpnewton/busdog) alongside with Armoury, try to change some mouse settings and post the busdog logs here so I can implement the missing features. |
set power indicator on dock |
Thanks. I also need the packets when the Armoury reads all profiles on startup. So you will need to restart the Armoury. |
Done |
Wierd. I still don't see the packets with button bindings. Maybe they will appear when you switch to the buttons tab or switch the profile. I'm looking for the request+response like this one:
The packets should start with "12 05". I hope to see some extra packets with extra buttons next to them. |
I tried starting armoury again but I don't see those, I've switched to another profile which does make armoury wait and it seems to list out the key mappings again. |
I've also killed a few asus services and started armoury up again, still the same, no 12 05 packets. |
I'm not 100% but this seems to be it reading the buttons out of the mouse. |
might be completely unrelated but I've exported a profile from armoury which was base64'd and then URL encoded.
|
No. This is firmware version, it's parsed as:
The only packets that I see is "12 07" which just reads the battery settings, like timeout and alert levels. |
ah ok, I'm not sure how to trigger those as the UI starts off on buttons. I can try a bit more tomorrow. |
I don't think armoury actually reads the state of the mouse, based on some of the wording in the app, I think its loosely synced between the two. For giggles I checked
|
I tried the current version of the Armoury and had the same problems. I don't see those packets anymore and I can't downgrade the Armoury. I will try the other USB debuggers. |
I have tried other debuggers. It looks like the Armoury has changed and become worse. It doesn't reads the mouse settings. It does writes the settings and hopes that they are not altered on other PC. So the current ratbag implementation is even better than Armoury. I've still got the button codes and can implement button rebinding.
This doesn't looks like the action codes, 1c is KEY_Y. |
|
I'm trying a few other HID codes out but without some doco or reaching into ratbag-python, I can't really spray this device enough to know what other codes are available. |
I have implemented extra button binding in the separate tree of my repo - https://github.com/kyokenn/libratbag/tree/spathax
Do you prefer ratbag-python? I can push my WIP ASUS driver for it. |
I don't prefer it but I was going to use it to debug the config settings. |
I'll offer a PR to merge in upstream's master and also fix the device file. It seems to me that libratbag wants to move to ratbag-python as the project is concerned about maintainability of a C codebase so it is probably a good idea to port over the driver to that. I was thinking about doing that to dip my toes into the codebase. |
I have pushed ratbag-python fork with ASUS driver - https://github.com/kyokenn/ratbag-python/tree/asusv1 |
It could take a long time before ratbag-python replaces libratbag, because it will need all those drivers to be ported. |
Yeah, I was going to do that because I have the Python knowledge and a bit of C from messing with Cython as a bit of fun. My PR is here kyokenn/libratbag/pull/1 |
I can do the PR up to libratbag if you'd like if you're happy with that PR |
1977 is the wired mode USB PID. |
It doesn't reads them, they always will appear as UNKNOWN. But it should possible be to rebind them. I think Piper will display the new action if you bind the button until you restart ratbagd. |
Seems to work. |
is there any way to configure my Spatha X properly in piper or some other gui application? Attempting to use piper makes it impossibe to view the side button configuration, there's no mouse image (left with a 404 image), and trying to set a button to anything other than a mouse button causes it to fail to commit. Trying to apply any LED colors simply doesn't work, either. |
Someone needs to draw an image.
Which ratbag implementation are you using? libratbag or ratbag-python? I also would need a logs to figure out the problem. |
I've had a good read of #1 but I've noticed the Spatha X has 4 hidraw devices on my Debian stable (5.10.0-19-amd64 #1 SMP Debian 5.10.149-2 (2022-10-21) x86_64 GNU/Linux) machine:
I've able to get ratbagd 0.17 to recognise the mouse with a custom device file but it turns off all the LEDs and sets the DPI to the highest value when the mouse is plugged in (sometimes the LEDs for a very brief moment stay as what is set in the mouse then they turn off). The device file is as follows:
I'm happy to assist with testing new builds of this project or of ratbagd/ratbagctl to get this device supported. I can take source code to compile and test and provide the results. Taking USB packet captures might be a little difficult but I'm sure I can hook up a VM in my linux host to get the armoury crate captures from.
The text was updated successfully, but these errors were encountered: