I am creating a project where I can manipulate the robotine through python, and this can be seen in the software "robotino SIM 1.4.1", but the connection between the TCP protocol does not work. I add the test code. I would like to know the data used to control the robotine with python. Thank you.
import socket
import time
host = 'localhost'
port = 8080
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.bind((host, port))
s.listen(1)
while True:
conn, addr = s.accept()
print('Cliente conectado:', addr)
data = conn.recv(1024)
response = b'\x06\xd1\x07rec::robotino::server\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x 00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00 \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x 00\x00
conn.sendall(response)
s.close()
import socket
import time
host = 'localhost'
port = 8080
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.bind((host, port))
s.listen(1)
while True:
conn, addr = s.accept()
print('Cliente conectado:', addr)
data = conn.recv(1024)
response = b'\x06\xd1\x07rec::robotino::server\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x 00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00 \x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x 00\x00
conn.sendall(response)
s.close()

Comment