Coder Social home page Coder Social logo

darknao / btclubsportwheel Goto Github PK

View Code? Open in Web Editor NEW
83.0 18.0 28.0 40.19 MB

ClubSportWheel Bluetooth Controller

License: GNU General Public License v2.0

Makefile 0.05% Python 0.98% C++ 68.85% C 28.17% Assembly 0.05% XC 0.06% XS 0.05% Shell 0.14% Objective-C 1.64%

btclubsportwheel's Introduction

btClubSportWheel

ClubSportWheel USB Controller

This firmware can convert any Fanatec CSW Steering Wheel to a standalone USB version, so you can use it with any other wheel base, like an OpenSimWheel (OSW).

It'll also be possible to add a bluetooth module to go wireless and get rid of the USB cable (deprecated).

Supported Hardware

This firmware has been developed and tested on a Teensy 3.1 and Teensy LC but should work with any other compatible hardware.
The only requirement so far, is at least 1 SPI connectivity available.

The Teensy-LC is a good choice for this project as it has a small size & price.

Note on the Bluetooth version

I don't recommend the bluetooth version for now.
It's still a work in progress, and there is a few issues with Fanaleds, occasionally inducing some input lags, and an incompatibility with Windows 10.

If you don't plan on using Fanaleds or want to try it anyway, then go ahead.

update: The bluetooth version is now deprecated as I was unable to find any reliable bluetooth module that suit my needs.
You can still use it if you want, but no further development will be done on this side.

Shopping List

USB version

  • Fanatec CSW rim (obviously)
  • Teensy LC : ~12$

Bluetooth upgrade

Total price for full BT conversion : ~60$

If you don't want to salvage the existing connector in your rim, you'll need a JST 2.0mm PH Female Connector (12-Pin for the Universal Hub, 8-Pin for all other rims).

Pinout & schematics

Fanatec Plug

Fanatec Round Plug

  1. MISO
  2. MOSI
  3. GND
  4. 5v
  5. GND
  6. SCK
  7. 3v3
  8. CS
  9. USB charge 5v*
  10. DataPort1*
  11. USB charge GND*
  12. DataPort2*

** These pin are only used on the Universal Hub and don't need to be connected for this conversion*

Matching pin for Formula / BMW / Porsche

Porsche plug pinout

Matching pin for Universal Hub / CSL P1

UNI Hub pinout

Wiring Schematics

Wiring schematics This is the same schematics for Bluetooth and USB version.
Just forget about the Adafruit Power Boost (upper left) and the Bluegiga WT12 (bottom right) for the USB version.
There is also room for 8 extra buttons on pin 2 to 9 (common ground) if you need more inputs.

Bluetooth WT12 specifics

Before flashing your Teensy, you'll need to configure the WT12 module by following this howto.

Compatible Wheels

All CSW / CSL rims are working with this conversion. That includes:

  • BMW M3 GT2
  • Formula Black/Carbon
  • Porsche 918 RSR
  • Universal Hub (both version)
  • CSL P1 (both version)

Special note for the Universal Hub and Extra buttons

The Universal HUB brings you no more than 38 buttons (46 with the extra). The Windows Control Panel will only show you 32, but don't worry, every modern DirectX games can go up to 128.

If you need to test all of them, I suggest you to use JoystickTest as it can see them all.

Software/Driver Required

This is detected has a HID device on Windows, so no specific drivers are required.
It's is fully compatible with Fanaleds, which is required to get all feedback indicator working (LEDs, display and motors, if any).
Alternatively, you can use SLIMax Manager Pro, which is free if used with any Fanatec wheel.

Supported wheel features

Well... Everything.

Precompiled firmware

You'll need the Teensy Loader to flash these firmwares.

Teensy 3.1 & 3.2 : USB | Bluetooth
Teensy LC : USB | Bluetooth

Firmware Building Instruction

This code is based on Teensyduino framework and all required libraries are included in this repo.
Modify the TEENSY and TYPE variables in Makefile to reflect your needs.
Use make to build the HEX file, then use the Teensy loader to flash the firmware.

Contribution

There is a lot of room for improvement, so if you want to contribute, you're welcome to fork this project, and send me a pull request.

Donation

If you like this project and want to support it, or just want to pay me a beer or two ;)
[paypal]

btclubsportwheel's People

Contributors

darknao avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

btclubsportwheel's Issues

need some help, wasn't sure how to contact you directly

i can't seem to get my teensylc to even power the mclaren wheel. the screen won't even come on and usb doesn't recognize it at all.

is there a new different pinout for the wheel? can anyone share if so?

Configuration (please complete the following information):

  • Wheelbase:osw
  • Rim: [mclaren
  • Teensy Board: lc
  • Firmware type: usb
  • Firmware version, if known: oct mclaren firmware

Additional context
the mac recognizes the Teensy LC as clubsport wheel darknao, so it looks like the TeensLC works fine. This leads me to believe the mclaren wheel really does have a different pinout. I can't find it online, though.

Fanatec to Fanatec

Hello
have a Fanatec Base, and I would like to know if your project works if I connect it directly to a Fanatec base?
I would like to use other hoops, but maybe it does not work
regards

DIY arduino steering wheel to fanatec wheelbase

Hi!
I have exactly the opposite problem that this project solves..
I recently bought a broken fanatec CSW V2.0 wheelbase and fixed it, (so it seems)
but, I don't have a fanatec steering wheel, and I planned on making my own.
I now get positional information from the wheel in fanatec's game driver, but in order to get force feedback I believe I need to have a steering wheel attached.
the plan is to use an arduino to communicate over SPI with the base, to fake a steering wheel.
once that is working, I'd also want to send the 'recalibrate center position' message over SPI, to recenter the wheelbase, as is usually needed after firmware upgrade of the base. (I don't know if this is a special recalibration message, or just an SPI message of the two buttons being pressed at the same time)
(last thing would be to have buttons working!)

I am definitely going to have a lot of problems writing this code by myself.. I might not be skilled enough. it sure seems like quite a lot of code that is needed for this project to work!
Any information would be greatly appreciated. IE, about the SPI communication protocol. Any chance that I can simply fake a wheel by resending the same message over SPI..? (fingers crossed)
How does the recalibration function work?
Anyone ever attempted anything like this?

thanks so much :)
-Shachar

Wheel Emulator pinout

Hi, i don't see any information about wheel emulator pinout, can You explain how i must connect teensy 3,2 to Fanatec QR ?

Unreadable

Im trying to load csw.teensyLC_USB_EXTRA.hex to tweensy lc but getting 00:20:43.619: Open File event
00:20:51.141: ihex: parse error line 1.

Any Ideas?

Cheers Paul

Problem McLaren Clutch

Describe the bug
A clear and concise description of what the bug is.

Configuration (please complete the following information):

  • Wheelbase: [e.g. OSW]
  • Rim: [e.g. BMW GT2, Formula]
  • Teensy Board: [e.g. LC, 31 or 32]
  • Firmware type: [e.g. BT, USB]
  • Firmware version, if known: 08062018

Additional context
Add any other context about the problem here.
After a while, the clutch is gone. In the game, in the win game controller and in the diview. Disconnect and reconnect, then it's time again. Until it fails

Teensy-lc Custom Firmware for Fanatec Wheel conflicting with CSPv3 driver

Hello.
First of all - big thanks for this project. I did select this as my path for converting all my fanatec gear for OSW and it's working really well, except I'm experiencing an issue, where when I open Fanatec Wheel game controllers applet proprty page, with now (after real fanatec base has been removed) basic Windows controller driver user interface with buttons and axis, which all work fine, but if i leave and enter Fanatec ClubSport Pedals pages, I now would get also the basic window driver pages, not the pretty and with additional configuration options pages/firmware updates dialogs installed with fanatec wheel driver for the pedals.
This also creates an issue with the pedals in some games, thus it forces me to always make sure that fanatec driver is what I get any time I load Fanatec Pedals property pages.
This can be worked around by uninstalling and reinstalling fanatec driver and not entering Fanatec Wheel (teensy connected hub) basic property pages. For once you enter Fanatec Wheel properties (which will often be the full fanatec driver broken interface) and then access the pedals, they will get the basic driver UI again and would need fanatec driver reinstallation to rake place.
Is there any way that yourself, or someone who knows the process could update your custom firmware, so that it would not be conflicting with installed fanatec wheel driver used by the pedals? I assume it's an issue either because of the Fanatec Wheel naming or perhaps even a matching GUID of the fanatec real wheel in the firmware -I'm only guessing.
I have very limited knowledge or coding skills, but if there was a template/and an obvious enough way to obtain and make edits to your otherwise great teensy-lc usb firmware and compile it, I'd be up for it myself.
Apologies about the long report and slightly odd sentence structure.

t3_wheel_emu adaption for Teensy 4.0

Hello @darknao

first of all, i want to thank you for this amazing work..
As the market situation atm is not favorable for a teensy 3.x , i was thinking about buying an available 4.0 Version.

So my question is, if your t3_wheel_emu in the dev-tool folder can be transfered to the 4.0 Version..

Thanks in advanced,

cheers
Shane

Leds Formula Carbon/ BMW don't work or leds low intensity

Hi darknao,
I built the adapter and I have this problem:
The display LEDs do not light up or the light intensity stands out very low.
My configuration is:

  • Wheelbase: OSW
  • Rim: BMW GT2, Formula Carbon
  • Teensy Board: Teensy LC
  • Firmware type: USB
  • Firmware version, if known: TC USB V1.2
    Thanks

Wheel not suported

