You are not logged in.

#1 2016-09-02 10:22:10

Tristann
Member
Registered: 2016-09-02
Posts: 4

ASUS STRIX CLAW - DPI buttons freeze mouse

Well, I bought this wonderful mouse. Fits like a glove, baby!
Now the problem is, the mouse has 3 specific DPI buttons. One button is sniper mode (DPI changed as long as the button is held), and two buttons to switch between profiles. Every time I press one of those buttons the mouse stops responding until I replug it.
Google found someone with the same issue Askubuntu - Strix Claw not working, but I didn't find anything of interest here.
I moved on and went deeper, started monitoring usb packets. All the buttons (I think? Haven't monitored before) behave in a weird way, one button sends 3 empty packets before the packet with it's code, another 4, etc.. Then the DPI buttons only send empty packets and that's it (sometimes 3 sometimes 2). So I think here is a packet missing, but not sure, maybe the mouse executes those dpi changes internally and just sends some ACK to the PC and this does not come through.
Here is a table of the codes from wireshark:
Pastebin

So now some explanation:
0100000000000000 - I consider this an empty packet
0101000000000000 - Mouse 1
0102000000000000 - Mouse 2
0104000000000000 - Mouse 3 (Scroll)
0110000000000000 - Mouse Side 1
0108000000000000 - Mouse Side 2
010000000000ff00 and 0100000000000100 - Scroll wheel
Now the last three packets came from The sniper mode button, and they are empty. See in pastebin.
How can I research further into this problem, maybe come up with a fix, a driver of some sorts? Please note that I don't really know what I'm doing.
Should I monitor the packets on Windows? Set up a VM? If so, how can I pass through a device, because I didn't find anything for this in virtualbox?

I'm freshly registered, I hope that I can give back something to the open source community by researching.

Hf, Tristan

Last edited by Tristann (2016-09-02 10:26:56)

Offline

#2 2016-09-04 13:33:51

Tristann
Member
Registered: 2016-09-02
Posts: 4

Re: ASUS STRIX CLAW - DPI buttons freeze mouse

Well I did what I wanted to do, I set up a VM, got USB passtrough working and now I get some helpful data, but still don't know what to do with them. How can I prevent the mouse from crashing when it's sending this special dpi packet? What I find weird is that the source address changes from 8.3.1 to 8.3.3 for this specific packet (see for yourself). The default linux hid driver is missing this behaviour, it does not know that it'll receive from this address, so that's why it crashes (I think). After some googling I did not find what this last number is supposed to represent. Does this mean there is an internal hub inside the mouse?

The packets are availiable here: Pastebin


I found this right here: USB in a nutshell and I'm going to read it. Maybe this will give me the proper info about the address and maybe help me with the driver later on, if it's really needed (??).


Thanks for all the help, (haha)

Tristan

Last edited by Tristann (2016-09-04 14:06:59)

Offline

#3 2016-09-18 22:01:00

Tristann
Member
Registered: 2016-09-02
Posts: 4

Re: ASUS STRIX CLAW - DPI buttons freeze mouse

So after some weeks of research (keep in mind, using only some of my spare time). I found out a lot of new things that I didn't know.
I got through the initialization part of USB. The mouse has 3 interfaces. Interface 0 (endpoint 1) is the plain ol' mouse (movement + 7 mouse buttons).
Interface 1 (endpoint 2) is reported as a keyboard, and actually it is. It is meant for keyboard macros executed by the mouse. I'm not even interested in this, but after looking at some other mouse drivers (with similar capabilities) this shouldn't be a problem to master quickly.
Now here comes the most fun part, interface No. 2 (endpoint 3) that has 3 buttons (DPI up, DPI down, sniper mode). This interface is reported as a HID device without a subclass. So now my first goal is to get this working, a libusb program that receives this data and makes some use of it. If I change the settings from the windows program the leftover data doesn't change (got me thinking that maybe the DPI number is hidden here). So this communication only looks like this:
Mouse: Hey I'm in sniper mode
PC: Ok
And it does that for all three buttons, the PC doesn't send anything back so everything must happen on the mouse, it just needs an ok from the pc.
Then the next goal will be to write different configs to the mouse, but since I was looking at similar drivers this seems like  a pain in the arse. But looking forward to learn this too. I'll need a lot of data from the mouse internals for this I think, but I hope I can easily get this data from wireshark.
Please correct any of my wrong assumptions if there are any.

You'll hear from me soon with some working links from github. (I hope big_smile)

Tristan

Offline

#4 2016-10-09 00:42:04

Tristann
Member
Registered: 2016-09-02
Posts: 4

Re: ASUS STRIX CLAW - DPI buttons freeze mouse

So after I dropped some code into a cauldron and mixed it well up, I have made me some brew: asus-claw.git.
This is working for me nicely, but I think that those timeouts that are happening when nothing is pressed after some time could be avoided.
I'm looking forward to get this to a finished state in the near future.

Tristan

Offline

Board footer

Powered by FluxBB