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

**URL:** <https://forum.universal-robots.com/t/trying-to-send-a-hex-string-from-pc-and-trying-to-read-it-on-ur5e-polyscope/28247>\
**Category:** Technical Questions\
**Created:** [May 4, 2023, 2:27pm UTC](https://forum.universal-robots.com/t/trying-to-send-a-hex-string-from-pc-and-trying-to-read-it-on-ur5e-polyscope/28247 "2023-05-04T14:27:26Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![anirudhgowdat](https://avatars.discourse-cdn.com/v4/letter/a/a6a055/32.png) [@anirudhgowdat](https://forum.universal-robots.com/u/anirudhgowdat)\
**Post date:** [May 4, 2023, 2:27pm UTC](https://forum.universal-robots.com/t/trying-to-send-a-hex-string-from-pc-and-trying-to-read-it-on-ur5e-polyscope/28247/1 "2023-05-04T14:27:26Z")

</div>

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
