Jump to content

catching UDP packets from DCS


Recommended Posts

Hello everyone,


I am new to DCS and I downloaded the current version and still using SU-25T & TF-51D


I followed the instructions in /Scripts/Export.lua where they say "do not modify on this file" and make your modifications on $HOME\Saved Games\DCS\Scripts\Export.lua.


I did not fine the Scripts\Export.lua in $HOME\Saved Games\DCS directory


I created one and copied Export.lua to it and uncommented the lines belongs to socket configuration and sending data but I can not find any UDP stream coming from the game at any port or IP address.


I use C# and also used sniffer program to catch any action but could not.


Is there any thing else I need to do or that does not work with SU-25T & TF-51D and I need to purchase other planes?


Any hint regarding this would be very appreciated.


Thank you

Link to comment
Share on other sites

Well, I honestly don't understand why you need to capture udp data from the sim but if I were you, I'd have a close look at wireshark aka ethereal. If that can't capture it you must be doing something wrong :)



Are you trying to use different ports to communicate ?

Blocked by ISP or something else ( gov ) ??



In other, simple words, there is NO NEED for endusers like us to edit any config.lua or catch and analyse any DCS data to be able to connect MP, update/upgrade etc..





Gigabyte Aorus X570S Master - Ryzen 5900X - Gskill 64GB 3200/CL14@3600/CL14 - Asus 1080ti EK-waterblock - 3x Samsung 980Pro 1TB - 1x Samsung 870 Evo 1TB - 1x SanDisc 120GB SSD - Heatkiller IV - MoRa3-360LT@9x120mm Noctua F12 - Corsair AXi-1200 - TiR5-Pro - Warthog Hotas - Saitek Combat Pedals - Asus PG278Q 27" QHD Gsync 144Hz - Win11 Pro/Linux - Phanteks Evolv-X 

Link to comment
Share on other sites

Thank you BitMaster,


I just need Rolling and Pitching angles because I am planning to make a simple motion platform for my kids :) and for me also, so i wanted to make sure i can catch data before making it.


Thank you for mentioning wireshark, I will give it another try and hope to help me if I could not reach it.

Link to comment
Share on other sites

You gonna post your plans for the motion platform after your done?

I need, I need, I need... What about my wants? QuickSilver original.

"Off with his job" Mr Burns on the Simpsons.

"I've seen steering wheels / arcade sticks / flight sticks for over a hundred dollars; why be surprised at a 150 dollar item that includes the complexities of this controller?! It has BLINKY LIGHTS!!" author unknown.



These titles are listed in the chronological order I purchased them.


Link to comment
Share on other sites



(This thread probably needs to go into the mod branch etc..)


I messed about with the export stuff about a year ago and produced some test code. I have no idea if this stuff still works with the latest version of DCS (or if the folders paths are still correct). Anyway, this might get you started - the script just outputs various bits of telemetry (pitch/bank/yaw) to a file on your machine. You would have to tweak it to output to a socket etc..


Create an Export.lua in your Save\DCS\Scripts folder and add the following code


  local default_output_file = nil
function LuaExportStart()
  default_output_file = io.open("./Temp/Export.log", "w")
function LuaExportBeforeNextFrame()
function LuaExportAfterNextFrame()
function LuaExportStop()
  if default_output_file then
  default_output_file = nil
function LuaExportActivityNextEvent(t)
local tNext = t
local HSI    = LoGetControlPanel_HSI()
local t = LoGetModelTime()
local name = LoGetPilotName()
local altBar = LoGetAltitudeAboveSeaLevel()
local altRad = LoGetAltitudeAboveGroundLevel()
local pitch, bank, yaw = LoGetADIPitchBankYaw()
local engine = LoGetEngineInfo()
 if default_output_file then
 default_output_file:write(string.format("t = %.2f, name = %s, altBar = %.2f, altRad = %.2f, pitch = %.2f, bank = %.2f, yaw = %.2f, RPM left = %f  fuel_internal = %f  \r\n", t, name, altBar, altRad, 57.3*pitch, 57.3*bank, 57.3*yaw,engine.RPM.left,engine.fuel_internal))

tNext = tNext + 1
return tNext

Create a 'Temp' directory in C:\Program Files\Eagle Dynamics\DCS World' folder (this is where the export.log file written)


When I run this in single player I then get a file with the following telemetry data (current output rate is one row per second).



  t = 0.00, name = New callsign, altBar = 2000.09, altRad = 1465.27, pitch = 6.36, bank = -0.00, yaw = 380.10, RPM left = 81.801552  fuel_internal = 3775.000000  
t = 1.00, name = New callsign, altBar = 1999.63, altRad = 1417.33, pitch = 6.07, bank = 0.01, yaw = 20.27, RPM left = 81.803558  fuel_internal = 3774.959717  
t = 2.00, name = New callsign, altBar = 1998.34, altRad = 1397.08, pitch = 6.00, bank = 0.05, yaw = 20.27, RPM left = 81.808098  fuel_internal = 3774.797607  
t = 3.00, name = New callsign, altBar = 1996.51, altRad = 1367.13, pitch = 5.72, bank = 0.07, yaw = 20.28, RPM left = 81.811615  fuel_internal = 3774.533203  
t = 4.00, name = New callsign, altBar = 1994.15, altRad = 1336.53, pitch = 5.48, bank = 0.09, yaw = 20.29, RPM left = 81.815186  fuel_internal = 3774.189453  
t = 5.00, name = New callsign, altBar = 1991.27, altRad = 1305.31, pitch = 5.29, bank = 0.11, yaw = 20.30, RPM left = 81.817825  fuel_internal = 3773.783691  
t = 6.00, name = New callsign, altBar = 1987.95, altRad = 1289.69, pitch = 5.11, bank = 0.13, yaw = 20.31, RPM left = 81.819679  fuel_internal = 3773.329346  

Again, I have no idea if this stuff still works in the latest build of the engine.


Good luck!

i7-4790K@4.7GHz : EVGA 1070 SC : 16GB Corsair Vengence Pro : 2xEVO 840 SSD : EVGA 850W PSU : CORSAIR H100i Cooler : ASUS Z97-AR MB : CORSAIR OBSIDIAN 750D FULL TOWER

Link to comment
Share on other sites


  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...