-
Notifications
You must be signed in to change notification settings - Fork 20
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
T128P to be added? #67
Comments
Hello, glad to hear you're interested in this project. Looks like the T128P uses the same (or at least a very similar?) base as the T248, which maybe explains your #64 (comment) findings. I'm guessing the wheel didn't work out of the box with this driver though? Sort of interesting, as the bases at least seem identical I can imagine that there's some flag that's different between the wheels that my driver fails to set or some other small detail like that. For example, the T248 required some extra initialization packets that the T300 didn't need, could be that the T128 is the same, see Line 9 in 010c0d9
If that's the case, you should probably try to capture the packets that are sent out just after the wheel is plugged in. I don't know for sure what the packets might look like or even do, but the ones linked to above got my wheel working. Still, it might be a good idea to check that the T248 FFB packets are the same ones used by the T128. Turned out that the T248 used the same format as the T300, so Packet analysis isn't too difficult, mostly just tedious. Essentially what we're interested in finding out is what's the format for USB packets that control FFB effects on the wheel. In Generally what you want to do is figure out
On the Thrustmaster wheels that I'm familiar with, all effect parameters are packed into one packet. For this, you would mostly have to capture uploading an effect to the wheel, note down how the packet looks, remove the effect and capture uploading the same effect with some parameter tweaked, and try to figure out which bits changed. Usually an effects already loaded has to be modified one parameter at a time, that is one packet per parameter modification. It might be possible to send multiple parameter modifications in a single packet, but that complicates things a lot and I don't really see it worth the effort. Effects are first uploaded, and then later started through some start packet. The FFB spec technically speaking has separate functions for stopping and removing an effect from the wheel, but Thrustmaster seems to only implement removing an effect completely, at least when interfaced through Generally I would recommend using For an overview of what a user program expects from a wheel, see https://docs.kernel.org/input/ff.html. Note that the documentation doesn't go into a lot of detail, and there are a number of differences in how Windows and Linux handle FFB, some of which I've run head first into. So just trying to emulate what Finally, keep in mind that the direction of an effect scales the effect strength, so a direction of 0 is essentially multiplying the strength by zero. Took me a while to figure that out. Hope this writeup wasn't too confusing, but if you have any questions, feel free to ask. You can also hit me up on discord or somewhere else if you want to have a call, maybe do a live demonstration or something along those lines. |
Here's what I've learnt today. When the device starts up it uses endpoint 0 and 2 for configuration and HID setup. Then endpoint 2 blasts out all the buttons and axis updates through HID messages. The T128 has 11 axis and I think it was 21 buttons. I'll double check the button count. Here's what is baffling, America Truck Sim works well but it's a linux client. But Dirt 4 is a linux client but it has never been able to see the wheel. Yesterday I captured all the fedit effecfts in separate files so I'll go see how close my device is to your results. |
Wow after going through that data T128P is similiar but nothing identical except the packet with 89 in it. |
I've compiled a list of a bunch of these packets, how do I start applying this to the driver? I've done quite a bit coding but never worked on a driver like this. Thanx.. hope your weekend is going well. |
Sounds like my wheels which is good, nice job.
Just to clarify, by 'works well' do you mean that there's force feedback or just that the buttons show up?
Could you clarify what you mean when you say 'nothing identical'? Obviously the exact values I've presented as examples in
Assuming it actually is necessary, frankly your best bet is probably to copy |
Any progress made on this? |
Please can you integrate a linux driver for the T128 steering wheel ? |
Hi! I've got the T128X wheel (xbox version) and will take a stab at grabbing the inputs in the coming days. And since I also have a proper Windows machine to plug it in, I think it would be smartest and cleanest to just run the FFB test buttons in the thrustmaster firmware and capture the signal from that. |
Thanks for your involvement. |
Hi, please find the packets captured with wireshark in this linked folder. The files cover wheel initialization (upon plugging in) and all FFB test options from the Thrustmaster driver. I ran all these tests in order without touching the wheel - I'm assuming other Thrustmaster wheels have the exact same software and thus it should be much easier to do a 1:1 comparison? I'll be happy to help with further steps but I'm really out of my depth here, so first I'd like to ensure gathering and sharing all the necessary data so that it's available whether I'll manage to figure this out or not. I'll try to get the fedit packages uploaded sometime later this week, but here's a question: do I have to turn the wheel for the effects to register properly? I mean, it would be perfect if I could first get a feel for which effects are working and then run a no-hands recording so that I can upload the fedit file as well and have very clear-cut data on timings and effect values. But then again, I wouldn't be surprised if some scaling with the rotation angle was inherent to how some of the effects are coded. Also, here's a little kicker that may either prove useless or a very convenient shortcut to the packet analysis (someone smarter tell me). Still on my Windows machine, CarX Drift Racing Online identifies the wheel as T248. Everything more or less works, just a bit shittily - the LSB/RSB buttons aren't working and force feedback feels off a lot of the time. So assuming the two models are similar enough the T128 receives readable, but mangled signals, perhaps there's some cheeky shortcut to be had comparing simultaneous signals from the game and the driver? |
Hello, sorry for the delay, I was on holiday. Thanks a lot for the captures, I had a quick look through them and it does indeed seem like the T128 shares the same USB command set as the T300/T248. For example, packet 359 in I can try picking out some important values and set up a skeleton for the T128 in a separate branch with a configuration I think might work, I'll try to get it done by the end of the week at the latest. Some tweaking with wheel in hand will likely be required, though, but we can go into detail about that later.
That's not necessary. There are some effects that take the rotation into account, but that is done on the wheel and the captures shouldn't be affected (at least assuming the wheels are similar enough, which I think they are).
Hard to tell, the game most likely uses some generic FFB library (like SDL), but might have some internal profiles for different wheels (e.g. some wheel has stronger motors so decrease force strength, stuff like that) and is for some reason conflating the two wheels.
Sorry, I don't entirely understand what you're getting at. The game sends FFB effects to the OS (again, likely through a library of some sort), and the OS converts the effects to something the wheel understands through a driver (for example, this one ;). It would definitely be useful to do some (preferably identical) task on Windows and Linux and compare the USB traffic between the two, could maybe expose some bugs but that's on my 'maybe some day' list for now. |
Right, I added a t128 branch, try it out and see what happens (preferably in a virtual machine to be safe, as always). Remember to update the init submodule, something like I realized the T128 probably shows up as a T248 in the game because they both seem use the same USB product ID, so this driver will probably also report the T128 as a T248 to start with. That can probably be patched later, for now I'm mostly interested in seeing if magic smoke comes out or something like that. |
Testing on my t128x on the 128 branch, so far, oversteer shows nothing. I will try to play need for speed heat and see if it works. By the way, is it worth noting that "lsusb" shows the t128x as "Thrustmaster, Inc. Thrustmaster T128X GIP Racing Wheel"? (No magic smoke yet though) |
Ok so, the game does not even see there is a wheel connected... I forgot to mention that when I ran this: "git submodule update --remote" it said something along the lines of "not a valid git repository". Am I doing something wrong? Also I installed via DKMS |
Just installed via "make" method, still nothing. "lsmod" doesn't list the driver. I am on arch linux |
Hi, Thanks for all the work! I ended up a little sick (hence the delay), but I'll try to test the new branch once I'm back up, probably this weekend. |
That's fine,
For testing it's usually best to use the manual installation method, it gives the clearest error messages and is arguably the easiest to grok. But yeah, it sounds like you ran the command outside of the git repository, which won't work, try doing it again in the root of wherever you cloned this repository. Without the updated submodule I wouldn't really trust your reports so far, sorry. Please attach
Cheers, no rush, hope you feel better soon. |
Ok, so once I got the updated submodule, ran
|
Interesting, for some reason it looks like the T128 boots with a different id than I was expecting. I pushed a commit to the submodule that should get us further along, |
|
I used |
Hey, is the project still on? I recently bought the T128x steering wheel and would like to help you make it compatible with Linux. How can I help you? |
Not repo owner, but can you try to install the driver? I couldn't make it work |
Hello, yeah I'd still be interested in getting the T128 working. The situation is more or less the same as described in #67 (comment), i.e. right now we need someone with a wheel to try out the |
So I tried installing again, and it shows up in lsmod
But it never gets used by anything and doesn't show up in Here's
I'm really confused. I loaded the modules with |
One more thing, trying to figure this out on my own led me to see that there is no "extras" directory in my kernel modules folder? |
If that's all the output, we might be running into an issue where the T128 doesn't report itself to be a HID device. HID is a system built on top of USB, and Linux doesn't probe HID drivers when a device doesn't report supporting HID. This and There were some talks about converting I had a quick look at the captures again and frankly, I should've noticed this earlier, my mistake. Good news is that the wheel seems to report itself as a HID device after the initialization, at least.
Seems like that's been changed without updating docs: torvalds/linux@b74d7bb EDIT: Slight correction, the |
No problem on the delay! You're doing something great here |
Hi, I've followed the steps here and hit the same issue as @GGTNT . I have 17d6cad checked out, but I get the same behaviour. Using Mint 21.2 btw. |
I seem to have Mint 21.3 on my VM. Could you post the error message? |
Maybe I should upgrade then... Error is the same: modprobe: FATAL: Module usb-tminit not found in directory /lib/modules/5.15.0-105-generic |
Oh, right, that's a different error actually. The errors I was fixing were compilation errors due to Technically speaking running |
Hey, thanks for your edits and please forgive me for the time without a response. It works on my pc, but I have a few questions. Do you know why force feedback is very weak (or sometimes non-existent) on some games with the same settings as Windows? Also, for some reason that is still unclear, my steering wheel does a bit of anything on native games like ets2 (it turns when I go straight for example); Do you know if it's a problem with the driver or it's a problem with the game? |
Can't really say I do. It could very well be the driver, or it could be related to Proton if you're running through that, or even a shoddy port to Linux if you're playing native games. Arguably the best way to figure things like this out would be to have a number of different wheels from different manufacturers and cross-compare, but I'm not aware of any such efforts. Please feel free to open up issues for each game you experience issues with, maybe we can crowd-source our way to a fix :) |
Hello again! I'm trying to play Need for Speed Hot Pursuit Remastered with my t128 wheel, and have hit a problem. This game essentially has the untouched wheel code from the game it's remastering, and behaves wrong if you do not have pedals combined. All well and good until I go into Oversteer and... the option's greyed out to combine pedals? Any help would be greatly appreciated! Using the newest versions of the drivers |
I mentioned this earlier, but let's try to keep this thread just for getting the T128 working. I'm almost ready to close this thread, just have to point this driver to the updated |
Is this now "officially" working? :) |
I guess technically not yet, I still haven't merged the module into main. Initially I was a bit scared and wanted to wait a bit to see if anyone popped up with issues I missed, and then I promptly forgot about it. Since no issues have been raised in the meantime, I guess things "unofficially" work and I should do the merge sooner rather than later. Thanks for the ping. |
Oh great, thanks! I was thinking of buying this wheel and wanted to make sure it was supported. Just so I dont buy the wrong one, is it just T128P that works? Does the Xbox version not function? |
Based on the 'subthread' that started with #67 (comment)
the Xbox versions seems to also work. |
Thank you! One more thing, any idea if this works with Trackmania (from steam)? It would be amazing if anybody could test for me, the first few levels are free and I'd really appreciate it, I dont want to buy it and then not br able to use it ❤️ |
Yes, I can try for you tonight if you want 👍 |
Thank you so much, I can really appreciate it! |
Hey, so I tried it and overall it works. I noticed 2 things a bit weird, the force feedback is not very present (like on many games) and also for an unknown reason, it puts question marks on the configuration (but it still recognizes the keys ¯_(ツ)_/¯). I played a small game that you can watch here. (It's the first time I launch the game so I suck lol) |
Amazing, thank you so much! I wasn't even aware trackmania supported force feedback at all. I do appreciate it, tysm!!! |
So I wanted to try this out on nix (I bought the wheel for this), and I can override the source of hid-tmff2, which is currently: src = fetchFromGitHub {
owner = "Kimplul";
repo = "hid-tmff2";
rev = "ca168637fbfb085ebc9ade0c47fa0653dac5d25b";
hash = "sha256-Nm5m5xjwJGy+ia4nTkvPZynIxUj6MVGGbSNmIcIpziM=";
fetchSubmodules = true;
}; And I wasn't quite sure how to do it. Is there a fork of this which I use? |
Am I good to use 0c7a48d? |
That looks rather outdated to me actually, unless I'm wrong. |
EDIT: Now only this is needed (until pkg is updated): boot.extraModulePackages = [
(pkgs.linuxKernel.packages.linux_zen.hid-tmff2.overrideAttrs
(prev: {
src = pkgs.fetchFromGitHub {
owner = "Kimplul";
repo = "hid-tmff2";
rev = "cc4226299569b5a1402c0b937c6b3a2e0f246af4";
hash = "sha256-Hv6eLbf5K9qGhweKHHf7IpZaCFsLMCvC0vxBapQOSpQ=";
fetchSubmodules = true;
};
}))
]; |
Alright, I merged the |
Why not push the submodule update to master too? Otherwise it won't work by default, unless I misunderstand |
Sorry, I don't entirely understand this question. The submodule A clean clone should automatically pull in the correct submodule. I tried it out locally and seemed to work. |
Oh perfect, I thought you were saying you merged that branch without updating the submodule. Ill check the main branch rn! |
Installed fine, rebooting to test... |
It works perfectly!! |
Great! Thanks for checking. I'll be closing this issue then. As always, please feel free to open up new issues for any problems you encounter. |
I've gone through your instructions about capturing packets etc.
I'm willing to work onthisbut I'm not sure how to analyze this.
The text was updated successfully, but these errors were encountered: