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

Reverse engeneering USB protocol (Redragon M711). #2

Open
rolimans opened this issue Jun 11, 2020 · 86 comments
Open

Reverse engeneering USB protocol (Redragon M711). #2

rolimans opened this issue Jun 11, 2020 · 86 comments
Labels
enhancement New feature or request question Further information is requested

Comments

@rolimans
Copy link

rolimans commented Jun 11, 2020

Hello, I'd like to the same you did, but with the model M711.
This is my first attempt reverse engineering something, so I'm having a hard time starting it.
After setting up the VM and Wireshark, I was able to capture some packets after changing values in the original software, but all packages were very small (average of 80 bytes) and were nothing like the dump found in your file "documentation/default-annotated".
Am I doing something wrong, or are the packages meant to be this size, and if so, how should I concat them to a better understending of the protocol.

Edit: just saw the README.md inside the documentation folder and it was very clarifying.

@dokutan
Copy link
Owner

dokutan commented Jun 11, 2020

I'm glad that the README helped, if you have any other questions feel free to ask.

I would recommend starting by capturing the data and writing a simple program to open the mouse, send the captured data, and close the mouse. After that works, the main work is capturing data for different settings, running diff on the captures and changing the correct values in the data.

Would you prefer to add support for the M711 to this program, or to have a separate program?
I am open to any pull requests, and if you want to add support to this program i would look in to the required changes to support multiple mice.

@dokutan dokutan added enhancement New feature or request question Further information is requested labels Jun 11, 2020
@dokutan
Copy link
Owner

dokutan commented Jul 31, 2020

I have added experimental support for the M711, there are still a few features missing because i don't have any captured data for them, and nothing is tested. I am leaving this issue open for now, in case you want to try it out and report what is broken and what works.

@rolimans
Copy link
Author

I'm sorry for taking so long to answer, I've made quite a nice progress, and I'd be willing add support for the M711 to your program, or to have a separate program. It really depends a lot on what is best. I will checkout the support you have added and comment and collaborate with it. The only problem is that I am very busy nowadays because of work and college, so for now there is not much I can do. But in the future be assured to hear back from me.

@dokutan
Copy link
Owner

dokutan commented Jul 31, 2020

As there already is initial support for the M711 (and others) in this program, i think it is the best (and easiest) to have support for these mice in one program, and would be glad about any contribution and collaboration towards better hardware support. Feel free to take your time, and whenever you are ready, open a pull request.
Furthermore if you have any initial code or captured data, feel free to share it, maybe i can use it to implement the missing features if you currently lack the time to do so.

@nwildner
Copy link

nwildner commented Feb 8, 2021

Hey @dokutan I bought a Mouse Cobra M711. Is there any data capture/commands that i could run to help on improving this device support?

lsusb, grepping relevant id:

Bus 003 Device 005: ID 04d9:fc30 Holtek Semiconductor, Inc.

dmesg, cropping relevant usb mouse stuff:

dmesg | grep -i mouse

[    3.317097] usb 3-2.4: Product: USB Gaming Mouse
[    3.330125] input: USB Gaming Mouse as /devices/pci0000:00/0000:00:1b.4/0000:04:00.0/0000:05:01.0/0000:07:00.0/0000:08:02.0/0000:09:00.0/usb3/3-2/3-2.4/3-2.4:1.0/0003:04D9:FC30.0003/input/input13
[    3.330183] hid-generic 0003:04D9:FC30.0003: input,hidraw2: USB HID v1.10 Mouse [USB Gaming Mouse] on usb-0000:09:00.0-2.4/input0
[    3.332778] input: USB Gaming Mouse as /devices/pci0000:00/0000:00:1b.4/0000:04:00.0/0000:05:01.0/0000:07:00.0/0000:08:02.0/0000:09:00.0/usb3/3-2/3-2.4/3-2.4:1.1/0003:04D9:FC30.0004/input/input14
[    3.384792] hid-generic 0003:04D9:FC30.0004: input,hidraw3: USB HID v1.10 Keyboard [USB Gaming Mouse] on usb-0000:09:00.0-2.4/input1
[    3.390123] input: USB Gaming Mouse Consumer Control as /devices/pci0000:00/0000:00:1b.4/0000:04:00.0/0000:05:01.0/0000:07:00.0/0000:08:02.0/0000:09:00.0/usb3/3-2/3-2.4/3-2.4:1.2/0003:04D9:FC30.0005/input/input15
[    3.441753] input: USB Gaming Mouse as /devices/pci0000:00/0000:00:1b.4/0000:04:00.0/0000:05:01.0/0000:07:00.0/0000:08:02.0/0000:09:00.0/usb3/3-2/3-2.4/3-2.4:1.2/0003:04D9:FC30.0005/input/input16
[    3.441825] hid-generic 0003:04D9:FC30.0005: input,hiddev97,hidraw4: USB HID v1.10 Device [USB Gaming Mouse] on usb-0000:09:00.0-2.4/input2

