- Notifications
You must be signed in to change notification settings - Fork8
Tools to talk to the FANATEC CSL Elite Wheel Base driver
License
gotzl/hid-fanatecff-tools
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
This project helps to access the sysfs functions of thehid-fanatecff driver and aims to connect games with the (extended) features of the CSL Elite Wheel. It isnot needed for force-feedback to work.
Checkout the repository
git clone --recurse-submodules https://github.com/gotzl/hid-fanatecff-tools.git
To get some blinking lights on the wheel, the telemetry data that some games expose is to utilized. This is what thefanatec_led_server.py
is for
cd hid-fanatecff-tools/toolssudo ./fanatec_led_server.py --device 0005 --display speedKmh
Use the PID of your fanatec wheel instead of0005
. Possible values for display aregear (default), speedKmh
.PressCTRL-c
to stop the application.The command starts a thread per supported game and waits for connection to the respective telemetry data. Currently, only a small number of games is supported andeach game requires some additional setup first, see below.
To give unpriviledged users access to the extended features of the wheel, a DBus service is installed which accesses the drivers sysfs.The following calls are currently implemented:
- write display value
- write LED staus
- write load cell value
- tuning menu
In Windows, games access the extended features of the wheel via theFanatec SDK
. Atm, it is unclear to me how to extract the calls of the SDK and how to propagate them through wine, or how to find out how the SDK detects and communicates with the wheel in first place.
However, many games offer telemetry vie UDP or shared memory, which is used byfanatec_led_server.py
. See the following how to setup the games to be able to communicate with it.
AC has a UDP endpoint running per default, nothing todo here :)
Note: AC UDP protocol lacks support for MAX RPMs, so a car database (car_data.json
) is used to look up MAX RPMs for selected car. 9000 RPM is used as a fallback value.
ACC makes use of what's callednamed-mapping
in windows. Thesenamed-mappings
have to be bridged to linux. See thetools/pyacc/README
on how to setup ACC.
AMS2 sends telemetry via UDP. This has to be activated in-game:
Options -> System -> UDP Frequency -> Enabled(A value of 1 to 9)Options -> System -> UDP Protocol Version -> Projects CARS2
PCARS2 sends telemetry via UDP. This has to be activated in-game:
Options -> System -> UDP Frequency -> Enabled(A value of 1 to 9)Options -> System -> UDP Protocol Version -> Projects CARS2
For RF2, there is aplugin that createsnamed-mappings
which has to be installed first (it's a fork ofthis and createsnamed-mappings
directly in/dev/shm/
). The procedure is the same as for usingTinyPedal in Linux. (don't forget to activate the plugin in-game after installation)
F1 X sends telemetry via UDP. This has to be activated in-game, for instance in the pause menu there is a 'telemetry' section. The defaults are sufficient.
Note: F1 X lacks support for TC-in-action/ABS-in-action.
WRC sends telemetry via UDP,see this for full information.To activate and use wiht hid-fanatecff-tools, place a file calledhid-fanatecff-tools.json
in.../My Documents/My Games/WRC/telemetry/udp/
with the following contents:
{"versions": {"schema":1,"data":3 },"id":"hid-fanatecff-tools","header": {"channels": [] },"packets": [ {"id":"session_update","channels": ["packet_uid","shiftlights_fraction","shiftlights_rpm_start","shiftlights_rpm_end","shiftlights_rpm_valid","vehicle_gear_index","vehicle_gear_index_neutral","vehicle_gear_index_reverse","vehicle_gear_maximum","vehicle_speed","vehicle_transmission_speed","vehicle_engine_rpm_current", ] } ]}
and modify thepackets
list in.../My Documents/My Games/WRC/telemetry/config.json
by adding
{"structure":"hid-fanatecff-tools","packet":"session_update","ip":"127.0.0.1","port":20778,"frequencyHz":30,"bEnabled":true }
The specifics for each game are located in python files with their implementation offanatec_led_server.Client
class. Each file can by run on its own, although the defaults for thedevice
may not match your device.If you want to add a game, easiest would be to follow an existing game that uses the same technique and start from there. Then add it in the main function offanatec_led_server.py
.
About
Tools to talk to the FANATEC CSL Elite Wheel Base driver