1. Do not share user accounts! Any account that is shared by another person will be blocked and closed. This means: we will close not only the account that is shared, but also the main account of the user who uses another person's account. We have the ability to detect account sharing, so please do not try to cheat the system. This action will take place on 04/18/2023. Read all forum rules.
    Dismiss Notice
  2. 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!
  3. 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
  4. 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:
    20Coins
    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. BlazinH

    BlazinH Well-Known Member

    Joined:
    Oct 19, 2013
    Messages:
    2,145
    Location:
    Oklahoma City, USA
    Balance:
    16,575Coins
    Ratings:
    +1,831 / 32 / -1
    • Informative Informative x 1