Jump to content

F1 2018 UDP Specification

Recommended Posts


Good morning @hoo 

I made a dashboard with SimHub to help commentators on my league. It gives a lot of information and one is inconsistent, I think because the data.

m_tractionControl  is not 0 when driver is in pitting area, even if traction control is off in the game. Is this a fail or is because real cars uses TC on pit area?


Share this post


Link to post
Share on other sites

Good morning @hoo 

I made a dashboard with SimHub to help commentators on my league. It gives a lot of information and one is inconsistent, I think because the data.

m_tractionControl  is not 0 when driver is in pitting area, even if traction control is off in the game. Is this a fail or is because real cars uses TC on pit area?


This might be when the car is under animation control during certain parts of the pitting sequence? To maintain consistency in your stats, I would suggest ignoring player telemetry data when in the pit lane.

Share this post


Link to post
Share on other sites
Hi all,
I am relatively new to this but currently encountering some issues with the Participants data in offline races and I am hoping someone can shed some light. According to the documentation m_numCars should return the number of cars in the data but I am getting a strange number of cars, including negative. How can there be -8 cars in the packet? 
Furthermore, the 
m_driverId in ParticipantsData is showing strange ids such as negative or big numbers.
Any idea what could be causing such issues please? I do not have any issues on the other packets. I am using Xbox One and using C# for the application. 
Would appreciate some help from you experienced guys out there.  :)

Share this post


Link to post
Share on other sites
nlocnill,

Sounds like you have some offsets wrong or are incorrectly processing the data (big endian v little ?, maybe uint v int).  I've only seen issues when i have incorrectly mapped the data... with one exception in online games where i've seen huge values for the gforces.

Andy

Share this post


Link to post
Share on other sites
Thanks for your reply AndyHamp.
The specification indicates that these fields are of type uint8. Since I am using C#.net, uint8 is not available but I am using byte. Do you think this might be the issue? If so, do you have any recommendation on how to fix this please? Thanks.

Share this post


Link to post
Share on other sites
nlocnil said:
Thanks for your reply AndyHamp.
The specification indicates that these fields are of type uint8. Since I am using C#.net, uint8 is not available but I am using byte. Do you think this might be the issue? If so, do you have any recommendation on how to fix this please? Thanks.
Check that you are using the correct structure packing setting, otherwise your fields alignment can end up out of sync with the data

Share this post


Link to post
Share on other sites
Hoo said:
Hi @cjorgens79, unfortunately our attempts to work around the legal constraints are not going well. We have another last avenue to try before we call time on it. Using the players' name runs into the same issues unfortunately.

We don't plan on mapping human drivers to the AI driver who was previously in that vehicle. All drivers should have unique driver IDs. You should be able to work out the team someone races for using the teamID value. There was a suggestion that this might not always work in online games, so please let us know if you find that to be the case. and we'll investigate further. 

I feel like an idiot for not picking up on this earlier, but I found a way to make this work for my racing league and all it requires is a little coordination.

Before the race, we know which driver will be with each team, and the telemetry sends the car number and the team number. My chosen number in game is 25 so if I know I'm scheduled to drive the Mercedes, I know to map team ID 0, carNumber 25 to IJS84. Just so long as teammates don't use the same number, you can manage it with very little setup work.

Share this post


Link to post
Share on other sites
I made that on my league.

We use a template made with SimHub with a list of race numbers linked to our names  

https://youtu.be/04y924OCPtY

Share this post


Link to post
Share on other sites
sonder774 said:
Why is broadcast mode blatantly broken in both F1 2017 and F1 2018?

Am I misunderstanding something? It's supposed to allow multiple apps to listen/connect to the UDP port. Never have gotten it to work.. There's a 3rd party program written specfically for this issue, and F1 2018 is still bugged? Mates... Fernando is faster than you.


It is bugged. Broadcast simply does not work. I am using Sim Commander for my Accuforce Wheel, and trying to use it with Sam Maxwell's LCD Formula One wheel (Z1 Dashboard). They will not work simultaneously.  I can only get one or the other to work, no matter what I try.

Share this post


Link to post
Share on other sites
sonder774 said:
Why is broadcast mode blatantly broken in both F1 2017 and F1 2018?

Am I misunderstanding something? It's supposed to allow multiple apps to listen/connect to the UDP port. Never have gotten it to work.. There's a 3rd party program written specfically for this issue, and F1 2018 is still bugged? Mates... Fernando is faster than you.


It is bugged. Broadcast simply does not work. I am using Sim Commander for my Accuforce Wheel, and trying to use it with Sam Maxwell's LCD Formula One wheel (Z1 Dashboard). They will not work simultaneously.  I can only get one or the other to work, no matter what I try.

It was broken in F1 2016, but as far as I know it works fine in F1 2017 and F1 2018. There are other factors (such as router setup, mobile device network drivers) which can interfere with the ability to receive messages sent via broadcast however. If you have broadcast mode enabled and you can receive telemetry on one device, then you should have no problems also receiving it on another device. If you are trying to run multiple apps on the same device and get data using broadcast mode, then a) broadcast mode is not actually needed for that, b) the apps probably aren't sharing the port which prevents other apps on the same device from also getting the telemetry.

