ESP32 Huzzah access point error


#1

Hello guys, so I am trying to run a mini web server on my esp 32 feather huzzah32 but i hit an error every time i try to open the console. I tried several times, updated everything, erased the flash also few time to start over and the same. The line 37 seems to have a problem I can not figure out. When i am don with compiling and uplink the code I see this error: ( IOError @[0047:0013:0000:0048:0000:0000:0000:0000] oops, something wrong while linkin: (IOError at line 37 of main raised at line 97 of wireless.wifi.link

the code:

import streams
import socket


from wireless import wifi


from espressif.esp32net import esp32wifi as wifi_driver

streams.serial()

wifi_driver.auto_init()

    wifi.link("my-ssid",wifi.WIFI_WPA2,"my-password")
except Exception as e:
    print("ooops, something wrong while linking :(", e)
    while True:
        sleep(1000)


print("Linked!")

info = wifi.link_info()
print("My IP is:",info[0])

sock = socket.socket()
sock.bind(80)
sock.listen()


while True:
    try:

        clientsock,addr = sock.accept()
        client = streams.SocketStream(clientsock)


        line = client.readline()
        while line!="\n" and line!="\r\n":
            line = client.readline()
        print("HTTP request received!")


        print("HTTP/1.1 200 OK\r",stream=client)
        print("Content-Type: text/html\r",stream=client)
        print("Connection: close\r\n\r",stream=client)

        print("<html><body>Hello Zerynth!",random(0,100),"</body></html>",stream=client)

        client.close()
    except Exception as e:
        print("ooops, something wrong:",e)

#2

Done, I figured it out. I was trying to connect using ssid but i replaced it with the actual name of the wifi network and it worked.