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

G203 mouse support - protocol decoded #122

Closed
smasty opened this issue Feb 1, 2018 · 2 comments
Closed

G203 mouse support - protocol decoded #122

smasty opened this issue Feb 1, 2018 · 2 comments

Comments

@smasty
Copy link

smasty commented Feb 1, 2018

With the help of your old Python version of this program and Wireshark, I was able to reverse engineer the protocol used on the G203 prodigy mouse.

I have a working Python code for controlling just the G203 here: https://github.com/smasty/g203-led.
Unfortunately, I don't have enough C/C++ knowledge to provide a Pull Request, but I'm sure it will be easy for you to implement with the protocol information, so here goes:

Device info

  • vendor ID: 0x046d
  • productID: 0xc084

USB Control transfer settings

  • bmRequestType: 0x21
  • bRequest: 0x09
  • wValue: 0x0211
  • wIndex: 1

Protocol

The mouse supports one lighting zone - Logo. Three modes are possible:

  1. Solid color
  2. Color cycle
  3. Breathing

First 5 bytes of the protocol are the same for all three modes. The 6th byte controls the mode.

Solid color

11 ff 0e 3b 00 01 COLOR 00 00 00 00 00 00 00 00 00 00 00
  • COLOR should be a RGB hex value (ff 00 00).

Color cycle

11 ff 0e 3b 00 02 00 00 00 00 00 RATE BRIGHTNESS 00 00 00 00 00 00
  • BRIGHTNESS should be a single byte hex value between 01 and 64 (so 1-100 in decimal). 100 means maximum brightness, 1 means off. Caution: passing 00 means maximum brightness not zero brightness.
  • RATE should be a double byte hex value representing the number of milliseconds the effect should last. There are no given min/max values, but the Logitech Gaming software uses 03 e8 (1000 ms) as minimum and 4e 20 (20 000 ms) as maximum.

Breathing

11 ff 0e 3b 00 03 COLOR RATE 00 BRIGHTNESS 00 00 00 00 00 00 00
  • COLOR, RATE and BRIGHTNESS should be the same as in the other modes
  • Caution: the RATE and BRIGHTNESS parameters appear on different offsets compared to the Color cycle mode.

Enable/disable startup effect

11 ff 0e 5b 00 01 TOGGLE 00 00 00 00 00 00 00 00 00 00 00 00 00
  • TOGGLE should be 01 to enable the effect and 02 to disable it.

Notes

  • Only a single USB Control transfer is needed to update the mouse settings. These settings are then stored in the mouse and persist between reboots, reconnects and multiple PCs.
  • The mouse supports "sleep after inactivity", but it is controled by the Logitech software, not by the chip inside.
@MatMoul
Copy link
Owner

MatMoul commented Feb 5, 2018

Thanks for your return...
Currently, mouse are not supported but I've a waiting PR #106 for a first support.
I'm very busy but if I digest the PR, it will be easy to implement your G203.

@MatMoul
Copy link
Owner

MatMoul commented Jan 4, 2019

Sorry for your work but g810-led can't be use for mouse

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

2 participants