-
Notifications
You must be signed in to change notification settings - Fork 35
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
Redragon M686 Support #29
Comments
Please run For this later stage any information about the mouse would be helpful, e.g. a list of buttons, the DPI range, screenshots of the official software if possible. |
Its a wireless/wired mouse, specifically the compx wireless receiver and compx dual mode mouse. |
Thanks, i have added an experimental backend for the M686 in 8066172. You could try to build from the master branch and then run I am guessing that the M686 uses the same protocol as the M913, therefore i copied the backend for the M686 from the M913. However this protocol is not yet fully implemented and some features (DPI, button mapping) will need modification for the M686. |
As im still somewhat new to linux, i will run into issues that may seem obvious when it comes to fixes, but i just ran into the error of libusb-1.0 was not found in the pkg-config search path and libusb.h does not exist when running the make command.
|
It seems like you haven't installed libusb, on many distros you will need a *-dev package. I might be able to help you further if you tell me the distro you are using. |
i am using the latest version of Linux Mint Cinnamon. |
It seems like Mint doesn't provide libusb in the repos: http://packages.linuxmint.com/search.php?release=any§ion=any&keyword=libusb You could search for a libusb deb package or build it yourself: https://libusb.info/ Edit: I also found this: https://community.linuxmint.com/software/view/libusb-1.0-0-dev |
the software link worked, this is what i got when running |
Try rebooting to load the udev rule or run as root: |
sudo worked and it identified it as the correct model. |
Could you post the output and tell me what features where handled correctly? |
|
That is not exactly what i had expected, try the same with |
ah apologies, here you go.
|
Sadly that attempt at learning more about the mouse failed completely. This means you would have to capture the usb communication with the official software, at least while opening the software and while applying the default settings. These tutorials might be helpful:
|
if theres anything you can do to get me started with looking at the traffic, that would be great, and would screenshots of what the default profile is help out in any way either? |
You are looking for traffic on the wrong interface, load the usbmon kernel module (
Absolutely yes, especially of the available buttons, LED effects and DPI. |
do you have anything besides this so we can communicate easier like discord? if you do my user is Max Harwell#2648 |
Sorry i don't have discord, however you could write me an email at |
i set the display filter to |
Sorry for replying late, that is exactly right. You should see new packets appearing when you move the mouse or press apply in the software. |
i have saved the packets as a pcapng, but i am unable to read the file now or upload it anywhere, how would i go about changing that? |
Even opening in wireshark fails? In that case the problem could be that the saved file is owned by the root user (if you ran wireshark as root), in that case change the ownership with If the problem lies elsewhere exporting the packets as json would be an option as well. |
https://drive.google.com/file/d/1RGlI2zqhuJy8U17CbhaDOU44wtUrptdR/view?usp=sharing heres the packets, sent through drive due to github not supporting the file format. |
if you need screenshots of the device software for features i can send them soon. |
Sorry for replying so late, unfortunately i can't seem to access the google drive link you shared.
That would be great |
https://www.dropbox.com/s/z4ypc9zdt37f8r2/m686_test.pcapng?dl=0 here it is on dropbox, ill get screenshots of stuff in a moment. |
the dropbox link should be working now if you didnt get it before the link died, please let me know of any updates. |
Yes the droppbox link worked. As i am currently quite busy with work i can't promise you when exactly, but i will keep you updated as soon as possible. |
Its been about a month, any updates? |
I'm sorry for not keeping you updated, the current situation is as follows: The M686 seems to be similar to the M913 (same vendor id, similar captured data). In commit 8066172 i added an experimantal backend for the M686 by copying the existing one from the M913. Sadly i don't fully understand the protocol of these mice and am encountering a lot of weird stuff (on the M913 at least), which further slows down the progress. My current approach is to work on the protocol primarily by examining the M913 as i have access to one, then implement the features for both mice, testing and maybe modifying would still be required for the M686. |
i will try to look into messing with the 913 settings and seeing how well it works with the 686, this will take some time to figure out as i'm not the most knowledgeable on Linux, as I usually follow instructions and google stuff about issues i run into a lot. so please bear with me. |
Hello, I just grabbed one of these mice, plugged it in, installed this software, and followed this thread to here.
When I used the M913 config, everything was wacky. I used the output of
After that I tried messing around with the buttons to see which is which:
That didn't change any of those buttons. I figured I'm probably giving the keys incorrect values. I also tried plugging it in. This is the output of
Here's the output of
I'd like to be able to map the three buttons at least for |
Quick update: I fired up a windows VM and installed the software so I could set the side buttons. I then ran
Note* So I have inferred that:
Output of
|
@maxtimbo Thanks, i have updated the button names and added a config file example for the M686 to mostly match your description. The difference is that the buttons are identified by their name, not by their number. Regarding your first comment, there are still a few open issues:
|
hmm. well, i'd like macro/key press support. Can I get you one of these mice to hasten the support for m686 mice? |
I appreciate the offer, but would like to currently decline for two reasons:
I have had another look at implementing support for keyboard keys, and now have a decent understanding of this part of the protocol (https://github.com/dokutan/mouse_m908/blob/master/documentation/m913-key-press.txt). The biggest problem is that some form of checksum gets used which is extremely annoying. |
How do I do that? Is that the wireshark bit you mentioned earlier? Is there an easier way to get (i assume are) hex dumps? And then, what'll you want me to do? Program some macros and key presses, and just get the data being sent to the mouse? |
The idea is to use wireshark to capture the data sent by the official software (or this software for debugging) for different values, then compare the data. I found it useful to export the packets as json, then run
on the exported json to obtain a format that is suitable for The best thing woud be if you could find out how the checksum in the key press part of the protocol works. |
Where can I dump all this data? I went through and captured every alphabet letter as well as all possible modifier combinations. You can only have modifiers assigned at a time per button. I noticed that some combinations send two or three packets per key. I have all the json files trimmed using that bask script. There are 15 files in total. I could just copy-pasta all these since it's typically the first 7 packets that do stuff. Also, software doesn't allow you to not have a left click assigned. Here are my notes while I was doing all this:
Changing only button 6 as follows:
You cannot set more than two modifiers. |
Thanks, that sounds promising.
I think the easiest option would be for you to put everything in in a directory under |
Done. Also, I'm far more versed in python than I am in C++, but I have written C++ in the past (for an entry college course a few years back). That being said, I was looking at the bit that writes the config file to the mouse, I believe it's rd_mouse.cpp. I was thinking about the behavior when a wireless mouse is plugged in with both USB and the wireless dongle how it's very slow and sometimes returns erroneous data. So around line 93, you get the vid and pid of the device. However, when it's plugged in, those would both return two values, correct? (If both wired and wireless interfaces are present.) Continuing to read the rd_mouse.h file, it looks like the mouse must first be detached from the kernal driver before you can get/set values. So if there are two sets of vid/pid, why not detach both, write to one, and then reattach both? I might be way off base here, so apologies if this only confuses things. |
What i am doing is iterating over all usb devices, for each device iterate over all mice and check if their vid and pid match. Getting the vid/pid ( e.g.
There is no need to detach both, only the driver for the actually used one needs to be detached. The best way to prefer the wired over the wireless connection i currenty see is to remove or skip the wireless pid if the other one is present. Better suggestions or implementations are definitely welcome. |
@dokutan Superb. I tried a handful of a-z as well as some other keys such as F1, slash, etc. All seem to be working. "Ro" didn't do anything (I was curious to see what it generated, It's likely that I don't have the font/language to handle that). Also worth noting, when I How can I help further with modifiers? |
I haven't looked into reading the keyboard keys, but plan to do that after the modifiers are working.
Basically the same as with individual keys, capture data and use it to figure out how the protocol works. Here is what i already know:
|
i have no idea how useful i can be here, but i've also got an m686 i'm willing to help use to improve the project! |
minor note, for me at least, the forwards/backwards buttons seem to not be working? |
a few things i've noticed in XEV:
middle button
back button
|
nvm - for some reason this was what they were configured to out of the box. put it on a windows machine, and both forwards and backwards now simply show up as |
I am using a M686 Vampire Elite mouse and I am inquiring about possible support for this mouse and am willing to help contribute, I play Roblox daily and do general web browsing, so this mouse sees frequent use on my part.
The text was updated successfully, but these errors were encountered: