T300RS and others FFB Wheel Development

Talk about anything concerning the source code.
InhexSTER
Posts: 19
Joined: Wed Feb 26, 2014 5:56 pm

T300RS and others FFB Wheel Development

Post by InhexSTER » Fri Jul 03, 2015 7:22 pm

Hey,
so as I side project I am looking into developing some stuff for PS4/XB1 wheel compatibility.

I currently own G27, so I was looking into a buying a wheel for new generation.
Since T300RS already being investigated, there is not much point for me getting PS4 wheel.
So I would probably get G920, once its out. Right now XB1 Thrustmaster TX seems like good choice but people say build quality is not so good, but FFB is great.

Meanwhile I started looking into LUFA and firmware's source code and set up environment to compile them.

At the moment I am using Arduino, (Leonardo and Uno) and Arduino USB Serial adapter. I also have USB Host Shield for Arduino.
So another thing I am looking at is making my Uno + USB Shield be wheel connector. It would read/write data to the whee and
send it to my Leonardo through serial connection. It would be possible to use Teensy instead for emulated device.

As a side note, discovered that Windows X64 version of GIMX doesn't detect DS4 for authentication. X86 works.

User avatar
Matlo
Posts: 5015
Joined: Wed Jul 06, 2011 7:01 am
Location: France
Contact:

Re: T300RS and others FFB Wheel Development

Post by Matlo » Mon Jul 06, 2015 12:44 pm

Hi,
InhexSTER wrote:As a side note, discovered that Windows X64 version of GIMX doesn't detect DS4 for authentication. X86 works.
Is the DS4 connected on a USB 3.0 port? Do you have any USB2.0 port to try?
GIMX creator Donate Shop

InhexSTER
Posts: 19
Joined: Wed Feb 26, 2014 5:56 pm

Re: T300RS and others FFB Wheel Development

Post by InhexSTER » Mon Jul 06, 2015 3:28 pm

I've tried both USB 3.0/2.0, I think i saw someone mention same problem in support forum.

Anyways x86 version works fine, and I also tried Raspberry Pi 2 with T300RS firmware and it seems to work
I used a keyboard for now as input.

My Arduino USB shield should arrive today, so I will be writing a sketch to talk to G27, i should be able to figure out FFB on it using Arduino
since Logitech SDK is available and I can test each FFB effect and get all of them captured using sniffer. Not sure if it will work in PC or PS3 mode
when connected to Arduino USB shield. Once that's done I will be trying to map T300RS output reports to G27 , I've noticed you'v'e done some testing already.
Going to go through those notes.

User avatar
Matlo
Posts: 5015
Joined: Wed Jul 06, 2011 7:01 am
Location: France
Contact:

Re: T300RS and others FFB Wheel Development

Post by Matlo » Tue Jul 07, 2015 8:50 am

InhexSTER wrote:Anyways x86 version works fine
Don't you have a huge delay when using the Dualshock 4? Doesn't the connection break after a while?
GIMX creator Donate Shop

InhexSTER
Posts: 19
Joined: Wed Feb 26, 2014 5:56 pm

Re: T300RS and others FFB Wheel Development

Post by InhexSTER » Tue Jul 07, 2015 3:54 pm

Don't you have a huge delay when using the Dualshock 4? Doesn't the connection break after a while?
I had huge delay when trying to map DS4 to emulator, but I've been using keyboard atm and it works fine. I can try DS4 again to make sure.
I know that authentication needs to be done every 10 min or PS4 will disconnect. I am not quite there yet with my G27 arduino sketch.
I've got wheel connected to arduino and enabled native mode, I have to edit my G27 Report strut as it seems not correctly read yet, haven't looked at OUT report yet.

I've got arduino to send start/reset and status commands to emulator firmware, next step is to make sure report is sent back to emulator. And after figure out how to pass DS4
authentication.

User avatar
Matlo
Posts: 5015
Joined: Wed Jul 06, 2011 7:01 am
Location: France
Contact:

Re: T300RS and others FFB Wheel Development

Post by Matlo » Thu Jul 09, 2015 11:08 am

Your goal is to replace the PC with an Arduino?
I think you'll face latency / timing issues. Managing two USB devices and one 500kbps UART at the same time with an Arduino sketch seems impossible to me.
The GIMX firmware manages communications from one USB host and one 500kbps UART at the same time, but it's quite optimized (it's using the UART interrupt, that can't be used in Arduino sketches).
You should consider using a Raspberry Pi!
GIMX creator Donate Shop

InhexSTER
Posts: 19
Joined: Wed Feb 26, 2014 5:56 pm

Re: T300RS and others FFB Wheel Development

Post by InhexSTER » Thu Jul 09, 2015 1:44 pm

Matlo wrote:I think you'll face latency / timing issues. Managing two USB devices and one 500kbps UART at the same time with an Arduino sketch seems impossible to me.
The GIMX firmware manages communications from one USB host and one 500kbps UART at the same time, but it's quite optimized (it's using the UART interrupt, that can't be used in Arduino sketches).
You should consider using a Raspberry Pii
Yeah using RPi is best solution for running GIMX, I have 1st and 2nd version. That's how I would use it now.

You might be right about timing and delays, however I tested it using PC, inputs get passed through, (I had to force ready bool to true for now)
My next step is to figure out how to pass through control packets using Arduino Host Shield Library.

I noticed i get BYTE_CONTROL_DATA (0x44) from emulator with length of 0x48 (72) but i don't actually receive all 72 bytes
it's start with 0x21, 0x09, 0xF0, 0x03 and so on.

InhexSTER
Posts: 19
Joined: Wed Feb 26, 2014 5:56 pm

Re: T300RS and others FFB Wheel Development

Post by InhexSTER » Fri Jul 10, 2015 5:58 pm

Its kinda pushing things (I might have trouble keeping size small enough to fit onto Leonardo), but I was able to merge LUFA and USB Host Shield into one firmware project, removing need for serial.
However at the moment USB Shield library is able to call Init() successfully but there is no data being received or sent from USB devices.
Would be awesome to figure out how to use LUFA for both Host and Device modes, but not sure how to make it work with the Shield MAX3421e controller

InhexSTER
Posts: 19
Joined: Wed Feb 26, 2014 5:56 pm

Re: T300RS and others FFB Wheel Development

Post by InhexSTER » Tue Jul 14, 2015 9:57 pm

Hey, so I've got authentication and inputs working. Now going to start looking into FFB and game wheel settings as well.
Meanwhile will have to try reduce firmware size, as it is its taking about 78% of my Leonardo. Most of it is USB host shield library stuff.
I haven't noticed any particular delays visually so that's good.

User avatar
Matlo
Posts: 5015
Joined: Wed Jul 06, 2011 7:01 am
Location: France
Contact:

Re: T300RS and others FFB Wheel Development

Post by Matlo » Wed Jul 15, 2015 7:59 am

Hi,
Congrats for your progress!
Do you plan to publish your sources?
GIMX creator Donate Shop

Post Reply