@dokutan
Copy link
Owner

dokutan commented Feb 8, 2021

Yes, these are the things that you can try:

  1. To get a first impression about the capabilities of the mouse, run mouse_m908 -R - and mouse_m908 -D -
  2. Test the features that are already implemented (see the list in the README), for features that don't work or are not implemented for thew M711 try the generic backend with the -M generic option. I strongly recommend that you have the official software available (in a VM) because there is a small chance that changing the settings could make the mouse unusable (e.g. no movement in one direction).
  3. If the previous steps were not sufficient to implement all features, you can capture the USB data sent by the official software with wireshark.

A few links that i copied from a previous issue about the capturing process:
https://bytepunk.wordpress.com/2017/03/25/reverse-engineering-a-usb-mouse/
https://github.com/pez2001/razer_chroma_drivers/wiki/Reverse-Engineering-USB-Protocol
https://github.com/dokutan/rgb_keyboard/tree/master/doc

That should be all, just ask if there are any questions remaining.

@rolimans
Copy link
Author

rolimans commented Feb 8, 2021

I've had some progress, but had to leave this project on hold for a while because of work and univertsity. A lot of settings from the m908 work right away with the m711 (same config bytes). I have some notes from when I was reverse engineering it myself, but I can barely understand them, so it probably won't be of much help.

@dokutan
Copy link
Owner

dokutan commented Feb 8, 2021

No problem, that a lot of settings work gives me hope that it shouldn't be to dificult to implement the differing features (mainly different buttons i would assume), if you could post your notes i would have a look, we don't know if they are helpful unless i try.

@rolimans
Copy link
Author

rolimans commented Feb 8, 2021

dpi_enable  ok
dpi ok
lighmode ok

report rate ok
brighness ok
color ok


change dpi?
scroll speed?

speed:

    breathing,rainbow:
        low 08
        med 05
        high 02
    flashing:
        low 08
        med 05
        high 01
    alternating,reactive:
        default 8
    static,off:
        default 0

int mouse_m908::read_settings(){ // Why?

check windows only and clicks in macros

These are the notes, they are confusing as I said.
The numbers aside the rgb modes are the needed bytes to be sent for each mode (if I'm not mistaken). I just cant remember the position of those bytes.

@rolimans
Copy link
Author

rolimans commented Feb 8, 2021

Checking the diffs I can see a big addition in data.cpp. I can't remember if I did those but it seems so.
The code follows:

std::map<std::string, uint8_t> mouse_m908::_c_windows_only_actions = {
	{"basic_cut", 0x11},
	{"basic_copy", 0x12},
	{"basic_paste", 0x13},
	{"basic_select_all", 0x14},
	{"basic_find", 0x15},
	{"basic_new", 0x16},
	{"basic_print", 0x17},
	{"basic_save", 0x18},
	{"advanced_switch_window", 0x19},
	{"advanced_close_window", 0x1a},
	{"advanced_open_explorer", 0x1b},
	{"advanced_run", 0x1c},
	{"advanced_show_desktop", 0x1d},
	{"advanced_lock_pcme", 0x1e},
	{"advanced_browser_home", 0x1f},
	{"advanced_browser_backward", 0x20},
	{"advanced_browser_forward", 0x21},
	{"advanced_browser_stop", 0x22},
	{"advanced_browser_refresh", 0x23},
	{"advanced_browser_search", 0x24},
	{"advanced_browser_favorite", 0x25},
	{"advanced_mail", 0x26}};

@dokutan
Copy link
Owner

dokutan commented Feb 8, 2021

Thanks, that was quite helpful. A bit of information for reference: the LED modes seem to be identical, i have since added a description of the byte values, the position can be found in the source or the annotated capture. The windows only actions aren't handled by windows but rely on the official software to be running in the background, therefore i wouldn't bother implementing them (unless someone wants them).

If i understand it correctly, most settings did work, however in the recent versions of the M711 backend changing the scrollspeed, DPI, button mapping and USB poll/report rate were disabled due to a lack of information. I have enabled the generic implementation of all settings in the M711 backend in 40f42ad, if you @rolimans or @nwildner were to confirm that changing (some of) these settings works now, i would update the documentation accordingly.

@nwildner
Copy link

nwildner commented Feb 9, 2021

Ok. Maybe i'm stupid(and if i'm being, dont be afraid to tell me..lol) but i've tried to change simple things on my config file to test led colors, and setting them for each profile. Example:

[profile1]

# LED settings
color=ff0000
brightness=2
speed=0
lightmode=on
report_rate=500
--snip--

[profile2]

# LED settings
color=00ff00
brightness=2
speed=2
#lightmode=wave
lightmode=on
report_rate=500

So, profile 1 is red, while profile 2 is blue(should be green). Both profiles change the led color to white 5 seconds right after i execute something like sudo mouse_m908 -c mouse.ini -p 1

@dokutan
Copy link
Owner

dokutan commented Feb 9, 2021

That means that sending the settings to the mouse works (white is the default value for this software) but there is a bug in the preparation of the data packet (the offsets for the color, brightness and LED speed were wrong), that should be fixed in 040c401.

PS @nwildner: I just noticed your fork with the PKBUILD is gone (i am using Arch myself and was therefore interested), are there any problems?

@nwildner
Copy link

That means that sending the settings to the mouse works (white is the default value for this software) but there is a bug in the preparation of the data packet (the offsets for the color, brightness and LED speed were wrong), that should be fixed in 040c401.

PS @nwildner: I just noticed your fork with the PKBUILD is gone (i am using Arch myself and was therefore interested), are there any problems?

I'll be ready to do extensive testing after thursday, then i'll finish that pkgbuild :)

