-
Notifications
You must be signed in to change notification settings - Fork 17
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 |
Force feedback and all? |
So far no issues whatsoever! Just like on windows |
Sounds promising. Thanks everyone who participated in this thread for your help so far! I'm going to continue looking into the HID->USB conversion for If/when you encounter any problems with the T128 not related to the initialization driver (wonky FFB, games not detecting it, stuff like that), please feel free to open up new issues. |
Hey, first of all thanks to everyone who took part in the project. I'm glad it worked out for you but I don't understand exactly how you did it 😅. I understand that there are several drivers to install? Would it be possible to make a summary of which drivers need to be installed for the steering wheel to work? And also the drivers only work with native games or also with proton? Thank you in advance for your help and your remarkable work :) |
Hi, here's what you need to do at the moment. |
Oh and also, from my testing PCSX2 (a linux app) works, but also Need for Speed Most Wanted (a windows game) and Assetto Corsa (another windows game). So both work. |
Well put @doghog125. Just to add, Proton games use the same force feedback subsystem as native games, so both proton and native games should work. I'll also stress that the installation procedure is temporary, eventually I'd like to merge the T128 support into main so installation follows the same procedure for all wheels, consider T128 support very early alpha for now. Of course, issue reports are very much appreciated even in this stage. |
It's a damn good alpha. Thanks so much for this support. You're making racing games on linux so much better with this project! |
Okay thank you for your answers, it works very well for me but if I have any problems, I'll report them in order to move the project forward :) |
Hi, just have a question. Should the LED lights on the wheel work or is that model specific info? |
Hello again, apologies for the long delay. I unfortunately wasn't able to figure out a way to make one driver handle both raw USB devices and HID devices, so I've finally thrown in the towel and now I'm experimenting with just having two modules, simple as. The HID driver can still reuse most of the USB driver, so I guess this isn't the end of the world, but still a bit annoying. Anycase, I've pushed a commit that splits |
Hey, I'm sorry for the time without response. I retested the drivers with your modifications but I have an error now :/ Here is the whole error I got: https://pastebin.com/GFVZ8RD9 Thanks for your work :) |
I pushed Kimplul/hid-tminit@70867d3, pretty sure I just forgot to include |
Hey, I just retested the driver with your modifications but I still have errors. I don't know if there is something I'm doing wrong but it's not working 😅. I followed the instructions in @doghog125's post Here is everything I did: https://pastebin.com/K1Bt7tKe |
Nothing wrong with how you're doing things, apparently there's just some difference between Mint and Debian wrt. include handling, I spun up a Mint VM and I was able to reproduce. I just added the missing Just out of interest, I had a look at the include file dependencies and apparently |
Hi, Just found this repo and it looks like great work! Something I don't understand is that at the moment when I plug my wheel in using standard kernel drivers, the device is recognised in dmesg/lsusb and the wheel spins. Oversteer doesn't recognise it though. Does this mean I need to use this driver instead of the default one? |
Hi @b0ggyb33, the in-kernel Thrustmaster drivers just handle basic button inputs and nothing else. For force feedback, range setting, and so on, you will need to use this driver, yes. |
Thanks for clearing that up! |
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 |
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: