i have done exactly as in the manual shown bellow, i cant get any webpage Where did i go wrong?
https://www.youtube.com/watch?v=GVMuER7A770
Code: Select all
import network
import usocket as socket
ap_if = network.WLAN(network.AP_IF)
ssid = 'MicroPython-AP29'
password = '123456789'
ap_if.active(True)
ap_if.config(essid=ssid, password=password)
s=socket.socket(socket.AF_INET,socket.SOCK_STREAM)
s.bind(('',80))
s.listen(5)
while True:
conn, addre=s.accept()
request=conn.recv(1024)
request=str(request)
response="gyhkjgku"
conn.send("HTTP/1.1 200 OK\n")
conn.send("Content-type: text/html\n")
conn.send("Connection: close\n\n")
conn.sendall(response)
conn.close()