@zoeleu
Copy link

zoeleu commented May 31, 2021

I have an M711 and here if you want testing or help. Let me know what to do!

@zoeleu
Copy link

zoeleu commented May 31, 2021

# Macros

;## macro8
;# unknown, please report as bug: ff ff 0

@zoeleu
Copy link

zoeleu commented May 31, 2021

What are these hex values? They are 100% not my DPI.

# DPI settings
# Active dpi level for this profile: 1
dpi1_enable=1
dpi1=0x0b00
dpi2_enable=1
dpi2=0x1600
dpi3_enable=1
dpi3=0x1400
dpi4_enable=1
dpi4=0x4500
dpi5_enable=1
dpi5=0x7300

@dokutan
Copy link
Owner

dokutan commented May 31, 2021

There are four main aspects that need varying levels of effort. For the most part it boils down to trying various settings and checking if the results match as a big part of the model specific code has already been written. From my experience i can strongly recommend that you have the official software and a second input device available before trying to change the settings on the mouse (see https://github.com/dokutan/mouse_m908#safety).

  • I currently do not know if the LED related settings (lightmode, brightness, color, speed) can be read and changed correctly. To confirm this check if the output of mouse_m908 -R - is correct and try changing these settings to a few different values.
  • The same is true for the button mapping, however due to the differences between the mice there are three types of failure that could occur:
    • The number of buttons assumed by this software is wrong
    • The buttons are swapped, e.g. button_left is interpreted as button_right
    • The buttons are labeled incorrectly
  • To check the macros use the same procedure. Please note that some mice have less than 15 macros available. Edit: the unkown ff ff 0 could simply mean that these bytes are for some reason stored as a macro. As long as changing and then reading macro8 works i see no real problem.
  • To address the DPI values, the hex values you see is part of the raw bytecode sent by/to the mouse and map to actual human-readable DPI values. Unfortunately these mappings vary between mice and follow no known pattern that is reasonably usable, therefore to be able to use the actual DPI values you would need to use the official software to set each of the available values, then look at the output from mouse_m908 for the matching hex values. Given that information it is relatively trivial to fix this issue.

If anything doesn't work as it should, please attach the config that you used and the output of mouse_m908 -R - and mouse_m908 -D -. Telling me that something works is equally valuable because i can then update the README.md.

@zoeleu
Copy link

zoeleu commented Jun 1, 2021

Found a pattern (I think?)
2021-06-01_14-35_1
2021-06-01_14-35

@zoeleu
Copy link

zoeleu commented Jun 1, 2021

isn't it weird that 100dpi = 0x0200? 200dpi = 0x400?

@dokutan
Copy link
Owner

dokutan commented Jun 1, 2021

Found a pattern (I think?)

Yes, these values follow a basic pattern (here are the values from the M908, and for the M719):

  • if the DPI value is increased by 100 the first byte gets increased by 2 or 3
  • at some point for larger DPI, the step size between valid values changes from 100 to 200 and the second byte gets changed from 0 to 1 (the whole DPI value could be seen as a little-endian word, but this change doesn't happen at 0xff 0x00)

However, because the difference between adjacent values varies and the point at which the step size changes is different for each mouse i don't see a way around trying out at least the majority of DPI values. Additionally the minimum and maximum DPI (and therefore the amount of valid values) vary between mice.

isn't it weird that 100dpi = 0x0200? 200dpi = 0x400?

I personally wouldn't interpret these values as anything but arbitrary keys for a map, therefore no.

Edit: i have added initial support for actual DPI values (100-500) in 74d64a2.

@LeonardHM
Copy link

I didn't figure out how to use it, now my mouse doesn't move vertically. Would you help me?

@dokutan
Copy link
Owner

dokutan commented Sep 15, 2021

@LeonardHM I suggest you try out the official software to fix your mouse. To debug this program it would be helpful if you could provide the config you used, the output of mouse_m908 -R - and mouse_m908 -D -, the version (which release or did you build from the master branch?) and if all profiles and DPI levels are affected.

@LeonardHM
Copy link

I installed libusb, cloned the repository and installed it. I only use command line. I just used the commands from the repository page with some template overrides (examples/example_m711.ini -M 711). I probably did something wrong

$ mouse_m908 -R -

Model: 711

Configuration created with mouse_m908 -R.

This configuration can be send to the mouse with mouse_m908 -c.

This feature is currently untested, please report your results.

Note: reading the scrollspeed is not supported by the mouse.

Currently active profile: 1

[profile1]

LED settings

color=50ff00
brightness=2
speed=2
lightmode=static
report_rate=500

DPI settings

Active dpi level for this profile: 2

dpi1_enable=0
dpi1=200
dpi2_enable=1
dpi2=0x1600
dpi3_enable=1
dpi3=0x2d00
dpi4_enable=1
dpi4=0x4300
dpi5_enable=0
dpi5=0x8c00

Button mapping is not implemented due to a lack of captured data

[profile2]

LED settings

color=5000ff
brightness=3
speed=4
lightmode=breathing
report_rate=125

DPI settings

Active dpi level for this profile: 5

dpi1_enable=1
dpi1=200
dpi2_enable=1
dpi2=0x1600
dpi3_enable=1
dpi3=0x2d00
dpi4_enable=1
dpi4=0x4300
dpi5_enable=1
dpi5=0x8c00

Button mapping is not implemented due to a lack of captured data

[profile3]

LED settings

color=ffffff
brightness=3
speed=2
lightmode=static
report_rate=125

DPI settings

Active dpi level for this profile: 2

dpi1_enable=1
dpi1=200
dpi2_enable=1
dpi2=0x1600
dpi3_enable=1
dpi3=0x2d00
dpi4_enable=1
dpi4=0x4300
dpi5_enable=1
dpi5=0x8c00

Button mapping is not implemented due to a lack of captured data

[profile4]

LED settings

color=ffffff
brightness=3
speed=2
lightmode=static
report_rate=125

DPI settings

Active dpi level for this profile: 1

dpi1_enable=1
dpi1=200
dpi2_enable=1
dpi2=0x1600
dpi3_enable=1
dpi3=0x2d00
dpi4_enable=1
dpi4=0x4300
dpi5_enable=1
dpi5=0x8c00

Button mapping is not implemented due to a lack of captured data

[profile5]

LED settings

color=ffffff
brightness=3
speed=2
lightmode=static
report_rate=125

DPI settings

Active dpi level for this profile: 5

dpi1_enable=1
dpi1=200
dpi2_enable=1
dpi2=0x1600
dpi3_enable=1
dpi3=0x2d00
dpi4_enable=1
dpi4=0x4300
dpi5_enable=1
dpi5=0x8c00

Button mapping is not implemented due to a lack of captured data

Macros

;## macro8
;# unknown, please report as bug: ff ff 0

==================================================

$ mouse_m908 -D -
Part 1:

02 08 2c 60 01 00 fa fa 00

02 08 48 64 07 00 fa fa 50 ff 00 01 01 02 02

02 08 50 64 07 00 fa fa 50 00 ff 01 08 04 03

02 08 58 64 07 00 fa fa ff ff ff 01 08 02 03

02 08 60 64 07 00 fa fa ff ff ff 01 08 02 03

02 08 68 64 07 00 fa fa ff ff ff 01 08 02 03

02 08 32 60 05 00 fa fa 02 00 08 00 08

02 08 38 60 03 00 fa fa 08 00 08

Part 2:

03 08 42 60 20 00 fa fa 01 00 00 04 00 00 00 00 01 16 00 00 00 00 01 2d 00 00 00 00 01 43 00 00 00 00 00 8c 00 00 00 00

03 08 02 61 20 00 fa fa 04 00 01 04 00 00 00 00 01 16 00 00 00 00 01 2d 00 00 00 00 01 43 00 00 00 00 01 8c 00 00 00 00

03 08 b2 61 20 00 fa fa 01 00 01 04 00 00 00 00 01 16 00 00 00 00 01 2d 00 00 00 00 01 43 00 00 00 00 01 8c 00 00 00 00

03 08 62 62 20 00 fa fa 00 00 01 04 00 00 00 00 01 16 00 00 00 00 01 2d 00 00 00 00 01 43 00 00 00 00 01 8c 00 00 00 00

03 08 12 63 20 00 fa fa 04 00 01 04 00 00 00 00 01 16 00 00 00 00 01 2d 00 00 00 00 01 43 00 00 00 00 01 8c 00 00 00 00

03 08 78 64 32 00 fa fa 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

03 08 aa 64 32 00 fa fa 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

03 08 dc 64 32 00 fa fa 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

03 08 0e 65 32 00 fa fa 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

03 08 40 65 32 00 fa fa 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

03 08 72 65 32 00 fa fa 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

03 08 a4 65 32 00 fa fa 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

03 08 d6 65 32 00 fa fa 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

03 08 08 66 32 00 fa fa 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

03 08 3a 66 32 00 fa fa 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

03 08 6c 66 32 00 fa fa 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

03 08 9e 66 32 00 fa fa 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

03 08 d0 66 32 00 fa fa 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

03 08 02 67 32 00 fa fa 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

03 08 34 67 32 00 fa fa 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

03 08 66 67 32 00 fa fa 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

03 08 98 67 32 00 fa fa 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

03 08 ca 67 32 00 fa fa 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

03 08 fc 67 32 00 fa fa 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

03 08 2e 68 32 00 fa fa 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

03 08 60 68 32 00 fa fa 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

03 08 92 68 32 00 fa fa 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

03 08 c4 68 32 00 fa fa 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

03 08 f6 68 32 00 fa fa 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

03 08 28 69 32 00 fa fa 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

03 08 5a 69 32 00 fa fa 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

03 08 8c 69 32 00 fa fa 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

03 08 be 69 32 00 fa fa 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

03 08 f0 69 32 00 fa fa ff ff 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

03 08 22 6a 32 00 fa fa 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

03 08 54 6a 32 00 fa fa 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

03 08 86 6a 32 00 fa fa 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

03 08 b8 6a 32 00 fa fa 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

03 08 ea 6a 32 00 fa fa 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

03 08 1c 6b 32 00 fa fa 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

03 08 4e 6b 32 00 fa fa 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

03 08 80 6b 32 00 fa fa 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

03 08 b2 6b 32 00 fa fa 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

03 08 e4 6b 32 00 fa fa 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

03 08 16 6c 32 00 fa fa 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

03 08 48 6c 32 00 fa fa 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

03 08 7a 6c 32 00 fa fa 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

03 08 ac 6c 32 00 fa fa 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

03 08 de 6c 32 00 fa fa 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

03 08 10 6d 32 00 fa fa 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

03 08 42 6d 32 00 fa fa 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

03 08 74 6d 32 00 fa fa 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

03 08 a6 6d 32 00 fa fa 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

03 08 d8 6d 32 00 fa fa 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

03 08 0a 6e 32 00 fa fa 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

03 08 3c 6e 32 00 fa fa 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

03 08 6e 6e 32 00 fa fa 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

03 08 a0 6e 32 00 fa fa 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

03 08 d2 6e 32 00 fa fa 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

03 08 04 6f 32 00 fa fa 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

03 08 36 6f 32 00 fa fa 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

03 08 68 6f 32 00 fa fa 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

03 08 9a 6f 32 00 fa fa 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

03 08 cc 6f 32 00 fa fa 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

03 08 fe 6f 32 00 fa fa 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

03 08 30 70 32 00 fa fa 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

03 08 62 70 32 00 fa fa 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

03 08 94 70 32 00 fa fa 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

03 08 c6 70 32 00 fa fa 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

03 08 f8 70 32 00 fa fa 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

03 08 2a 71 32 00 fa fa 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

03 08 5c 71 32 00 fa fa 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

03 08 8e 71 32 00 fa fa 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

03 08 c0 71 32 00 fa fa 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

03 08 f2 71 32 00 fa fa 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

03 08 24 72 32 00 fa fa 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

03 08 56 72 32 00 fa fa 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

03 08 88 72 32 00 fa fa 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

03 08 ba 72 32 00 fa fa 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

03 08 ec 72 32 00 fa fa 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

03 08 1e 73 32 00 fa fa 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

03 08 50 73 32 00 fa fa 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

03 08 82 73 32 00 fa fa 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

03 08 b4 73 32 00 fa fa 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

03 08 e6 73 32 00 fa fa 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

Part 3:

02 08 82 60 04 00 fa fa 81 00 00 00

02 08 86 60 04 00 fa fa 82 00 00 00

02 08 8a 60 04 00 fa fa 83 00 00 00

02 08 8e 60 04 00 fa fa 85 00 00 00

02 08 92 60 04 00 fa fa 88 00 00 00

02 08 96 60 04 00 fa fa 8a 00 00 00

02 08 9a 60 04 00 fa fa 85 00 00 00

02 08 9e 60 04 00 fa fa 84 00 00 00

02 08 aa 60 04 00 fa fa 8b 00 00 00

02 08 42 61 04 00 fa fa 81 00 00 00

02 08 46 61 04 00 fa fa 82 00 00 00

02 08 4a 61 04 00 fa fa 83 00 00 00

02 08 4e 61 04 00 fa fa 85 00 00 00

02 08 52 61 04 00 fa fa 88 00 00 00

02 08 56 61 04 00 fa fa 8a 00 00 00

02 08 5a 61 04 00 fa fa 85 00 00 00

02 08 5e 61 04 00 fa fa 84 00 00 00

02 08 6a 61 04 00 fa fa 8b 00 00 00

02 08 f2 61 04 00 fa fa 81 00 00 00

02 08 f6 61 04 00 fa fa 82 00 00 00

02 08 fa 61 04 00 fa fa 83 00 00 00

02 08 fe 61 04 00 fa fa 85 00 00 00

02 08 02 62 04 00 fa fa 88 00 00 00

02 08 06 62 04 00 fa fa 8a 00 00 00

02 08 0a 62 04 00 fa fa 85 00 00 00

02 08 0e 62 04 00 fa fa 84 00 00 00

02 08 1a 62 04 00 fa fa 8b 00 00 00

02 08 a2 62 04 00 fa fa 81 00 00 00

02 08 a6 62 04 00 fa fa 82 00 00 00

02 08 aa 62 04 00 fa fa 83 00 00 00

02 08 ae 62 04 00 fa fa 85 00 00 00

02 08 b2 62 04 00 fa fa 88 00 00 00

02 08 b6 62 04 00 fa fa 8a 00 00 00

02 08 ba 62 04 00 fa fa 90 00 e0 00

02 08 be 62 04 00 fa fa 90 00 e1 00

02 08 ca 62 04 00 fa fa 8b 00 00 00

02 08 52 63 04 00 fa fa 81 00 00 00

02 08 56 63 04 00 fa fa 82 00 00 00

02 08 5a 63 04 00 fa fa 83 00 00 00

02 08 5e 63 04 00 fa fa 85 00 00 00

02 08 62 63 04 00 fa fa 88 00 00 00

02 08 66 63 04 00 fa fa 8a 00 00 00

02 08 6a 63 04 00 fa fa 85 00 00 00

02 08 6e 63 04 00 fa fa 84 00 00 00

02 08 7a 63 04 00 fa fa 8b 00 00 00

@dokutan
Copy link
Owner

dokutan commented Sep 16, 2021

I probably did something wrong

Sorry that i am only replying now, as far as i can tell you did absolutely nothing wrong.

After having a look at the data you provided i see no obvious cause for this issue, i suspect it might be caused by accidentally setting the DPI in the vertical direction to 0.
To implement a proper fix would require capturing the usb communication with the official software when changing the DPI, have a look at this previous comment for details. If that is not possible i might be able to figure something out if you reset the mouse with the official software and then attach the output of running:

mouse_m908 -D -
mouse_m908 -R config.ini
mouse_m908 -c config.ini
mouse_m908 -D -

@LeonardHM
Copy link

I used the two redragon programs for this model and it didn't work. I think the only way is trying to modify your code

@dokutan
Copy link
Owner

dokutan commented Sep 18, 2021

I think the only way is trying to modify your code

That might be true, however there are two problems with that approach:

  1. That even the official software is broken makes it look like a bug in the firmware to me, which could mean that even knowing what exactly to modify would not lead to success.
  2. I don't have a clue which commands to modify without a capture of the data sent by official software.

@spflaumer
Copy link

@dokutan all mouse buttons work as expected now thanks a lot!

@dokutan
Copy link
Owner

dokutan commented Nov 27, 2021

@1nekomata Thanks for the DPI mapping (edit: added in 0da955e). The known values are identical to the M908, if you can tell me the maximum supported DPI i could copy at least some values from the M908.

all mouse buttons work as expected now thanks a lot!

Perfect, that leaves only reading the button mapping from the mouse to be implemented. Could you capture the communication when opening RDCfg for the first time or connecting the mouse with RDCfg running for that?

sadly i haven't found a way to refresh RDCfg on Windows to see what dpi i just applied on linux

If i understand you correctly, you are setting the DPI on linux woth mouse_m908, then get the actual value with RDCfg on wondows. Doing the reverse (setting woth RDCfg, checking with mouse_m908) might be easier.

would mouse_m908 work on Win10?

There is no obvious reason it wouldn't work since all dependencies (libusb, c++ compile, make or cmake) should be available on windows as well.

@spflaumer
Copy link

spflaumer commented Nov 27, 2021

Perfect, that leaves only reading the button mapping from the mouse to be implemented. Could you capture the communication when opening RDCfg for the first time or connecting the mouse with RDCfg running for that?

yes, hang on a sec

Perfect, that leaves only reading the button mapping from the mouse to be implemented. Could you capture the communication when opening RDCfg for the first time or connecting the mouse with RDCfg running for that?

no, i'm actually trying to have RDCfg detect what dpi has been set using mouse_m908 in order to check if those values are actually correct

@spflaumer
Copy link

There is no obvious reason it wouldn't work since all dependencies (libusb, c++ compile, make or cmake) should be available on windows as well.

ok

@spflaumer
Copy link

Also i cant seem to be able to apply
dpi1=0x0d000000
dpi2=0x0f000000
dpi3=0x12000000
dpi4=0x14000000
dpi5=0x16000000
but i can apply
dpi1=0x0d00
dpi2=0x0f00
dpi3=0x1200
dpi4=0x1400
dpi5=0x1600

@spflaumer
Copy link

spflaumer commented Nov 27, 2021

@dokutan
dpi4=0x73000000 = dpi 5000
dpi5=0x73010000 = dpi 10000
(note: dpi 5000 and onwards is only in 200 increments instead of the usual 100)

@dokutan
Copy link
Owner

dokutan commented Nov 27, 2021

Also i cant seem to be able to apply
dpi1=0x0d000000
dpi2=0x0f000000
dpi3=0x12000000
dpi4=0x14000000
dpi5=0x16000000
but i can apply
dpi1=0x0d00
dpi2=0x0f00
dpi3=0x1200
dpi4=0x1400
dpi5=0x1600

What about e.g. X100Y200 ? Also make sure the build you are using is based on the latest commit by running

git clone https://github.com/dokutan/mouse_m908
cd mouse_m908
# or
git pull

make clean
make # or make -j <number of threads>
sudo make install

@spflaumer
Copy link

What about e.g. X100Y200 ?

dunno gonna try now

Also make sure the build you are using is based on the latest commit by running

yes i am

@spflaumer
Copy link

@dokutan
Warning: Unknown DPI value X100Y200

@dokutan
Copy link
Owner

dokutan commented Nov 27, 2021

Warning: Unknown DPI value X100Y200

Thanks, fixed in b843ca9

@spflaumer
Copy link

@dokutan ok, everything seems to be working now

@spflaumer
Copy link

i'm gonna test color, light modes, key mapping and applying dpi

@spflaumer
Copy link

@dokutan here is what works
color:
breathing works
breathing_rainbow works
rainbow works
static works
wave works
alternating works
reactive works
reactive_button works
flashing works
off works
random works

led color works
led brightness level works
brightness works
led animation speed works (1 = fastest 8=slowest)

scrollspeed works

dpi:
dpi1_enable works
dpi2_enable works
dpi3_enable works
dpi4_enable works
dpi5_enable works

dpi1 works
dpi2 works
dpi3 works
dpi4 works
dpi5 works
dpi range 0x0200 - 0x7301 (only M711 cobra; M711-FPS needs testing for 24000 dpi as M711 cobra only goes up to 10k) (X100Y200 works but i can't go higher than X1000Y1000; M711 cobra can't use different dpi on X and Y so it applies value of X always)
report_rate works

key mapping:
button_left works
button_right works
button_middle works
button_backward works
button_forward works
button_dpi_up works
button_dpi_down works
button_lightmode works
scroll_up works
scroll_down works
(note: i didn't test every button as it would take a lot of time)

@spflaumer
Copy link

i think you can change status to "complete"

@dokutan
Copy link
Owner

dokutan commented Nov 29, 2021

i think you can change status to "complete"

Almost, two minor things are still missing for complete support:

  • You mentioned the M711 supports DPI up to 10k which corresponds to 0x7301. In the data i have 0x7301 corresponds to 10200. You can find the mapping table here if it helps:
    std::map< unsigned int, std::array<uint8_t, 2> > mouse_m711::_c_dpi_codes = {
  • Reading the button mapping is not implemented, should be easy to do but i need a capture of RDCfg getting the settings from the mouse by capturing at the initial start of RDCfg or connection of the mouse.

@spflaumer
Copy link

Reading the button mapping is not implemented, should be easy to do but i need a capture of RDCfg getting the settings from the mouse by capturing at the initial start of RDCfg or connection of the mouse.

oh right i forgot to send you the .pcap!

@spflaumer
Copy link

spflaumer commented Nov 29, 2021

@dokutan here is opening RDCfg and applying settings

@spflaumer
Copy link

@dokutan

You mentioned the M711 supports DPI up to 10k

only the M711 Cobra does. the M711-FPS can go up to 24k

@dokutan
Copy link
Owner

dokutan commented Nov 30, 2021

@1nekomata I have added the missing features in ded0775. Feel free to close the issue if everything works. Complete support for the M711-FPS should become a new issue.

@spflaumer
Copy link

@dokutan i can't exactly close it as i didn't open it. @rolimans was the one to open it

@spflaumer
Copy link

@dokutan i'll double check tomorrow but afaik everything works. Thank you!

@spflaumer
Copy link

spflaumer commented Dec 2, 2021

@dokutan sorry for the late reply. i have tested all features that you added in ded0775 and everything seems to be working just fine! i haven't tested macros yet though

@spflaumer
Copy link

@dokutan macros are either not applied or are not captured by mouse_m908 --read / mouse_m908 -R -

@dokutan
Copy link
Owner

dokutan commented Dec 2, 2021

macros are either not applied or are not captured by mouse_m908 --read / mouse_m908 -R -

@1nekomata Could you figure that out by applying multiple macros with mouse_m908 and RDCfg? Some of the are other mice have buggy macros (only the first macro working, macros work but can't be read back, …), the same might be true for the M711.

@spflaumer
Copy link

spflaumer commented Dec 2, 2021

@dokutan ok give me a sec

@spflaumer
Copy link

@dokutan i can't seem to be able to read macros using mouse_m908 -R - . im gonna try to get a .pcap of the macro getting applied

@spflaumer
Copy link

@dokutan here is a .pcap of me applying a macro with every single mouse action possible in RGCfg

@dokutan
Copy link
Owner

dokutan commented Dec 4, 2021

@1nekomata I can only guess the reason but the capture doesn't contain a macro, only the normal settings. Maybe binding the macro to a button is required for RDCfg to transfer it.

Have you tried setting a macro with mouse_m908 before?

@spflaumer
Copy link

@dokutan i did try. but afaik it didn't work as i couldn't confirm the macro worked nor could i read it with mouse_m908. i sadly can't test today anymore but i will try tomorrow

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request question Further information is requested
Projects
None yet
Development

No branches or pull requests

7 participants