oversteer
oversteer copied to clipboard
Support for Fanatec Wheels / DD1
Hey,
i have a Fanatec DD1 Wheel with Formula V2 and Porsche GT3R. I am helping here: https://github.com/gotzl/hid-fanatecff/issues/9 to make the ffb working on linux. The wheel itself works. Would be great if we could make your tool work for that device, too.
Regards
Hi.
Yes, that would be great. I'll have to change the tool description but that's no problem.
Features using the evdev API should already work as long as the Fanatec module supports them.
Other features are only supported through SysFs and supposedly those are module specific. But if you used the same SysFs entries it would just work.
The most important SysFs already in the Logitech in-kernel module are:
- alternate_mode: in case the wheel supports compatibility modes.
- range: changes the wheel rotation range.
- combine_pedals: in case the module supports combining pedals in one axis.
- leds/*: this uses a standard led API in Linux to control the wheel LEDs.
You can replicate these entries and create new ones if the module can be configured in other ways. Oversteer already supports some more entries mainly for FFB control, these entries are used by https://github.com/berarma/new-lg4ff but I'm not sure if these will ever get accepted by the Linux kernel maintainers.
If everything is working in the module is just a matter of including the vid:pid so that Oversteer recognizes the wheel.
Hey, i am not a linux-coder. So i have no idea how and where to start. I am an experienced linux-user- web developer (php/JavaScript, etc.) and a simracer since a decade. I need some guide to follow. The Fanatec-Driver is been done by another guy i found on github and asked for DD1 support and offered testing.
I'll take a look at that project and see what needs to be done. I'm also interested on Fanatec wheels working on Linux. Who's not?
I've added the Fanatec models supported by the hid-fanatec
module. I can't test them so they might not work correctly but at least now they should be recognized.
I'm not sure how to handle the pedals. It's a different device but Oversteer handles wheel and pedals as one device. This might require more changes. For now they are ignored.
Currently my pedals are plugged into my dd1 wheelbase, so for the kernel it is one device. i can also plug them as usb seperately. Lets discuss how the best way might look like. I will give it a try asap.
i cloned the git repo and followed the instructions and then i ened up like this:
ninja -C build run
ninja: Entering directory `build'
[0/1] Running external command run
Traceback (most recent call last):
File "/tmp/oversteer/build/bin/oversteer", line 53, in
I'm sorry. There has been changes to the config file and I haven't implemented a proper update mechanism yet.
Delete the file at .config/oversteer/config.ini
in your home folder and it will work.
Currently my pedals are plugged into my dd1 wheelbase, so for the kernel it is one device. i can also plug them as usb seperately. Lets discuss how the best way might look like. I will give it a try asap.
I didn't know they could be connected to the wheelbase. I think that's the best option. When using them independently they are like a 2-3 axis joystick.
So it works here and there, not very stable but here is the feedback. pressing the brake shows the clutch graphics. pressing the cluch shows the Accel graphics pressing the acceleration pedal shows the brake graphics all three blue bars have 3 states only tine orange bottom line which seems to be default, which is on each.
its behaviour is inconsistantly weird. it varys from a blue bar anywahre fromn 10 to 100% and then sticks there until i fully release it. it shows no in between values, almost like been digital.
on the bottom there are way to few buttons for my fanatec formula v2 stuff. on button gives an error in the shell:
ninja -C build run ninja: Entering directory `build' [0/1] Running external command run Exception in thread Thread-2: Traceback (most recent call last): File "/usr/lib/python3.9/threading.py", line 954, in _bootstrap_inner self.run() File "/usr/lib/python3.9/threading.py", line 892, in run self._target(*self._args, **self._kwargs) File "/tmp/oversteer/oversteer/gui.py", line 428, in input_thread self.process_events(events) File "/tmp/oversteer/oversteer/gui.py", line 419, in process_events self.ui.safe_call(self.ui.set_btn_input, button, event.value, delay) UnboundLocalError: local variable 'button' referenced before assignment
it asks for udev rules on every start? Is it because i am testing it before installing?
the blue steering bar works analog and smoothly, but its not centered and far off. logitech and fanatec devices support range set by application. there should be several options:
auto //application decides wheel-lock X degrees (slider) and then a) send the degress to the driver or b) soft-lock the wheel with a simulated spring
the force feedback test run well only first time after app start, second time failed on last step.
For the force feedback sliders (Autocenter strength) there is a slider but no apply button and it seems to have no effect
Under tools "Center Wheel" is useable but seems to do nothing
Wheel range display: only option is "Never" FFB Meter is greyed Enable wheel buttons, greyed too
Controls tab
Compatibility mode greyed Rotation range seems to work between 900 and 1080, but its not moveable Combine Pedals is forced to "None"
DD1 + Formula V2 Wheel Buttons / Axis!
Wheel Axis 1 (x) x fully left is -32767 x fully right is 32767 independend of the setted degree lock the dd1 + formula v2 has 11 axis
Clutch 2 (y) clutch untouched is 32767 (inverted obviously) clutch fully pressed -32767
Brake 6 clutch untouched is 32767 (inverted obviously) clutch fully pressed -32767
Gas 3 clutch untouched is 32767 (inverted obviously) clutch fully pressed -32767
my left analog stick movement is not detected, but if you click it, that button works
on the right side my stick is a digital one which appear as analog axis with 2x +32767 and -32767 on two axis (9+10) and you can spin it which appear as two buttons one to the left and one to the right.
Can you read what kind of wheel is attached to the dd1? Currently i have attached this one: https://fanatec.com/eu-de/lenkraeder/clubsport-steering-wheel-formula-v2
but i also own this one: https://fanatec.com/eu-de/lenkraeder/podium-lenkrad-porsche-911-gt3-r-wildleder
So it works here and there, not very stable but here is the feedback. pressing the brake shows the clutch graphics. pressing the cluch shows the Accel graphics pressing the acceleration pedal shows the brake graphics
That was expected and easy to fix.
all three blue bars have 3 states only tine orange bottom line which seems to be default, which is on each.
its behaviour is inconsistantly weird. it varys from a blue bar anywahre fromn 10 to 100% and then sticks there until i fully release it. it shows no in between values, almost like been digital.
That's probably because the Fanatec pedals have a higher range, I'll have to adjust for that.
it asks for udev rules on every start? Is it because i am testing it before installing?
No, that's because there's something wrong in the udev rules.
the blue steering bar works analog and smoothly, but its not centered and far off. logitech and fanatec devices support range set by application. there should be several options:
auto //application decides wheel-lock X degrees (slider) and then a) send the degress to the driver or b) soft-lock the wheel with a simulated spring
Right now I can only send the degrees to the driver.
the force feedback test run well only first time after app start, second time failed on last step.
I'll try to reproduce it.
For the force feedback sliders (Autocenter strength) there is a slider but no apply button and it seems to have no effect
The driver should implement this feature.
Under tools "Center Wheel" is useable but seems to do nothing
That's because autocenter doesn't work.
Wheel range display: only option is "Never" FFB Meter is greyed Enable wheel buttons, greyed too
Controls tab
Compatibility mode greyed Rotation range seems to work between 900 and 1080, but its not moveable Combine Pedals is forced to "None"
Anything that is not supported by the driver is disabled. Changing the wheel range should work but it seems there's some error in the udev rules.
my left analog stick movement is not detected, but if you click it, that button works on the right side my stick is a digital one which appear as analog axis with 2x +32767 and -32767 on two axis (9+10) and you can spin it which appear as two buttons one to the left and one to the right.
Your wheel has a lot of axis and buttons, I'll have to find a way to map them. Although I'm not sure we need it since Oversteer doesn't do anything with them except showing their press/release status.
There's an added complexity since the same wheelbase can mount different wheel models with different axis/buttons layouts. And there's no way to know which wheel is connected.
I'll see what can be done to accomodate different wheel models but for now we're limited.
Can you read what kind of wheel is attached to the dd1?
I don't know how this can be done. I guess the driver should provide this info.
Thanks for the feedback.
great. thanks for commenting on this. let me know if there will be something to test out.
maybe it should be more genereic? What about looping about all axis and buttons and just numbering them like its been done on the gamepad setting in the plasma desktop. that way you would not have to name them accel/brake, etc. Axises, Buttons and just the value or a test-led like you have now.
Great work, my CSL Elite is detected now as well. Is there anything else you'd like to get from the driver?
And there's no way to know which wheel is connected.
I've actually maybe found a register with the wheel id, it's now exposed as wheel_id
if you want to do s.t. with it ...
For the force feedback sliders (Autocenter strength) there is a slider but no apply button and it seems to have no effect
The driver should implementing this feature.
Hmm.. Not sure if this is a feature the wheel base provides. At least in the Fanatec driver I don't remember seeing s.t. like that.
Do you intend to make hid-fanatecff-tools more generic?
Not in the near future. Right now it's just for testing and to play around...
Great work, my CSL Elite is detected now as well. Is there anything else you'd like to get from the driver?
I try to implement features in Oversteer in a way that adapts to what the driver/wheel can do. Just implement whatever you can that might be useful.
And there's no way to know which wheel is connected. I've actually maybe found a register with the wheel id, it's now exposed as
wheel_id
if you want to do s.t. with it ...
Is there a list of wheel ids with model names?
For the force feedback sliders (Autocenter strength) there is a slider but no apply button and it seems to have no effect The driver should implementing this feature. Hmm.. Not sure if this is a feature the wheel base provides. At least in the Fanatec driver I don't remember seeing s.t. like that.
Logitech wheels have an autocenter command apart from the spring effect. I can try to implement a workaround in case the driver/wheel doesn't have this feature but has a spring effect type.
Fanatec wheels have some features that will require some bigger changes in Oversteer. And then I'll need some help for testing them. That's OK but I'll need help from you, Fanatec users.
Thanks @gotzl for your work on that driver. I'll be looking for a good deal to buy a Fanatec wheel in Europe. ;)
i will help as much as i can, i also contacted fanatec and see if we get their support, too.
Tried latest version which seems to have some Fanatec-Fixes.
Getting this issue on:
ninja -C build install
Compiling python bytecode... Listing '/usr/local/lib/python3.9/site-packages/oversteer'... Can't list '/usr/local/lib/python3.9/site-packages/oversteer'
It still asks to install the udev rules on every start. pedals and wheel range display still not working correctly, same behaviour as before.
We three might go and open a discord channel for quick communication.
It still asks to install the udev rules on every start.
Can you post the contents of the /sys/module/hid_fanatec/drivers/hid\:ftec_csl_elite/XXXX:XXXX:XXXX.XXXX/
directory?
pedals and wheel range display still not working correctly, same behaviour as before.
It's not complete but wheel and pedals should display correctly. There was a bug checking for the vendor id. It's fixed in the latest commit.
We three might go and open a discord channel for quick communication.
OK, I will join. Also, I don't mind keeping conversations on focused issues here.
sascha@saschacomputer ~> sudo cat /sys/module/hid_fanatec/drivers/hid:ftec_csl_elite/* cat: '/sys/module/hid_fanatec/drivers/hid:ftec_csl_elite/0003:0EB7:0006.000F': Ist ein Verzeichnis cat: '/sys/module/hid_fanatec/drivers/hid:ftec_csl_elite/bind': Keine Berechtigung cat: '/sys/module/hid_fanatec/drivers/hid:ftec_csl_elite/module': Ist ein Verzeichnis cat: '/sys/module/hid_fanatec/drivers/hid:ftec_csl_elite/new_id': Keine Berechtigung cat: '/sys/module/hid_fanatec/drivers/hid:ftec_csl_elite/uevent': Keine Berechtigung cat: '/sys/module/hid_fanatec/drivers/hid:ftec_csl_elite/unbind': Keine Berechtigung sascha@saschacomputer ~ [1]> sudo cat /sys/module/hid_fanatec/drivers/hid:ftec_csl_elite/0003:0EB7:0006.000F/* 21 cat: '/sys/module/hid_fanatec/drivers/hid:ftec_csl_elite/0003:0EB7:0006.000F/display': Keine Berechtigung cat: '/sys/module/hid_fanatec/drivers/hid:ftec_csl_elite/0003:0EB7:0006.000F/driver': Ist ein Verzeichnis cat: '/sys/module/hid_fanatec/drivers/hid:ftec_csl_elite/0003:0EB7:0006.000F/hidraw': Ist ein Verzeichnis cat: '/sys/module/hid_fanatec/drivers/hid:ftec_csl_elite/0003:0EB7:0006.000F/input': Ist ein Verzeichnis cat: '/sys/module/hid_fanatec/drivers/hid:ftec_csl_elite/0003:0EB7:0006.000F/leds': Ist ein Verzeichnis hid:b0003g0001v00000EB7p00000006 cat: '/sys/module/hid_fanatec/drivers/hid:ftec_csl_elite/0003:0EB7:0006.000F/power': Ist ein Verzeichnis 1080 �� 9%5F;eu��e%E )lu�|� 0 2 5 1'��G��u�� 3 4�%5�E�� 6&�5F��� 7�%5�E��� �� ��� �� 99 9 9%5F;eu��e%E )?u�@� 0 1 2 3 4 5 6 6'��G��u� 7 7 7 7�%5�E��� �� ��� :��� ;&�5F��?�� �?��cat: '/sys/module/hid_fanatec/drivers/hid:ftec_csl_elite/0003:0EB7:0006.000F/subsystem': Ist ein Verzeichnis DRIVER=ftec_csl_elite HID_ID=0003:00000EB7:00000006 HID_NAME=Fanatec FANATEC Podium Wheel Base DD1 HID_PHYS=usb-0000:0b:00.3-3.2/input0 HID_UNIQ= MODALIAS=hid:b0003g0001v00000EB7p00000006 0x0000
Wheel range display is fine now. pedal range display works, but it only uses roughly 50% of the space.
like so:
I think my udev rule overwrites your udev rule. The driver installs /etc/udev/rules.d/99-fanatec.rules
. Try to rename that file to 10-fanatec.rules
(I did not check, but this number should be less than what oversteer installs).
I think my udev rule overwrites your udev rule. The driver installs
/etc/udev/rules.d/99-fanatec.rules
. Try to rename that file to10-fanatec.rules
(I did not check, but this number should be less than what oversteer installs).
That shouldn't be a problem, the files have different names so they will both run. The order isn't important.
I've noticed now that the driver name is ftec_csl_elite
, that's one reason my udev rules won't work. I'll fix it now. But...
/sys/module/hid_fanatec/drivers/hid:ftec_csl_elite/0003:0EB7:0006.000F/display /sys/module/hid_fanatec/drivers/hid:ftec_csl_elite/0003:0EB7:0006.000F/driver /sys/module/hid_fanatec/drivers/hid:ftec_csl_elite/0003:0EB7:0006.000F/hidraw /sys/module/hid_fanatec/drivers/hid:ftec_csl_elite/0003:0EB7:0006.000F/input /sys/module/hid_fanatec/drivers/hid:ftec_csl_elite/0003:0EB7:0006.000F/leds /sys/module/hid_fanatec/drivers/hid:ftec_csl_elite/0003:0EB7:0006.000F/power /sys/module/hid_fanatec/drivers/hid:ftec_csl_elite/0003:0EB7:0006.000F/subsystem
Why there's no range
entry nor wheel_id
entry? There's something I'm not getting right.
According to the source code of the Fanatec driver all these should exist:
static DEVICE_ATTR(range, S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH, ftec_range_show, ftec_range_store); static DEVICE_ATTR(wheel_id, S_IRUSR | S_IRGRP | S_IROTH, ftec_wheel_show, NULL); static DEVICE_ATTR(display, S_IWUSR | S_IWGRP, NULL, ftec_set_display); static DEVICE_ATTR(RESET, S_IWUSR | S_IWGRP, NULL, ftec_tuning_reset); static DEVICE_ATTR(SLOT, S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH, ftec_tuning_show, ftec_tuning_store); static DEVICE_ATTR(SEN, S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH, ftec_tuning_show, ftec_tuning_store); static DEVICE_ATTR(FF, S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH, ftec_tuning_show, ftec_tuning_store); static DEVICE_ATTR(DRI, S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH, ftec_tuning_show, ftec_tuning_store); static DEVICE_ATTR(FEI, S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH, ftec_tuning_show, ftec_tuning_store); static DEVICE_ATTR(FOR, S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH, ftec_tuning_show, ftec_tuning_store); static DEVICE_ATTR(SPR, S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH, ftec_tuning_show, ftec_tuning_store); static DEVICE_ATTR(DPR, S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH, ftec_tuning_show, ftec_tuning_store); static DEVICE_ATTR(BLI, S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH, ftec_tuning_show, ftec_tuning_store); static DEVICE_ATTR(SHO, S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH, ftec_tuning_show, ftec_tuning_store);
I have the following:
the driver installes 99-fanatec.rules your installs 99-logitech-wheel-perms.rules
if i cancel oversteers question to install the rules it works anyway. it seems that the detection has a bug.
i ve just seen that you have languages available for oversteer and german is missing. i am a german native, so if you hand me over some translation files i can fill it for you.
i ve just seen that you have languages available for oversteer and german is missing. i am a german native, so if you hand me over some translation files i can fill it for you.
Great. Now I'm changing a lot of things so maybe wait until the next release is ready. This could be in its own issue so I can find it when the time comes.
Wheel range display is fine now. pedal range display works, but it only uses roughly 50% of the space.
Are you sure the values go all over the range [-32767, 32767] or rather [0, 32767]?
regarding to my plasma/kde gamecontroller tool they do, yes.
I just created this discord server. not setup anything yet, but smalltalk might work better there.
https://discord.gg/K2dJKtNb
From Gonzo:
sudo ls -l /sys/module/hid_fanatec/drivers/hid:ftec_csl_elite/0003:0EB7:0006.000E/
insgesamt 0
-r--r--r-- 1 root root 4096 27. Jan 13:47 country
--w--w---- 1 root root 4096 27. Jan 13:47 display
lrwxrwxrwx 1 root root 0 27. Jan 13:46 driver -> ../../../../../../../../../bus/hid/drivers/ftec_csl_elite
drwxr-xr-x 3 root root 0 27. Jan 13:46 hidraw
drwxr-xr-x 3 root root 0 27. Jan 13:46 input
drwxr-xr-x 11 root root 0 27. Jan 13:46 leds
-r--r--r-- 1 root root 4096 27. Jan 13:47 modalias
drwxr-xr-x 2 root root 0 27. Jan 13:47 power
-rw-rw-r-- 1 root root 4096 27. Jan 13:47 range
-r--r--r-- 1 root root 4096 27. Jan 13:46 report_descriptor
lrwxrwxrwx 1 root root 0 27. Jan 13:46 subsystem -> ../../../../../../../../../bus/hid
-rw-r--r-- 1 root root 4096 27. Jan 13:46 uevent
-r--r--r-- 1 root root 4096 27. Jan 13:47 wheel_id
According to the source code of the Fanatec driver all these should exist: ....
All the 'capital' sysfs files are only present for CSL Elite. These sysfs files represent registers in the wheels' so called 'Tuning Menu'. The CSL Elite has 5 slots to store wheel settings.
The DD* wheelbase probably has a similar functionality, but I did not yet implement/reverse engineer it.