Hello, I've got a problem with my wheel base with is Fanatec CSL Elite, it doesn't recognize a Teensy LC as a wheel. I have programed a Teesny with you .hex file and checked wiring couple times. I connect Teensy to wheel base with 1.04mm cooper wire as pins and soldered them to wires. Everything looks fine but it doesn't working. Can you please help me? I only want to activate force feedback, that's all.

Configuration :

  • Wheelbase: CSL Elite
  • Rim: -
  • Teensy Board: Teensy LC
  • Firmware type: USB
  • Firmware version, if known: 684

Fanatec
1635021874895
IMG_20211023_223412_1
IMG_20211023_224122
IMG_20211023_224130

SPI Communications

Describe the bug
This isn't a bug, but an inquiry about the SPI communications.

Configuration:

Not applicable

Additional context

I'm working on a related type of project, and had been preparing to handle the SPI signals with great respect, as I see you had configured it to run at 12 MHz in this code.

But I recently probed a wheel connected to a base, and observed the actual SPI clock speed was much slower, like ~470 kHz.

Does this frequency vary among the different generations of base units? Or did you just decide to run the SPI in the project at a high speed?

Tangentially related, has anyone hacked the protocol for displaying stuff on the small graphical LCD (OLED?)

-Chris

TeensyLC USB not working with newest firmware Mclaren GT3 V1

Describe the bug
TeensyLC USB not working with newest firmware Mclaren GT3 V1.
With Pointy's Joysticvk Test it does very strange things when I use the rotate buttons and sometimes all the buttons flickers.
I think it's becouse of the newest firmware on the GT3 wheel but I can't downgrade now becouse I've sold the Fanatec Hub.

  • Wheelbase: [Simucube]
  • Rim: [Mclaren GT3 V1]
  • Teensy Board: [LC]
  • Firmware type: [USB]
  • Firmware version, if known:

Does anybody have this problem?

Formula rim has an issue with new beta firmware.

Describe the bug
A clear and concise description of what the bug is.

Configuration (please complete the following information):

  • Wheelbase: OSW
  • Rim: Formula
  • Teensy Board: LC
  • Firmware type: USB
  • Firmware version, if known: v1.2 beta.1 and v1.1

Additional context
Keep disconnecting issue occurs.
LEDs and 7-Seg. displays are stuttering.

It worked well before these updates.

please refer to the videos below.

https://youtu.be/SHrc0STXTC8

https://youtu.be/yca_6G5BIXQ

BTW, Thank you very much for this superb firmware!

teensy 4 wont program

anyone have any clue how to program to a 4.0 board?

i tried teensyloader and also the teensyduino forked project both no go.

thanks

HID Set for BT

Hello,
can you please extend the HID set command for the McLaren GT3?
I have only 37 inputs at the moment.
Have the WT32i and it works very well.

Thank you
Ronny

Wrong button presses registering

I appear to be having a problem with the wrong button presses registering. I am using a Fanatec Clubsport BMW GT wheel in Windows 10.

For example If I shift up (button 16) with the shifter it sometimes registers the purple button (4) being hit .

The problem also appears when I use the little joystick on the right of my wheel. If I hold the joystick in one position and look at the Windows diagnostic tool for the joystick, I can see it also is triggering a bunch of other buttons. Several different buttons flash on and off while holding the joystick in position.

Invalid crc

Hello,

Nowhere in your code do I see anything that prevents the sending of a frame without a valid crc?
i.e.
The "loop function" can be interrupted -by spi- before it has reached the crc calculation function, therefore the frame could reflect new button states without a valid checksum.

::

I ran into this problem myself when trying to emulate a Thrustmaster SF1000 wheel, which uses a checksum as well.

If you allow the frame to be altered during an spi transaction (after each byte sent, the interrupted function resumes) , the checksum will always be wrong.
(Emanating in erroneous "DPAD-UP" events on the Thrustmaster platform)

My solution was to only calculate the checksum at the moment chip-/slaveselect went low (i.e. when the base is polling for a frame).

In my case I had to do it within 6 us, and had to revert to inline assembly to circumvent compiler "optimisations", on an atmega328p running at 8MHz internal clock, at 2v9, before sending out the next byte.

NB
From what I read in your code, you have (had) problems with CRC errors.
I think my remarks could put you in the right direction solving them.

Kind regards,
Chris

Podium Racing Wheel F1

Any chance of getting this to work with the new Podium F1 Racing Wheel? Buttons and Ecoders do nothing..

Where to buy Fanatec Pins

Describe the bug
This is not a bug per se, but more a place in which I am looking for people that could help me find solutions

Configuration (please complete the following information):

  • Rim: BMW GT2

Additional context
So as I state, I am looking for pin replacements for my Fanatec wheel because they broke, and I was looking if anyone managed to buy them or reproduce them somehow, without having to pay the 100 euros to fanatec for one of the extra quick release modules.

Any help in this regard is welcome.

BT version

Hello,
Is it possible to use a bluetooth module other than the Bluegiga WT32 as it is currently discontinued.
What other alternative would be the best bluetooth module for this project?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.