Sapd / HeadsetControl

Sidetone and Battery status for Logitech G930, G533, G633, G933 SteelSeries Arctis 7/PRO 2019 and Corsair VOID (Pro) in Linux and MacOSX
GNU General Public License v3.0
1.44k stars 176 forks source link

Support for Logitech G Pro X 2 #314

Closed darkymtp closed 10 months ago

darkymtp commented 10 months ago

Description

Hello. I can set sidetone, noise reduction and timeout via these command lines : Side tone :

headsetcontrol --dev -- --device 0x046d:0x0af7 --usage 0xffa0,0x1 --send "0x51, 0x0a, 0x00, 0x03, 0x1b, 0x00, 0x05, 0x00, 0x07, 0x1b, 0x01, $1"

Mic noise reduction :

headsetcontrol --dev -- --device 0x046d:0x0af7 --usage 0xffa0,0x1 --send "0x51, 0x09, 0x00, 0x03, 0x1c, 0x00, 0x04, 0x00, 0x08, 0x1c, $1"

Time out :

headsetcontrol --dev -- --device 0x046d:0x0af7 --usage 0xffa0,0x1 --send "0x51, 0x09, 0x00, 0x03, 0x1c, 0x00, 0x04, 0x00, 0x06, 0x1d, $1"

I forked the project and wrote files to support side tone settings only, unsuccessfully. https://github.com/darkymtp/HeadsetControl/

Help ! :-)

Headset Name

Logitech G Pro X 2

Device information

Detailed Device Information ``` Device Found VendorID: 0x046d ProductID: 0x0af7 path: /dev/hidraw4 serial_number: 0000000000000000 Manufacturer: Logitech Product: PRO X 2 LIGHTSPEED Interface: 3 Usage-Page: 0xc Usageid: 0x1 Device Found VendorID: 0x046d ProductID: 0x0af7 path: /dev/hidraw4 serial_number: 0000000000000000 Manufacturer: Logitech Product: PRO X 2 LIGHTSPEED Interface: 3 Usage-Page: 0xff13 Usageid: 0x1 Device Found VendorID: 0x046d ProductID: 0x0af7 path: /dev/hidraw4 serial_number: 0000000000000000 Manufacturer: Logitech Product: PRO X 2 LIGHTSPEED Interface: 3 Usage-Page: 0xffa0 Usageid: 0x1 ```
github-actions[bot] commented 10 months ago

Hello 👋

Thank you for reaching out and expressing interest in having support for a new headset. We appreciate your willingness to contribute to the project!

In order to create a implementation for a specific headset, we need to be able to reverse-engineer and test the implementation on that particular device. Explicitly speaking, only people who actually own the headset, can implement that request.

👉 If you're interested in adding support for a specific headset, we recommend taking a look at our wiki to get started.

📝 If you encounter any problems while using WireShark, we would be more than happy to help. Simply post screenshots and data on your progress.

Sapd commented 10 months ago

Hello,

Hello. I can set sidetone, noise reduction and timeout via these command lines : Side tone :

headsetcontrol --dev -- --device 0x046d:0x0af7 --usage 0xffa0,0x1 --send "0x51, 0x0a, 0x00, 0x03, 0x1b, 0x00, 0x05, 0x00, 0x07, 0x1b, 0x01, $1"

https://github.com/darkymtp/HeadsetControl/blob/1e0255409ee73cccce32bb75a358cd9e7891f4b1/src/devices/logitech_gpro_x2.c#L40

If that works, your command here must be different. HIDPP_LONG_MESSAGE is just a value for 0x11, which is not strictly applicable to all (logitech) headsets.

So the code must simply look like this:

 uint8_t sidetone_data[12] = { 0x51, 0x0a, 0x00, 0x03, 0x1b, 0x00, 0x05, 0x00, 0x07, 0x1b, 0x01, num};

also dont forget to set usage and usagepage in gpro_x2_init

darkymtp commented 10 months ago

It works, thanks !

Sapd commented 10 months ago

Good to hear, dont forget to PR it! (Just click on Pull Requests, and create a new one from the branch where you pushed the changes)

darkymtp commented 10 months ago

I would like to add battery status before PR.

darkymtp commented 10 months ago

I have no clue on how to add battery status reporting, so here is my contribution.