1. For downloading SimTools plugins you need a Download Package. Get it with virtual coins that you receive for forum activity or Buy Download Package - We have a zero Spam tolerance so read our forum rules first.

    Buy Now a Download Plan!
  2. Do not try to cheat our system and do not post an unnecessary amount of useless posts only to earn credits here. We have a zero spam tolerance policy and this will cause a ban of your user account. Otherwise we wish you a pleasant stay here! Read the forum rules
  3. We have a few rules which you need to read and accept before posting anything here! Following these rules will keep the forum clean and your stay pleasant. Do not follow these rules can lead to permanent exclusion from this website: Read the forum rules.
    Are you a company? Read our company rules

Question How to extract and convert data via udp

Discussion in 'DIY Motion Simulator Projects' started by marwan barky, Feb 27, 2020.

  1. marwan barky

    marwan barky New Member

    Joined:
    Feb 13, 2020
    Messages:
    2
    Balance:
    - 3Coins
    Ratings:
    +0 / 0 / -0
    My Motion Simulator:
    2DOF, 3DOF, DC motor, AC motor, SCN5, SCN6, SimAxe, Arduino, JRK, Joyrider, SimforceGT, Motion platform, 4DOF, 6DOF
    hi everyone
    i am building a 2 dof rig as a project in my college, i want to get the game telemetry so i can use it in my controller (Arduino)
    i was able to write a python code that receives the in game data telemetry sent by the game via udp
    here is a copy of the code:
    import socket
    import time
    UDP_IP = "127.0.0.1"
    UDP_PORT = 63394
    sock = socket.socket(socket.AF_INET, # Internet
    socket.SOCK_DGRAM) # UDP
    sock.bind((UDP_IP, UDP_PORT))
    while True:
    data, addr = sock.recvfrom(1024) # buffer size is 1024 bytes
    print ("received message:", data)
    time.sleep(2)
    it worked but my problem is that I dont understand the data received i am using live for speed (LFS)
    here is a copy of the data received

    b'(\x00\x00\x00\xe4\xf1\xa59~a/\xb7\xd6\xde\xc8\xb5\xcdF)\xbd\x05@\x9e\xbd\x96\x10\xf39\x10\xc85\xb9J\x02\xca\xba\x11\xec\x1c\xc1?N\xe7\xb6@T\x80\xb8\x13\xe8\xc8\xbe\xd3\xc8\xc3\xff^go\x00\xb0\xb1\x07\x00'

    Any idea how to convert these data? or how to understand them or any guides
    and if there is another way that i can extract data and convert it other than this please tell me i am quiet new to this
    thanks in advance :D
  2. Ads Master

    Ads Master

    Balance:
    Coins
    Ratings:
    +0 / 0 / -0
  3. BlazinH

    BlazinH Well-Known Member

    Joined:
    Oct 19, 2013
    Messages:
    2,146
    Location:
    Oklahoma City, USA
    Balance:
    15,861Coins
    Ratings:
    +1,813 / 32 / -1
    • Informative Informative x 1