Simple controller
Posted: Thu Sep 29, 2016 11:10 pm
Hello, I'm trying to create a simple repeater server with sockets as a starting point to create a wifi controller. I want to sent an arbitrary string to the ESP8266 and have it parse and do things. I am just looking to connect locally through a phone/laptop wifi and send values directly to it. I've been looking at documentation and other peoples code to start out by connecting to the device, the closest I've got is the following;
please use code blocks to paste your code
- platforma
However, it just hangs and it actively refuses a connection when trying to connect to the device.
Has anyone tried this before?
Code: Select all
import usocket as socket
def server_init():
s = socket.socket()
s.bind( ('127.0.0.1', 83) )
s.listen(1)
c, a = s.accept()
print "Client connected"
return c
c = server_init()

However, it just hangs and it actively refuses a connection when trying to connect to the device.
Has anyone tried this before?