Trying to send a hex string from PC and trying to read it on UR5e polyscope

import socket

host = ‘192.168.178.75’ # replace with the IP address of your UR5e

port = 30002

s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)

s.connect((host, port))

s.send(“Anirudh_Gowda\n”.encode())

data = s.recv(1024)

s.close()

print(“Received”, repr(data))

I am trying to send a hex string, but there a normal string from my PC to a UR5e, and i want the robot to recive the string give me a popup after checking the connection is established. For this the URscript that i am using is as follows.

host = “192.168.178.75”
port = 30002

socket_open(host, port)

while True:
data = socket_read_ascii_string()

if data == “Anirudh_Gowda”:
popup(“Message received: Anirudh_Gowda”)

sleep(0.1)

socket_close()

But currently i am not successful in reading the string, is there any suggestion on what i should change and redo???
Please help