It is also important if you are trying to get multiple devices working to ensure that they are all on the same network subnet as the device doing the broadcasting. 

Share this post


Link to post
Share on other sites
It works for both devices in project cars 1 and 2.  So Sim Commander is indeed sharing the port. There is something wrong IMO with F1 2018 and 2017 with port sharing. Does anyone else have success running two pieces of hardware on the same port with broadcast enabled or disabled?

Share this post


Link to post
Share on other sites
@HudsonKerr Correct me, if I understand you wrong, but you are trying to broadcast the data to two different devices, so let's say to a PC and a Smartphone. At least, that's what I understand from your last post.
Is fas as I know, you can only broadcast to One device from within the game, and that's the device you enter the IP in the boradcast menu. (also here, correct me, if i am wrong, but that's how i understood the system in place here)

Share this post


Link to post
Share on other sites
@Bannish Thanks for your post and help. Yes, to two different devices.

I am trying to broadcast to my Accuforce steering wheel base (and seat buttkicker) - that all works under software called Sim Commander for the Accuforce Wheels.

But I have a separate Formula one wheel attached to the Accuforce base which runs its own LCD screen under software called Z1 Dashboard.  http://www.z1simwheel.com/smz1/index.cfm

Share this post


Link to post
Share on other sites
@Bannish - the term broadcast in networking means to send out a packet to multiple recipients. With broadcast mode off and the IP address specified you are saying 'send telemetry only to the device with this IP address only'. When you enable broadcast mode, the IP specified is not used, instead a subnet or global network broadcast address are used which effectively says 'send telemetry to any device on this network'. 

@HudsonKerr - sharing the port only applies when you are trying to run multiple listeners (ie telemetry reading apps like RS Dash, Sim Commander, Z1 Dashboard) etc on the same device. When they are on different devices there is no port sharing to consider. Whether or not a port can be shared (ie to run multiple apps) is entirely dependant on the receiving software code using the correct socket options to allow sharing. It has nothing to do with Codemasters. In your case it sounds like they are two separate devices (each with their own IP address?)

What you also need to consider is the compatibility of the telemetry protocol. If one of your devices expected F1 2017 protocol format and the other expects F1 2018 protocol format, then you wont be able to run both at once.

You should be able to also use a manual broadcast address (so broadcast mode off), but use the address 255.255.255.255 which would effectively be what PCARS/PCARS2 does. Be aware though that this address does have some compatibility issues with some hardware, in your case though you say it works fine for PCARS for you so you shouldn't have any issues. Another option is to manually specify a subnet level broadcast which tends to have slightly better hardware support. For this you just take the IP address of the computer/console running the game and replace the last number with 255. So if the IP was 192.168.100.1 then you would use 192.168.100.255 as the IP in the telemetry settings of the game. This is subnet specific, so only other devices on your network that are also on the 192.168.100.xx ip range will be able to receive it.

There is another feature of networking to multiple clients called multicast, but that's not what we are dealing with here.

Share this post


Link to post
Share on other sites
I really need some help with the telemetry.  I have two devices that both need these settings

IP: 127.0.0.1
Port: 20777 
Format : legacy 

One is simcommander 4 and the other is my SFX100 motion system.  If i try to run them both i get an error:  "Failure Connecting to Game:  Each socketadres (Protocol/netwerkadres/port) can normally only be used once" 

Is there a workaround or specific setting for this.  I tried to enable/disable broadcast, but i can only use  one or the other. 

Share this post


Link to post
Share on other sites
HoiHman said:
I really need some help with the telemetry.  I have two devices that both need these settings

IP: 127.0.0.1
Port: 20777 
Format : legacy 

One is simcommander 4 and the other is my SFX100 motion system.  If i try to run them both i get an error:  "Failure Connecting to Game:  Each socketadres (Protocol/netwerkadres/port) can normally only be used once" 

Is there a workaround or specific setting for this.  I tried to enable/disable broadcast, but i can only use  one or the other. 
That particular error is indicating that the port isn't being shared, so one of both of those apps is locking the port preventing you from running both at once. If only one of them is being greedy with the port then you may be able to work around the problem by loading them and starting the port listener (if required) in a certain order. If they are both being greedy with the port then you wont be able to do anything about it other than contact the developers and ask them to fix it. if you can reconfigure the port number being used by one of the apps then you can probably use that CMS proxy program that some people have mentioned before which takes the telemetry and forwards it to alternate ports.

I'm not personally familiar with any of those applications but I am a programmer with plenty of experience with networking and sockets, so the error you have described is common if they socket options have not been set to allow port sharing by the app developers.

Share this post


Link to post
Share on other sites
Thansk @cjorgens79

I was afraid this would be case.   I already tried starting them in a different order but it did't work either.  Both programms have the port number burried deep somewhere in the plugin, so there's not a lot chance getting them to work together.  And offcourse each developer claims his programm works as intended with F1 2018. 

