Skip to content

Add support for the Thrustmaster T-GT II - #215

Open
ranjian0 wants to merge 2 commits into
Kimplul:masterfrom
ranjian0:tgt2-support
Open

Add support for the Thrustmaster T-GT II#215
ranjian0 wants to merge 2 commits into
Kimplul:masterfrom
ranjian0:tgt2-support

Conversation

@ranjian0

@ranjian0 ranjian0 commented Aug 22, 2026

Copy link
Copy Markdown

The T-GT II ships in a T300 compat mode and shares the USB product ID b66d
with the T300RS, reporting a distinct bcdDevice of `0x0700

Fixes #151

@Kimplul

Kimplul commented Aug 25, 2026

Copy link
Copy Markdown
Owner

Thanks for the PR, but I vehemently disagree with setting a module parameter to detect which wheel we're talking to. There's some indication that checking the bcdDevice field can be used to separate wheels that show up with the same ID, see

uint16_t bcdDevice = __le16_to_cpu(usbdev->descriptor.bcdDevice);

Did you capture the rdesc from Windows, or what's this about 'cannot be presented as axes'? I'd like to avoid handling raw events as far as possible. I'd recommend capturing the rdesc on Windows, apprently the Windows driver modifies the rdesc sent over by the wheel quite heavily (kind of just replaces it completely, hah) and checking how the rotary encoders are represented there.

@ranjian0

Copy link
Copy Markdown
Author

Thanks for the PR, but I vehemently disagree with setting a module parameter to detect which wheel we're talking to. There's some indication that checking the bcdDevice field can be used to separate wheels that show up with the same ID, see

uint16_t bcdDevice = __le16_to_cpu(usbdev->descriptor.bcdDevice);

Did you capture the rdesc from Windows, or what's this about 'cannot be presented as axes'? I'd like to avoid handling raw events as far as possible. I'd recommend capturing the rdesc on Windows, apprently the Windows driver modifies the rdesc sent over by the wheel quite heavily (kind of just replaces it completely, hah) and checking how the rotary encoders are represented there.

  1. I did not capture rdesc from windows. I used usbhid-dump with the driver unbound.
  2. A module parameter is indeed ugly, I was not sure the best way to handle this since I only have one wheel to test.

I will do a capture from windows to see how the rotary encoders are mapped there

@ranjian0

ranjian0 commented Sep 9, 2026

Copy link
Copy Markdown
Author
  • Managed to capture on Windows, and the wheel's own descriptor declares everything properly, so raw_event is not needed
  • bcdDevice is precisely what I needed; mode handling has been implemented in the hid-tminit repo based on existing conventions.

Hopefully this is a much cleaner implementation.

@Kimplul

Kimplul commented Sep 9, 2026

Copy link
Copy Markdown
Owner

Thanks a lot! This indeed looks much better. Interesting that 0xb66d is used for the device when it's still in the 'bootloading' phase, but I guess that's not totally unexpected, Thrustmaster seems to reuse IDs a bit willy-nilly.

I'm somewhat intrigued by tgt2_calibrate(). There are some similarities with https://github.com/Kimplul/hid-tminit/blob/8c4547288a6c182ed4ff131e36f710f11a76c4a9/tminit.c#L27, but apparently done here after initialization. Weird. The comments mention copying those packets from the windows captures, but did you try to omit tgt2_calibrate() (except for the packet for 'opening' the wheel) and what happened then?

I also don't entirely understand why the open packets are sent out during calibration and not with the explicit open/close callbacks.

@ranjian0

Copy link
Copy Markdown
Author

Thanks a lot! This indeed looks much better. Interesting that 0xb66d is used for the device when it's still in the 'bootloading' phase, but I guess that's not totally unexpected, Thrustmaster seems to reuse IDs a bit willy-nilly.

I'm somewhat intrigued by tgt2_calibrate(). There are some similarities with https://github.com/Kimplul/hid-tminit/blob/8c4547288a6c182ed4ff131e36f710f11a76c4a9/tminit.c#L27, but apparently done here after initialization. Weird. The comments mention copying those packets from the windows captures, but did you try to omit tgt2_calibrate() (except for the packet for 'opening' the wheel) and what happened then?

I also don't entirely understand why the open packets are sent out during calibration and not with the explicit open/close callbacks.

You made some good points. I am currently running some experiments to clean up the tgt2_calibrate and use the open callback. It's taking a bit longer than expected, but I will submit new changes when everything is tested.

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.

T-GT II - Enchantments

2 participants