Skip to content

Comments

Adds support for a new G PRO X2 variant#478

Open
ChrisLauinger77 wants to merge 1 commit intoSapd:masterfrom
ChrisLauinger77:dev
Open

Adds support for a new G PRO X2 variant#478
ChrisLauinger77 wants to merge 1 commit intoSapd:masterfrom
ChrisLauinger77:dev

Conversation

@ChrisLauinger77
Copy link
Contributor

Adds a new device ID for a previously unsupported variant
of the Logitech G PRO X2.

@ChrisLauinger77
Copy link
Contributor Author

I added the deviceID as described and compiled it.
The battery does not work - I think I need help - how to proceed further ?

{
  "name": "HeadsetControl",
  "version": "continuous-19-gb627b4b-modified",
  "api_version": "1.4",
  "hidapi_version": "0.14.0",
  "device_count": 1,
  "devices": [
    {
      "status": "partial",
      "device": "Logitech G PRO Series",
      "vendor": "Logitech",
      "product": "PRO X 2 LIGHTSPEED",
      "id_vendor": "0x046d",
      "id_product": "0x0af7",
      "capabilities": [
        "CAP_SIDETONE",
        "CAP_BATTERY_STATUS",
        "CAP_INACTIVE_TIME"
      ],
      "capabilities_str": [
        "sidetone",
        "battery",
        "inactive time"
      ],
      "battery": {
        "status": "BATTERY_UNAVAILABLE",
        "level": -1
      },
      "errors": {
        "battery": "Could not open device"
      }
    }
  ]
}```

@ChrisLauinger77
Copy link
Contributor Author

after reboot - it times even out ....
"battery": "Operation timed out

@Sapd
Copy link
Owner

Sapd commented Jan 30, 2026

No other way but to capture the packets the original software sends using wireshark

@ChrisLauinger77
Copy link
Contributor Author

No other way but to capture the packets the original software sends using wireshark

Does it really need to be wireshark on windows ? I have a macbook ...

@Sapd
Copy link
Owner

Sapd commented Jan 30, 2026

No other way but to capture the packets the original software sends using wireshark

Does it really need to be wireshark on windows ? I have a macbook ...

When I remember it right on a Mac it was difficult because of the kernel protections. Best thing there is to use a virtual machine with windows and pass through the usb device to it

@ChrisLauinger77
Copy link
Contributor Author

No other way but to capture the packets the original software sends using wireshark

Does it really need to be wireshark on windows ? I have a macbook ...

When I remember it right on a Mac it was difficult because of the kernel protections. Best thing there is to use a virtual machine with windows and pass through the usb device to it

Alright - VM it is then

@ChrisLauinger77
Copy link
Contributor Author

ChrisLauinger77 commented Jan 30, 2026

Sidetone 0
sidetone0
Sidetone Full (100)
sidetone100

So I could reproduce the screenshots from the guide. Its a start.
No clue about the battery though :(

@ChrisLauinger77
Copy link
Contributor Author

Equalizer seem to be supported, too.
equalizer_ui
changed equalizer in GUI:
equalizer

@ChrisLauinger77
Copy link
Contributor Author

wireshark.zip

@Sapd
Copy link
Owner

Sapd commented Jan 30, 2026

wireshark.zip

Try again:

  • close the driver software completly
  • replug the usb stick
  • start capturing
  • start the driver software now
  • keep it open for some while (min 10 min) and also click around

@ChrisLauinger77
Copy link
Contributor Author

wireshark.zip

better ?

@ChrisLauinger77
Copy link
Contributor Author

maybe also valueable info:

headsetcontrol --dev -- --list

Device Found
  VendorID:  0x046d
  ProductID: 0x0af7
  Path: /dev/hidraw3
  Serial: 0000000000000000
  Manufacturer: Logitech
  Product: PRO X 2 LIGHTSPEED
  Interface: 3
  Usage-Page: 0x000c  Usage-ID: 0x0001

Device Found
  VendorID:  0x046d
  ProductID: 0x0af7
  Path: /dev/hidraw3
  Serial: 0000000000000000
  Manufacturer: Logitech
  Product: PRO X 2 LIGHTSPEED
  Interface: 3
  Usage-Page: 0xff13  Usage-ID: 0x0001

Device Found
  VendorID:  0x046d
  ProductID: 0x0af7
  Path: /dev/hidraw3
  Serial: 0000000000000000
  Manufacturer: Logitech
  Product: PRO X 2 LIGHTSPEED
  Interface: 3
  Usage-Page: 0xffa0  Usage-ID: 0x0001

@Sapd
Copy link
Owner

Sapd commented Jan 30, 2026

@ChrisLauinger77 do you know at which battery percentage you were on your latest capture? and was it loading or discharging?

@ChrisLauinger77
Copy link
Contributor Author

52% not plugged in. So discharging

@Sapd
Copy link
Owner

Sapd commented Jan 30, 2026

Not 100% sure but could be

headsetcontrol --dev -- --device 0x046d:0x0af7 --interface 3 --send "0x51 0x0a 0x00 0x03 0x1e 0x00 0x05 0x00 0x07 0x1e 0x01 0x32 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
  0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00" --receive

The response should be then:

0x51 0x0a 0x00 0x03 0x1e 0x00 0x05 0x00 0x07 0x1e 0x01 0x32 0x00 0x00
                                                          ^--- that could be the battery

@ChrisLauinger77
Copy link
Contributor Author

ChrisLauinger77 commented Jan 31, 2026

headsetcontrol --dev -- --device 0x046d:0x0af7 --interface 3 --send "0x51 0x0a 0x00 0x03 0x1e 0x00 0x05 0x00 0x07 0x1e 0x01 0x32 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
  0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00" --receive

0x51 0x03 0x00 0x03 0x1e 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 

@ChrisLauinger77
Copy link
Contributor Author

made a capture during charging - saw also in UI that it went from 52% to 54%
wireshark.zip

@Sapd
Copy link
Owner

Sapd commented Jan 31, 2026

Cant really see the battery status in there, is interrupt IN included too?

You can also try
headsetcontrol --dev -- --receive

repeadtly

@ChrisLauinger77
Copy link
Contributor Author

headsetcontrol --dev -- --receive
You must supply --device VENDORID:PRODUCTID for send/receive operations
christian@debian:~$ headsetcontrol --dev -- --device 0x046d:0x0af7 --interface 3 --send "0x51 0x0a 0x00 0x03 0x1e 0x00 0x05 0x00 0x07 0x1e 0x01 0x32 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
  0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00" --receive
0x51 0x05 0x00 0xff 0x03 0x1e 0x0b 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 
christian@debian:~$ headsetcontrol --dev -- --device 0x046d:0x0af7 --interface 3 --send "0x51 0x0a 0x00 0x03 0x1e 0x00 0x05 0x00 0x07 0x1e 0x01 0x32 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
  0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00" --receive
0x51 0x05 0x00 0xff 0x03 0x1e 0x0b 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 
christian@debian:~$ headsetcontrol --dev -- --device 0x046d:0x0af7 --interface 3 --send "0x51 0x0a 0x00 0x03 0x1e 0x00 0x05 0x00 0x07 0x1e 0x01 0x32 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
  0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00" --receive
0x51 0x05 0x00 0xff 0x03 0x1e 0x0b 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 
christian@debian:~$ headsetcontrol --dev -- --device 0x046d:0x0af7 --interface 3 --send "0x51 0x0a 0x00 0x03 0x1e 0x00 0x05 0x00 0x07 0x1e 0x01 0x32 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
  0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00" --receive
0x51 0x05 0x00 0xff 0x03 0x1e 0x0b 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 
christian@debian:~$ headsetcontrol --dev -- --device 0x046d:0x0af7 --interface 3 --send "0x51 0x0a 0x00 0x03 0x1e 0x00 0x05 0x00 0x07 0x1e 0x01 0x32 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
  0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00" --receive
0x51 0x05 0x00 0xff 0x03 0x1e 0x0b 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 
christian@debian:~$ headsetcontrol --dev -- --device 0x046d:0x0af7 --interface 3 --send "0x51 0x0a 0x00 0x03 0x1e 0x00 0x05 0x00 0x07 0x1e 0x01 0x32 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
  0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00" --receive
0x51 0x05 0x00 0xff 0x03 0x1e 0x0b 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 
christian@debian:~$ headsetcontrol --dev -- --device 0x046d:0x0af7 --interface 3 --send "0x51 0x0a 0x00 0x03 0x1e 0x00 0x05 0x00 0x07 0x1e 0x01 0x32 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
  0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00" --receive
0x51 0x05 0x00 0xff 0x03 0x1e 0x0b 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 
christian@debian:~$ headsetcontrol --dev -- --device 0x046d:0x0af7 --interface 3 --send "0x51 0x0a 0x00 0x03 0x1e 0x00 0x05 0x00 0x07 0x1e 0x01 0x32 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
  0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00" --receive
0x51 0x05 0x00 0xff 0x03 0x1e 0x0b 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 

@Sapd
Copy link
Owner

Sapd commented Feb 3, 2026

Looked into it but cannot find it, you probably need to run it with a loop over longer time and while opening the driver application

@ChrisLauinger77
Copy link
Contributor Author

ChrisLauinger77 commented Feb 4, 2026

Hmm ...

I get on windows where the driver application is running (headsetcontrol is the artefact from this PR)

C:\Users\christian\Downloads\headsetcontrol-windows-mingw>headsetcontrol --dev -- --device 0x046d:0x0af7 --interface 3 --send "0x51 0x0a 0x00 0x03 0x1e 0x00 0x05 0x00 0x07 0x1e 0x01 0x32 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00" --receive
Failed to send:

C:\Users\christian\Downloads\headsetcontrol-windows-mingw>headsetcontrol --dev -- --device 0x046d:0x0af7 --send "0xC9, 0x64" --receive
Failed to send:

C:\Users\christian\Downloads\headsetcontrol-windows-mingw>headsetcontrol -o json
{
  "name": "HeadsetControl",
  "version": "0.0.0-unknown",
  "api_version": "1.4",
  "hidapi_version": "0.15.0",
  "device_count": 1,
  "devices": [
    {
      "status": "partial",
      "device": "Logitech G PRO Series",
      "vendor": "Logitech",
      "product": "PRO X 2 LIGHTSPEED",
      "id_vendor": "0x046d",
      "id_product": "0x0af7",
      "capabilities": [
        "CAP_SIDETONE",
        "CAP_BATTERY_STATUS",
        "CAP_INACTIVE_TIME"
      ],
      "capabilities_str": [
        "sidetone",
        "battery",
        "inactive time"
      ],
      "battery": {
        "status": "BATTERY_UNAVAILABLE",
        "level": -1
      },
      "errors": {
        "battery": "HID communication error"
      }
    }
  ]
}


@ChrisLauinger77
Copy link
Contributor Author

when I use the released version of headsetcontrol I get

C:\Program Files\headsetcontrol 0.0.0~continuous-19-gb627b4b\bin>headsetcontrol --dev -- --device 0x046d:0x0af7 --interface 3 --send "0x51 0x0a 0x00 0x03 0x1e 0x00 0x05 0x00 0x07 0x1e 0x01 0x32 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00" --receive
Failed to send: WriteFile: (0x00000001) Unzulõssige Funktion.

C:\Program Files\headsetcontrol 0.0.0~continuous-19-gb627b4b\bin>headsetcontrol.exe -o json
{
  "name": "HeadsetControl",
  "version": "continuous-19-gb627b4b",
  "api_version": "1.4",
  "hidapi_version": "0.15.0",
  "device_count": 0,
  "devices": [

  ]
}

@Sapd
Copy link
Owner

Sapd commented Feb 5, 2026

With other versions too? Not sure what could have caused that in code

@ChrisLauinger77
Copy link
Contributor Author

ChrisLauinger77 commented Feb 5, 2026

With other versions too? Not sure what could have caused that in code

No success on windows with 2 versions. I could also try older releases ...

@Sapd
Copy link
Owner

Sapd commented Feb 5, 2026

I checked it a bit

The Windows issue is that this device variant (0x0af7) exposes completely different HID usage pages than the other G PRO variants. From your --dev --list output:

  Usage-Page: 0x000c  Usage-ID: 0x0001  (consumer controls)
  Usage-Page: 0xff13  Usage-ID: 0x0001  (vendor specific)
  Usage-Page: 0xffa0  Usage-ID: 0x0001  (vendor specific)

But the LogitechGPro class hardcodes usagepage=0xff43, usageid=0x0202 for battery/inactive time (which doesn't exist on your device at all)

On Windows, the code tries to match that usage page first, fails, then falls back to opening the first enumerated HID endpoint (the 0x000c consumer controls one), which is wrong that's why --dev --send fails with "Failed to send".

On Linux it doesn't matter because all three entries resolve to the same /dev/hidraw3, so the timeout there is a separate protocol issue (probably the battery command itself being different).

Could you run --dev --list on Windows too? I'd like to see what usage pages/interfaces it enumerates there they might differ from Linux. That would tell us which usagepage/usageid to set for this variant.

@ChrisLauinger77
Copy link
Contributor Author

C:\Program Files\headsetcontrol 0.0.0~continuous-19-gb627b4b\bin>headsetcontrol --dev -- --list
Device Found
  VendorID:  0x0627
  ProductID: 0x0001
  Path: \\?\HID#VID_0627&PID_0001#7&182e5f4&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030}
  Serial: 28754-0000:00:02.1:00.0-2
  Manufacturer: QEMU
  Product: QEMU USB Tablet
  Interface: 0
  Usage-Page: 0x0001  Usage-ID: 0x0002

Device Found
  VendorID:  0x046d
  ProductID: 0x0af7
  Path: \\?\HID#VID_046D&PID_0AF7&MI_03&Col02#8&17a58a&0&0001#{4d1e55b2-f16f-11cf-88cb-001111000030}
  Serial: 0000000000000000
  Manufacturer: Logitech
  Product: PRO X 2 LIGHTSPEED
  Interface: 3
  Usage-Page: 0xff13  Usage-ID: 0x0001

Device Found
  VendorID:  0x046d
  ProductID: 0xc232
  Path: \\?\HID#VID_046D&PID_C232#2&1a87f3a8&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030}\KBD
  Serial:
  Manufacturer:
  Product:
  Interface: -1
  Usage-Page: 0x0001  Usage-ID: 0x0006

Device Found
  VendorID:  0x046d
  ProductID: 0x0af7
  Path: \\?\HID#VID_046D&PID_0AF7&MI_03&Col03#8&17a58a&0&0002#{4d1e55b2-f16f-11cf-88cb-001111000030}
  Serial: 0000000000000000
  Manufacturer: Logitech
  Product: PRO X 2 LIGHTSPEED
  Interface: 3
  Usage-Page: 0xffa0  Usage-ID: 0x0001

Device Found
  VendorID:  0x046d
  ProductID: 0x0af7
  Path: \\?\HID#VID_046D&PID_0AF7&MI_03&Col01#8&17a58a&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030}
  Serial: 0000000000000000
  Manufacturer: Logitech
  Product: PRO X 2 LIGHTSPEED
  Interface: 3
  Usage-Page: 0x000c  Usage-ID: 0x0001

@Sapd
Copy link
Owner

Sapd commented Feb 5, 2026

Try both

headsetcontrol --dev -- --device 0x046d:0x0af7 --interface 3 --usage 0xffa0:0x0001 --send "0x06 0x0d" --receive

headsetcontrol --dev -- --device 0x046d:0x0af7 --interface 3 --usage 0xff13:0x0001 --send "0x06 0x0d" --receive

@ChrisLauinger77
Copy link
Contributor Author

C:\Program Files\headsetcontrol 0.0.0~continuous-19-gb627b4b\bin>headsetcontrol --dev -- --device 0x046d:0x0af7 --interface 3 --usage 0xffa0:0x0001 --send "0x06 0x0d" --receive
Failed to send: WriteFile: (0x00000001) Unzulõssige Funktion.

@ChrisLauinger77
Copy link
Contributor Author

C:\Program Files\headsetcontrol 0.0.0~continuous-19-gb627b4b\bin>headsetcontrol --dev -- --device 0x046d:0x0af7 --interface 3 --usage 0xff13:0x0001 --send "0x06 0x0d" --receive
grafik

With the 2nd command its just sitting there in console - blinking cursor - clicking in Gpro UI does not in result in any output in console log. Not sure what exactly wanna test - I expected output ...

Adds a new device ID for a previously unsupported variant
of the Logitech G PRO X2.
@ChrisLauinger77
Copy link
Contributor Author

Any enlightenment on this one ?

@Sapd
Copy link
Owner

Sapd commented Feb 14, 2026

So that receive hangs is basically "normal" it waits for input. But that also means that the send command is not the correct one.
Problem is I dont really see in your Wireshark logs what could be the battery

@ChrisLauinger77
Copy link
Contributor Author

Anything else I can do ? Some setting in wireshark ?

@Sapd
Copy link
Owner

Sapd commented Feb 17, 2026

Systematic Battery Testing Guide

Based on research into Solaar's codebase and the HID++ protocol, here are test commands to try. The goal is to identify which battery command works with your new firmware.


Background

Your device (0x0af7) has different USB endpoints than other G PRO X2 variants:

  • Your device: UsagePage 0xff13:0x0001 and 0xffa0:0x0001
  • Other variants: UsagePage 0xff43:0x0202

The firmware update likely switched from HID++ 1.0 to HID++ 2.0 protocol, which is why old battery commands don't work.


Test Commands (Linux)

Run these sequentially and report the output for each. All commands are safe read-only operations.

Test 1: Feature Discovery (HID++ 2.0)

This discovers which features your headset supports:

# Using 0xff13 endpoint:
headsetcontrol --dev -- --device 0x046d:0x0af7 --interface 3 --usage 0xff13:0x0001 \
  --send "0x11 0xFF 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00" --receive

# Using 0xffa0 endpoint:
headsetcontrol --dev -- --device 0x046d:0x0af7 --interface 3 --usage 0xffa0:0x0001 \
  --send "0x11 0xFF 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00" --receive

Expected: A response showing feature count or feature table.


Test 2: Old Battery Command with New Endpoints

Try the existing battery command (0x06 0x0d) on new endpoints:

# With 0xff13:
headsetcontrol --dev -- --device 0x046d:0x0af7 --interface 3 --usage 0xff13:0x0001 \
  --send "0x11 0xFF 0x06 0x0d 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00" --receive

# With 0xffa0:
headsetcontrol --dev -- --device 0x046d:0x0af7 --interface 3 --usage 0xffa0:0x0001 \
  --send "0x11 0xFF 0x06 0x0d 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00" --receive

Test 3: HID++ 2.0 Battery Features

These are standard HID++ 2.0 battery commands used by Solaar:

# BATTERY_STATUS (0x1000) - Try feature indices 0x01 through 0x10
# Feature index 0x01:
headsetcontrol --dev -- --device 0x046d:0x0af7 --interface 3 --usage 0xff13:0x0001 \
  --send "0x11 0xFF 0x01 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00" --receive

# Feature index 0x02:
headsetcontrol --dev -- --device 0x046d:0x0af7 --interface 3 --usage 0xff13:0x0001 \
  --send "0x11 0xFF 0x02 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00" --receive

# Feature index 0x03:
headsetcontrol --dev -- --device 0x046d:0x0af7 --interface 3 --usage 0xff13:0x0001 \
  --send "0x11 0xFF 0x03 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00" --receive

# Feature index 0x04:
headsetcontrol --dev -- --device 0x046d:0x0af7 --interface 3 --usage 0xff13:0x0001 \
  --send "0x11 0xFF 0x04 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00" --receive

# Feature index 0x05:
headsetcontrol --dev -- --device 0x046d:0x0af7 --interface 3 --usage 0xff13:0x0001 \
  --send "0x11 0xFF 0x05 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00" --receive

Test 4: Alternative Battery Commands

Try other known Logitech battery commands:

# Battery command variant 1 (0x08 0x0a):
headsetcontrol --dev -- --device 0x046d:0x0af7 --interface 3 --usage 0xff13:0x0001 \
  --send "0x11 0xFF 0x08 0x0a 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00" --receive

# Battery command variant 2 (0x08 0x11):
headsetcontrol --dev -- --device 0x046d:0x0af7 --interface 3 --usage 0xff13:0x0001 \
  --send "0x11 0xFF 0x08 0x11 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00" --receive

# Short message format (0x10 instead of 0x11):
headsetcontrol --dev -- --device 0x046d:0x0af7 --interface 3 --usage 0xff13:0x0001 \
  --send "0x10 0xFF 0x06 0x0d 0x00 0x00 0x00" --receive

Test 5: Listen for Asynchronous Battery Updates

Battery might be sent automatically by the device:

# Just listen for incoming data (run for 30 seconds while battery % changes):
timeout 30 headsetcontrol --dev -- --device 0x046d:0x0af7 --interface 3 --usage 0xff13:0x0001 --receive

Try this while:

  1. Plugging/unplugging the charger
  2. Letting battery drain 1%
  3. Opening/closing G Hub software

What to Report

For each command, please share:

  1. Success - Got a response (paste the hex output)
  2. ⏱️ Timeout - Command hangs/times out
  3. Error - "Failed to send" or other error

Also note your current battery % from G Hub when testing.


Next Steps

Once we identify a working command, I'll update the HeadsetControl code to use the correct protocol for your variant.

Related Research:

@Sapd
Copy link
Owner

Sapd commented Feb 17, 2026

Windows Version of Test Commands

Since you mentioned Windows issues, here are the same commands formatted for Windows Command Prompt:

Test 1: Feature Discovery

headsetcontrol --dev -- --device 0x046d:0x0af7 --interface 3 --usage 0xff13:0x0001 --send "0x11 0xFF 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00" --receive

Test 2: Old Battery Command with New Endpoint

headsetcontrol --dev -- --device 0x046d:0x0af7 --interface 3 --usage 0xff13:0x0001 --send "0x11 0xFF 0x06 0x0d 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00" --receive

Test 3: Try Feature Indices 0x01-0x05

REM Feature index 0x01
headsetcontrol --dev -- --device 0x046d:0x0af7 --interface 3 --usage 0xff13:0x0001 --send "0x11 0xFF 0x01 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00" --receive

REM Feature index 0x02
headsetcontrol --dev -- --device 0x046d:0x0af7 --interface 3 --usage 0xff13:0x0001 --send "0x11 0xFF 0x02 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00" --receive

REM Feature index 0x03
headsetcontrol --dev -- --device 0x046d:0x0af7 --interface 3 --usage 0xff13:0x0001 --send "0x11 0xFF 0x03 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00" --receive

REM Feature index 0x04
headsetcontrol --dev -- --device 0x046d:0x0af7 --interface 3 --usage 0xff13:0x0001 --send "0x11 0xFF 0x04 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00" --receive

REM Feature index 0x05
headsetcontrol --dev -- --device 0x046d:0x0af7 --interface 3 --usage 0xff13:0x0001 --send "0x11 0xFF 0x05 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00" --receive

Test 4: Alternative Battery Commands

REM Battery variant 0x08 0x0a
headsetcontrol --dev -- --device 0x046d:0x0af7 --interface 3 --usage 0xff13:0x0001 --send "0x11 0xFF 0x08 0x0a 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00" --receive

REM Short message format
headsetcontrol --dev -- --device 0x046d:0x0af7 --interface 3 --usage 0xff13:0x0001 --send "0x10 0xFF 0x06 0x0d 0x00 0x00 0x00" --receive

Important Note for Windows

If you see "Failed to send: WriteFile" errors, it means the usage page is wrong. The --usage 0xff13:0x0001 parameter is critical on Windows to select the correct HID endpoint.

If all commands fail on Windows, try:

  1. Close G Hub completely
  2. Replug the USB dongle
  3. Run the commands before opening G Hub again

The G Hub software might be holding an exclusive lock on the HID device.

@Sapd
Copy link
Owner

Sapd commented Feb 17, 2026

Automated Test Script

To make testing easier, here's a script that runs all commands and saves results to a file.

Linux/macOS Script

Save as test_battery.sh:

#\!/bin/bash

DEVICE="0x046d:0x0af7"
INTERFACE="3"
USAGE="0xff13:0x0001"
OUTPUT="battery_test_results.txt"

echo "HeadsetControl Battery Test Results" > $OUTPUT
echo "Device: $DEVICE" >> $OUTPUT
echo "Date: $(date)" >> $OUTPUT
echo "Battery level from G Hub: [PLEASE FILL IN]" >> $OUTPUT
echo "========================================" >> $OUTPUT
echo "" >> $OUTPUT

run_test() {
    local name="$1"
    local cmd="$2"
    
    echo "Testing: $name" | tee -a $OUTPUT
    echo "Command: $cmd" >> $OUTPUT
    
    timeout 5s bash -c "$cmd" >> $OUTPUT 2>&1
    local result=$?
    
    if [ $result -eq 0 ]; then
        echo "✅ SUCCESS" | tee -a $OUTPUT
    elif [ $result -eq 124 ]; then
        echo "⏱️ TIMEOUT" | tee -a $OUTPUT
    else
        echo "❌ ERROR (code $result)" | tee -a $OUTPUT
    fi
    
    echo "" >> $OUTPUT
    echo "----------------------------------------" >> $OUTPUT
    echo "" >> $OUTPUT
}

echo "Running battery tests... (this will take ~2 minutes)"
echo ""

# Test 1: Feature Discovery
run_test "Feature Discovery (0xff13)" \
  "headsetcontrol --dev -- --device $DEVICE --interface $INTERFACE --usage $USAGE --send '0x11 0xFF 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00' --receive"

# Test 2: Old battery command
run_test "Old Battery Command (0x06 0x0d)" \
  "headsetcontrol --dev -- --device $DEVICE --interface $INTERFACE --usage $USAGE --send '0x11 0xFF 0x06 0x0d 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00' --receive"

# Test 3: Try feature indices
for idx in 01 02 03 04 05 06 07 08; do
    run_test "Feature Index 0x$idx" \
      "headsetcontrol --dev -- --device $DEVICE --interface $INTERFACE --usage $USAGE --send '0x11 0xFF 0x$idx 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00' --receive"
done

# Test 4: Alternative commands
run_test "Battery Variant (0x08 0x0a)" \
  "headsetcontrol --dev -- --device $DEVICE --interface $INTERFACE --usage $USAGE --send '0x11 0xFF 0x08 0x0a 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00' --receive"

run_test "Short Message Format" \
  "headsetcontrol --dev -- --device $DEVICE --interface $INTERFACE --usage $USAGE --send '0x10 0xFF 0x06 0x0d 0x00 0x00 0x00' --receive"

# Test with 0xffa0 endpoint
USAGE2="0xffa0:0x0001"
run_test "Feature Discovery (0xffa0)" \
  "headsetcontrol --dev -- --device $DEVICE --interface $INTERFACE --usage $USAGE2 --send '0x11 0xFF 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00' --receive"

echo ""
echo "Testing complete\! Results saved to: $OUTPUT"
echo "Please attach this file to the PR."

Usage:

chmod +x test_battery.sh
./test_battery.sh
# Wait ~2 minutes, then upload battery_test_results.txt

Windows Batch Script

Save as test_battery.bat:

@echo off
setlocal enabledelayedexpansion

set DEVICE=0x046d:0x0af7
set INTERFACE=3
set USAGE=0xff13:0x0001
set OUTPUT=battery_test_results.txt

echo HeadsetControl Battery Test Results > %OUTPUT%
echo Device: %DEVICE% >> %OUTPUT%
echo Date: %DATE% %TIME% >> %OUTPUT%
echo Battery level from G Hub: [PLEASE FILL IN] >> %OUTPUT%
echo ======================================== >> %OUTPUT%
echo. >> %OUTPUT%

echo Running battery tests...
echo.

REM Test 1: Feature Discovery
echo Testing: Feature Discovery >> %OUTPUT%
headsetcontrol --dev -- --device %DEVICE% --interface %INTERFACE% --usage %USAGE% --send "0x11 0xFF 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00" --receive >> %OUTPUT% 2>&1
echo. >> %OUTPUT%
echo ---------------------------------------- >> %OUTPUT%
echo. >> %OUTPUT%

REM Test 2: Old battery command
echo Testing: Old Battery Command >> %OUTPUT%
headsetcontrol --dev -- --device %DEVICE% --interface %INTERFACE% --usage %USAGE% --send "0x11 0xFF 0x06 0x0d 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00" --receive >> %OUTPUT% 2>&1
echo. >> %OUTPUT%
echo ---------------------------------------- >> %OUTPUT%
echo. >> %OUTPUT%

REM Test 3: Feature indices
for %%i in (01 02 03 04 05 06 07 08) do (
    echo Testing: Feature Index 0x%%i >> %OUTPUT%
    headsetcontrol --dev -- --device %DEVICE% --interface %INTERFACE% --usage %USAGE% --send "0x11 0xFF 0x%%i 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00" --receive >> %OUTPUT% 2>&1
    echo. >> %OUTPUT%
    echo ---------------------------------------- >> %OUTPUT%
    echo. >> %OUTPUT%
)

echo.
echo Testing complete\! Results saved to: %OUTPUT%
echo Please attach this file to the PR.
pause

Usage:

test_battery.bat
REM Wait for completion, then upload battery_test_results.txt

Both scripts will create a file with all test results that you can easily attach to this PR for analysis.

@Sapd
Copy link
Owner

Sapd commented Feb 17, 2026

Summary: Why These Tests?

@ChrisLauinger77 I've posted a comprehensive testing guide above based on research into Solaar (the Linux Logitech device manager) and the official HID++ protocol.

The Core Issue

Your device variant (0x0af7) appears to have firmware that uses a different protocol than the other G PRO X2 variants:

Aspect Other Variants (0x0afb, 0x0afc) Your Variant (0x0af7)
USB Endpoint UsagePage 0xff43:0x0202 UsagePage 0xff13:0x0001
Protocol Likely HID++ 1.0 Likely HID++ 2.0
Battery Command {0x06, 0x0d} works Times out

What Changed

Issue #477 confirms that your exact device used to work but stopped after a firmware update. This strongly suggests Logitech switched the battery protocol from HID++ 1.0 to HID++ 2.0 in newer firmware.

The Solution Path

HID++ 2.0 uses feature-based commands instead of direct register access:

  1. First, discover which features the device supports (feature 0x0000)
  2. Then query the specific battery feature (0x1000, 0x1001, or 0x1F20)

The test commands I provided systematically try:

  • ✅ Different USB endpoints (0xff13 vs 0xffa0)
  • ✅ Feature discovery
  • ✅ Common battery feature indices
  • ✅ Alternative battery commands from other Logitech devices

What Success Looks Like

When you find the right command, you'll get a response like:

0x11 0xFF 0x03 0x00 0x34 0x0E 0xD3 0x01 ...
                     ^^    ^^^^^ 
                     |     Voltage (3795mV)
                     Battery % (52)

Once we identify the working command, I can help update the code to:

  1. Detect variant 0x0af7 specifically
  2. Use the correct USB endpoint (0xff13:0x0001)
  3. Send the correct HID++ 2.0 battery command

Research Sources

This testing approach is based on:

@Sapd Let me know if you'd like me to start implementing HID++ 2.0 support in HeadsetControl while we wait for Christian's test results. It could benefit other Logitech devices too.

@ChrisLauinger77
Copy link
Contributor Author

Thx you so much - I start working on that today after work.
Do you want me to do this tests on linux and windows ?

@Sapd
Copy link
Owner

Sapd commented Feb 17, 2026

Test best on Linux first.

To be fully transparent, I used Claude AI for comment and research. But the steps make completely sense

@ChrisLauinger77
Copy link
Contributor Author

linux.zip

@ChrisLauinger77
Copy link
Contributor Author

win.zip
On windows it takes only 1s - i tried with GHUB on and also with GHUB off and replugging the USB dongle-
Same result

@ChrisLauinger77
Copy link
Contributor Author

On windows I have the wrong exe - I fix it and retry ...

@ChrisLauinger77
Copy link
Contributor Author

win.zip
here is win with correct artefact from this PR.
I added -o json upfront to be sure we get something

@ChrisLauinger77
Copy link
Contributor Author

On mac timeout needs to be gtimeout
still 80% bat
mac.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants