Hi all,
I am hoping to read basic telnet messages sent through M118. I am running my Duet in standalone mode and it is directly connected to my pc. I am trying to use the socket library in python to listen for messages, but I am not having any luck. My basic config.g file contains the following:
global g = 0
M586 P2 S1 R23
M553 P255.255.255.0
M552 S1 P192.168.2.80
I am using the following macro to try to test the telnet messages:
set global.g = 0
while global.g < 20
M118 P4 S"message"
set global.g = global.g + 1
G4 S3
And I am trying to use the following super basic Python script to listen:
import socket
import sys
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
server_address = ('localhost', 23)
sock.bind(server_address)
sock.listen(1)
while True:
print(sys.stderr)
print('waiting for a connection')
connection, client_address = sock.accept()
If anybody could help me out I would definitely appreciate it. Thanks in advance!