Communication to VIZRT via UDP

HUDis

New member
Do you happen to know why I can't get a response from VIZRT over UDP? I'm using this script.

Python:
import socket
import time

msgFromClient = "0 VERSION   \0"
bytesToSend = str.encode(msgFromClient)
serverAddressPort = ("192.168.0.185", 6100)

sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
sock.sendto(bytesToSend, serverAddressPort)
data, address = sock.recvfrom(1024)

print(f"Received data: {data.decode()} from {address}")

VIZ terminal returns the following response to it:
error: could not send answer <0 Version 4.3.60028>


Similar functionality works without any issues over TCP. What could be the problem with the UDP connection?"
 
UPD from Python 3.10 to Viz 4.4 works for me. Double check UDP is enabled in the Viz Engine Config ->Communication->Additional Communication
 
UPD from Python 3.10 to Viz 4.4 works for me. Double check UDP is enabled in the Viz Engine Config ->Communication->Additional Communication

UDP communication is enabled in VIZRT. VIZRT responds to the command:
"0 VERSION \0"

and displays the message in the console:
error: could not send answer <0 Version 4.3.60028>

The problem is that it doesn't return this message to Python. This part of the script:
Python:
data, address = sock.recvfrom(1024)
print(f"Received data: {data.decode()} from {address}")

should receive the response: 0 Version 4.3.60028
and print it in the Python console. I don't know why VIZRT can't send the response, as indicated in the console.
 
Ah, yes, sorry, I missed your point about not getting a response! TBH I've not tired to get a response for the things I've done with UDP to Viz.
 
Back
Top