Too bad, since combining them both is awesome;  G-seat + Simvibe + AccuForce +  D-box style motion ( SFX100)

With only one or the other half of my toys working, there's less joy in playing F1 2018.  

Thanks again for your detailed explanation

Share this post


Link to post
Share on other sites
Guest
Can someone confirm that
    float         m_localVelocityX;              // Velocity in local space
    float         m_localVelocityY;              // Velocity in local space
    float         m_localVelocityZ;              // Velocity in local space
Is the same as sway, surge and heave?

Share this post


Link to post
Share on other sites
HoiHman said:
Thansk @cjorgens79

I was afraid this would be case.   I already tried starting them in a different order but it did't work either.  Both programms have the port number burried deep somewhere in the plugin, so there's not a lot chance getting them to work together.  And offcourse each developer claims his programm works as intended with F1 2018. 

Too bad, since combining them both is awesome;  G-seat + Simvibe + AccuForce +  D-box style motion ( SFX100)

With only one or the other half of my toys working, there's less joy in playing F1 2018.  

Thanks again for your detailed explanation

The only option you'd have would be to develop a small proxy .... ie direct the game traffic to one port which your proxy picks up, and then re transmit the data to two other ports for your two apps to process.

Share this post


Link to post
Share on other sites
AndyHamp said:
HoiHman said:
Thansk @cjorgens79

I was afraid this would be case.   I already tried starting them in a different order but it did't work either.  Both programms have the port number burried deep somewhere in the plugin, so there's not a lot chance getting them to work together.  And offcourse each developer claims his programm works as intended with F1 2018. 

Too bad, since combining them both is awesome;  G-seat + Simvibe + AccuForce +  D-box style motion ( SFX100)

With only one or the other half of my toys working, there's less joy in playing F1 2018.  

Thanks again for your detailed explanation

The only option you'd have would be to develop a small proxy .... ie direct the game traffic to one port which your proxy picks up, and then re transmit the data to two other ports for your two apps to process.
I use both SliMaxManager (for my F1 replica wheels / displays), and SimCommander / Simvibe (for force feedback under the seat) together simultaneously. SliMaxManager supports the new 2018 UDP packet structure (which is great to get ERS and other new items), but SimCommander / SimVibe only supports the legacy structure (sigh). Therefore I have written a java app which listens on a port (20778) for the F1 2018 spec UDP data, and converts it to the legacy structure and forwards on to SimCommander / Simvibe on port 20777.

I then have Sim Race Proxy Server listening for the 2018 output from the game (on port 20776 also configured in game), forwarding to both my converter app (20778), and SliMaxManager on port 40555.

Works well, but it is a shame SimCommander doesn't use the new structure so conversion wouldn't be necessary, or indeed have the option to specify a different port (otherwise two apps listening on hard codded 20777 ports aren't likely going to work together).

Share this post


Link to post
Share on other sites
Guest
@Hoo Can you help me to understand a litlte bit of the m_pitch, m_roll and m_yaw? If the car is on a downhill the pitch is positive, if it is on a uphill the pitch still positive.
And I wanna know what vars can I use to made sway, surge and heave.

Thanks is advance.

Share this post


Link to post
Share on other sites
AndyHamp said:
HoiHman said:
Thansk @cjorgens79

I was afraid this would be case.   I already tried starting them in a different order but it did't work either.  Both programms have the port number burried deep somewhere in the plugin, so there's not a lot chance getting them to work together.  And offcourse each developer claims his programm works as intended with F1 2018. 

Too bad, since combining them both is awesome;  G-seat + Simvibe + AccuForce +  D-box style motion ( SFX100)

With only one or the other half of my toys working, there's less joy in playing F1 2018.  

Thanks again for your detailed explanation

The only option you'd have would be to develop a small proxy .... ie direct the game traffic to one port which your proxy picks up, and then re transmit the data to two other ports for your two apps to process.

Two programs listening to the same port wasn't working.

I managed to solve it, but i was a difficult one:

-For simcommander i used the Dirt Rally plugin that still listens to port 10001
-The SFX100 listens to port 20777
-For simtools i managed to edit the plug-in my self and made it listen to 20778

The game sends the data to port 10002 and the sim racing proxy servers forwards it to port 10001, 20777 and 20778. :)

It's just a real shame that you have to get to so much trouble to get all your tools working, but tommorrow i finally going to really start enjoy playin g F1 2018.


Share this post


Link to post
Share on other sites

Hi,

anybody willing to explain to me how to convert the data received via UDP in C#? I am new to this, but want to make my own telemetry software. I have the same problem as @baconbrawler - Getting symbols and random letters in output.

I would really appreciate if anyone could help me.

Share this post


Link to post
Share on other sites

Hi Codemaster and others is i possible to include Fueldelta (remaning fuel laps) i see it in the game on screen, but realy want this on my simhub external dash.

I have tryede many solutions to calculate this but i i very diffiicult

 

image.png.7cb098410d20e2ce3584115d5dbcebfd.png

 

/ Thanks 

Tim

Edited by timmhc

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×