Wifi#

Raspberry Pi Pico

ESP-01 and ESP8266

Examples

Video

ESP01 class#

%serialconnect

from machine import UART, Pin
import time

UART_DELAY_MS = 500

class ESP_Error(Exception):
    """Raise custom exceptions for ESP module."""
    pass


class ESP01():
    
    def __init__(self, uart_port=0, tx=16, rx=17, verbose=False):
        self.txPin = Pin(tx)
        self.rxPin = Pin(rx)
        self.uart = UART(0, baudrate=115200, tx=self.txPin, rx=self.rxPin, timeout=10)
        self.verbose = verbose
        if self.verbose:
            self.echo_on()
            print(self.send("AT"))
        else:
            self.echo_off()

    def send(self, cmd, timeout=UART_DELAY_MS):
        if self.verbose:
            print("+"*20 + "\n command:\t", cmd)
            print(" timeout:\t", timeout, "ms")

        # write AT command
        self.uart.write(cmd + "\r\n")
        
        # wait for data to appear in the buffer
        toc = time.ticks_ms()
        while time.ticks_ms() - toc < timeout:
            if self.uart.any():
                break
                
        # read buffer
        rxData = bytes()
        toc = time.ticks_ms()
        while True:
            if (time.ticks_ms() - toc) > timeout:
                break
            if self.uart.any():
                rxData += self.uart.read(1)
                toc = time.ticks_ms()
                
        # report response
        try:
            rxData = rxData.decode()
        except UnicodeError:
            if self.verbose:
                print("Unicode error encountered, returning byte string.")
        if self.verbose:
            print("response:\n", rxData)
            print("-"*20)
            
        if "OK" in rxData:
            status = "OK"
        elif "FAIL" in rxData:
            status = "FAIL"
        elif "busy p..." in rxData:
            status = "BUSY"
        elif "ERROR" in rxData:
            status = "ERROR"
        else:
            status = "UNKNOWN"
            
        if status != "OK":
            print("status = ", status)
            
        return rxData
            
        
    def echo_off(self):
        """Turn off the echo feature of the ESP-01."""
        return self.send("ATE0")
    
    def echo_on(self):
        """Turn on the echo feature of the ESP-01."""
        return self.send("ATE1")
    
    def restart(self):
        """Restart ESP8266 module."""
        return self.send("AT+RST", 500)
    
    def get_version(self):
        """Return firmware version."""
        return self.send("AT+GMR")
    
    def set_wifi_mode(self, mode=1):
        return self.send("AT+CWMODE_CUR=" + str(mode))
        
    def get_wifi_mode(self):
        response = self.send("AT+CWMODE_CUR?")
        if response is not None:
            if "1" in response:
                return "STA"
            elif "2" in response:
                return "SoftAP"
            elif "3" in response:
                return "SoftAP +  STA"
            else:
                raise ESP_Error("Unrecognized WiFi mode returned: \n" + response)
        return None
        
    def get_APs(self):
        return self.send("AT+CWLAP", 5000)
    
    def connect(self, ssid, pwd):
        cmd = "AT+CWJAP=" + '"' + ssid + '"' + ',' + '"' + pwd + '"'
        return self.send(cmd.encode(), timeout=10000)
    
    def get_IP_address(self):
        return self.send("AT+CIFSR")
    
    def set_connection_mode(self, mode=1):
        return self.send("AT+CIPMUX=1")
    
    def webserver(self):
        return self.send("AT+CIPSERVER=1,80", 2000)
serial exception on close write failed: [Errno 6] Device not configured
Found serial ports: /dev/cu.usbmodem14401, /dev/cu.Bluetooth-Incoming-Port 
Connecting to --port=/dev/cu.usbmodem14401 --baud=115200 
Ready.

# startup

esp = ESP01(verbose=True)
esp.restart()
esp.get_version()
esp.set_wifi_mode(1)

# connection
#esp.connect("Wilder\u2019s Edge", "FreyaWatson")
print(esp.connect("ND-guest", ""))
esp.set_connection_mode()
esp.get_IP_address()

# webserver

def read_http_request():
    req = ""
    while True:
        recv = bytes()
        line = 0
        if esp.uart.any():
            recv = esp.uart.readline()
        recv = recv.decode()
        recv = recv.replace("\r\n", "\n")
        if len(recv) == 1:
            break
        else:
            if len(recv) > 0:
                req += recv
    
    lines = req.split("\n")
    if "+IPD" in lines[0]:
        print("http request received")
    else:
        print("AT response received")
    for k, line in enumerate(lines):
         print(k, ":", line)
        
        
def send_line(msg):
    esp.send(f"AT+CIPSEND=0,{len(msg)+2}", 10)
    esp.send(msg, 10)
    
def send_http_response(n):
    send_line("HTTP/1.1 200 OK")
    send_line("Content-type:text/html")
    send_line("Connection: close")
    send_line("");
    send_line("<html><body>")
    send_line("<h1>Hello World!</h1>")
    send_line(f"message {n}")
    send_line("</body></html>")
    esp.send("AT+CIPCLOSE=0")
    
esp.webserver()
recv_buf = bytes()
toc = time.ticks_ms()
n = 0
while True:
    read_http_request()
    send_http_response(n)
    n += 1
    
++++++++++++++++++++
 command:	 ATE1
 timeout:	 500 ms
Unicode error encountered, returning byte string.
response:
 b'\xfeATE1\r\r\n\r\nOK\r\n'
--------------------
++++++++++++++++++++
 command:	 AT
 timeout:	 500 ms
response:
 AT

OK

--------------------
AT

OK

++++++++++++++++++++
 command:	 AT+RST
 timeout:	 500 ms
Unicode error encountered, returning byte string.
response:
 b'AT+RST\r\r\n\r\nOK\r\nWIFI DISCONNECT\r\n\r\n ets Jan  8 2013,rst cause:2, boot mode:(3,7)\r\n\r\nload 0x40100000, len 27728, room 16 \r\ntail 0\r\nchksum 0x2a\r\nload 0x3ffe8000, len 2124, room 8 \r\ntail 4\r\nchksum 0x07\r\nload 0x3ffe8850, len 9276, room 4 \r\ntail 8\r\nchksum 0xba\r\ncsum 0xba\r\n\x8c\xe3No\x83l\x8e\x8cl\x130\xec\x0c\x88\x80\x0c\x8es\x88\x03\x8c\xe3No\x83l\x8e\x8fd\x130\xe4\x0c\x88\x80\x0c\x8es\x88\x03\x8c\xe3No\x83l\x8e\x98l\x130\xec\x0c\x88\x80l\x8es\x88\x03s\x88\x03\x8f\t\x907\xff\r\nready\r\n'
--------------------
++++++++++++++++++++
 command:	 AT+GMR
 timeout:	 500 ms
response:
 AT+GMR
AT version:1.1.0.0(May 11 2016 18:09:56)
SDK version:1.5.4(baaeaebb)
compile time:May 20 2016 15:08:19
OK

--------------------
++++++++++++++++++++
 command:	 AT+CWMODE_CUR=1
 timeout:	 500 ms
response:
 AT+CWMODE_CUR=1

OK

--------------------
++++++++++++++++++++
 command:	 b'AT+CWJAP="ND-guest",""'
 timeout:	 10000 ms
...response:
 AT+CWJAP="ND-guest",""
WIFI CONNECTED
WIFI GOT IP

OK

--------------------
AT+CWJAP="ND-guest",""
WIFI CONNECTED
WIFI GOT IP

OK

++++++++++++++++++++
 command:	 AT+CIPMUX=1
 timeout:	 500 ms
response:
 AT+CIPMUX=1

OK

--------------------
++++++++++++++++++++
 command:	 AT+CIFSR
 timeout:	 500 ms
response:
 AT+CIFSR
+CIFSR:STAIP,"10.5.244.171"
+CIFSR:STAMAC,"84:cc:a8:b3:b6:f9"

OK

--------------------
++++++++++++++++++++
 command:	 AT+CIPSERVER=1,80
 timeout:	 2000 ms
response:
 AT+CIPSERVER=1,80

OK

--------------------
.............AT response received
0 : 0,CONNECT
1 : 
++++++++++++++++++++
 command:	 AT+CIPSEND=0,17
 timeout:	 10 ms
response:
 +IPD,0,376:GET / HTTP/1.1
Host: 10.5.244.171
Upgrade-Insecure-Requests: 1
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
User-Agent: Mozilla/5.0 (iPhone; CPU iPhone OS 14_8 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/94.0.4606.76 Mobile/15E148 Safari/604.1
Accept-Language: en-us
Accept-Encoding: gzip, deflate
Connection: keep-alive

AT+CIPSEND=0,17

OK
> 
--------------------
++++++++++++++++++++
 command:	 HTTP/1.1 200 OK
 timeout:	 10 ms
response:
 
Recv 17 bytes

SEND OK

--------------------
++++++++++++++++++++
 command:	 AT+CIPSEND=0,24
 timeout:	 10 ms
response:
 AT+CIPSEND=0,24

OK
> 
--------------------
++++++++++++++++++++
 command:	 Content-type:text/html
 timeout:	 10 ms
response:
 
Recv 24 bytes

SEND OK

--------------------
++++++++++++++++++++
 command:	 AT+CIPSEND=0,19
 timeout:	 10 ms
response:
 AT+CIPSEND=0,19

OK
> 
--------------------
++++++++++++++++++++
 command:	 Connection: close
 timeout:	 10 ms
response:
 
Recv 19 bytes

SEND OK

--------------------
++++++++++++++++++++
 command:	 AT+CIPSEND=0,2
 timeout:	 10 ms
response:
 AT+CIPSEND=0,2

OK
> 
--------------------
++++++++++++++++++++
 command:	 
 timeout:	 10 ms
response:
 
Recv 2 bytes

SEND OK

--------------------
++++++++++++++++++++
 command:	 AT+CIPSEND=0,14
 timeout:	 10 ms
response:
 AT+CIPSEND=0,14

OK
> 
--------------------
++++++++++++++++++++
 command:	 <html><body>
 timeout:	 10 ms
response:
 
Recv 14 bytes

SEND OK

--------------------
++++++++++++++++++++
 command:	 AT+CIPSEND=0,23
 timeout:	 10 ms
response:
 AT+CIPSEND=0,23

OK
> 
--------------------
++++++++++++++++++++
 command:	 <h1>Hello World!</h1>
 timeout:	 10 ms
response:
 
Recv 23 bytes

SEND OK

--------------------
++++++++++++++++++++
 command:	 AT+CIPSEND=0,11
 timeout:	 10 ms
response:
 AT+CIPSEND=0,11

OK
> 
--------------------
++++++++++++++++++++
 command:	 message 0
 timeout:	 10 ms
response:
 
Recv 11 bytes

SEND OK

--------------------
++++++++++++++++++++
 command:	 AT+CIPSEND=0,16
 timeout:	 10 ms
response:
 AT+CIPSEND=0,16

OK
> 
--------------------
++++++++++++++++++++
 command:	 </body></html>
 timeout:	 10 ms
response:
 
Recv 16 bytes

SEND OK

--------------------
++++++++++++++++++++
 command:	 AT+CIPCLOSE=0
 timeout:	 500 ms
.response:
 AT+CIPCLOSE=0
0,CLOSED

OK
0,CONNECT

+IPD,0,301:GET /favicon.ico HTTP/1.1
Host: 10.5.244.171
Connection: keep-alive
DNT: 1
User-Agent: Mozilla/5.0 (iPhone; CPU iPhone OS 14_8 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/94.0.4606.76 Mobile/15E148 Safari/604.1
Accept-Encoding: gzip, deflate
Accept-Language: en-US,en;q=0.9


--------------------
.AT response received
0 : 1,CONNECT
1 : 
++++++++++++++++++++
 command:	 AT+CIPSEND=0,17
 timeout:	 10 ms
response:
 +IPD,1,376:GET / HTTP/1.1
Host: 10.5.244.171
Upgrade-Insecure-Requests: 1
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
User-Agent: Mozilla/5.0 (iPhone; CPU iPhone OS 14_8 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/94.0.4606.76 Mobile/15E148 Safari/604.1
Accept-Language: en-us
Accept-Encoding: gzip, deflate
Connection: keep-alive

AT+CIPSEND=0,17

OK
> 
--------------------
++++++++++++++++++++
 command:	 HTTP/1.1 200 OK
 timeout:	 10 ms
response:
 
Recv 17 bytes

--------------------
status =  UNKNOWN
++++++++++++++++++++
 command:	 AT+CIPSEND=0,24
 timeout:	 10 ms
response:
 AT+CIPSEND=0,24
busy s...

--------------------
status =  UNKNOWN
++++++++++++++++++++
 command:	 Content-type:text/html
 timeout:	 10 ms
response:
 Content-type:text/html
busy s...

--------------------
status =  UNKNOWN
++++++++++++++++++++
 command:	 AT+CIPSEND=0,19
 timeout:	 10 ms
response:
 AT+CIPSEND=0,19
busy s...

--------------------
status =  UNKNOWN
++++++++++++++++++++
 command:	 Connection: close
 timeout:	 10 ms
response:
 Connection: close
busy s...

SEND OK

--------------------
++++++++++++++++++++
 command:	 AT+CIPSEND=0,2
 timeout:	 10 ms
response:
 AT+CIPSEND=0,2

OK
> 
--------------------
++++++++++++++++++++
 command:	 
 timeout:	 10 ms
response:
 
Recv 2 bytes

--------------------
status =  UNKNOWN
++++++++++++++++++++
 command:	 AT+CIPSEND=0,14
 timeout:	 10 ms
response:
 AT+CIPSEND=0,14
busy s...

--------------------
status =  UNKNOWN
++++++++++++++++++++
 command:	 <html><body>
 timeout:	 10 ms
response:
 <html><body>
busy s...

--------------------
status =  UNKNOWN
++++++++++++++++++++
 command:	 AT+CIPSEND=0,23
 timeout:	 10 ms
response:
 AT+CIPSEND=0,23
busy s...

--------------------
status =  UNKNOWN
++++++++++++++++++++
 command:	 <h1>Hello World!</h1>
 timeout:	 10 ms
response:
 <h1>Hello World!</h1>
busy s...

--------------------
status =  UNKNOWN
++++++++++++++++++++
 command:	 AT+CIPSEND=0,11
 timeout:	 10 ms
response:
 AT+CIPSEND=0,11
busy s...

--------------------
status =  UNKNOWN
++++++++++++++++++++
 command:	 message 1
 timeout:	 10 ms
response:
 message 1
busy s...

--------------------
status =  UNKNOWN
++++++++++++++++++++
 command:	 AT+CIPSEND=0,16
 timeout:	 10 ms
response:
 AT+CIPSEND=0,16
busy s...

--------------------
status =  UNKNOWN
++++++++++++++++++++
 command:	 </body></html>
 timeout:	 10 ms
response:
 </body></html>
busy s...

--------------------
status =  UNKNOWN
++++++++++++++++++++
 command:	 AT+CIPCLOSE=0
 timeout:	 500 ms
response:
 AT+CIPCLOSE=0
busy s...

--------------------
status =  UNKNOWN
AT response received
0 : 
++++++++++++++++++++
 command:	 AT+CIPSEND=0,17
 timeout:	 10 ms
response:
 SEND OK
AT+CIPSEND=0,17

OK
> 
--------------------
++++++++++++++++++++
 command:	 HTTP/1.1 200 OK
 timeout:	 10 ms
response:
 
Recv 17 bytes

--------------------
status =  UNKNOWN
++++++++++++++++++++
 command:	 AT+CIPSEND=0,24
 timeout:	 10 ms
response:
 AT+CIPSEND=0,24
busy s...

--------------------
status =  UNKNOWN
++++++++++++++++++++
 command:	 Content-type:text/html
 timeout:	 10 ms
response:
 Content-type:text/html
busy s...

--------------------
status =  UNKNOWN
++++++++++++++++++++
 command:	 AT+CIPSEND=0,19
 timeout:	 10 ms
response:
 AT+CIPSEND=0,19
busy s...

SEND OK

--------------------
++++++++++++++++++++
 command:	 Connection: close
 timeout:	 10 ms
response:
 Connection: close
ERROR

--------------------
status =  ERROR
++++++++++++++++++++
 command:	 AT+CIPSEND=0,2
 timeout:	 10 ms
response:
 AT+CIPSEND=0,2

OK
> 
--------------------
++++++++++++++++++++
 command:	 
 timeout:	 10 ms
response:
 
Recv 2 bytes

SEND OK

--------------------
++++++++++++++++++++
 command:	 AT+CIPSEND=0,14
 timeout:	 10 ms
response:
 AT+CIPSEND=0,14

OK
> 
--------------------
++++++++++++++++++++
 command:	 <html><body>
 timeout:	 10 ms
response:
 
Recv 14 bytes

SEND OK

--------------------
++++++++++++++++++++
 command:	 AT+CIPSEND=0,23
 timeout:	 10 ms
response:
 AT+CIPSEND=0,23

OK
> 
--------------------
++++++++++++++++++++
 command:	 <h1>Hello World!</h1>
 timeout:	 10 ms
response:
 
Recv 23 bytes

SEND OK

--------------------
++++++++++++++++++++
 command:	 AT+CIPSEND=0,11
 timeout:	 10 ms
response:
 AT+CIPSEND=0,11

OK
> 
--------------------
++++++++++++++++++++
 command:	 message 2
 timeout:	 10 ms
response:
 
Recv 11 bytes

SEND OK

--------------------
++++++++++++++++++++
 command:	 AT+CIPSEND=0,16
 timeout:	 10 ms
response:
 AT+CIPSEND=0,16

OK
> 
--------------------
++++++++++++++++++++
 command:	 </body></html>
 timeout:	 10 ms
response:
 
Recv 16 bytes

SEND OK

--------------------
++++++++++++++++++++
 command:	 AT+CIPCLOSE=0
 timeout:	 500 ms
response:
 AT+CIPCLOSE=0
0,CLOSED

OK

--------------------
.....AT response received
0 : 1,CLOSED
1 : 0,CONNECT
2 : 
++++++++++++++++++++
 command:	 AT+CIPSEND=0,17
 timeout:	 10 ms
response:
 +IPD,0,376:GET / HTTP/1.1
Host: 10.5.244.171
Upgrade-Insecure-Requests: 1
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
User-Agent: Mozilla/5.0 (iPhone; CPU iPhone OS 14_8 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/94.0.4606.76 Mobile/15E148 Safari/604.1
Accept-Language: en-us
Accept-Encoding: gzip, deflate
Connection: keep-alive

AT+CIPSEND=0,17

OK
> 
--------------------
++++++++++++++++++++
 command:	 HTTP/1.1 200 OK
 timeout:	 10 ms
response:
 
Recv 17 bytes

SEND OK

--------------------
++++++++++++++++++++
 command:	 AT+CIPSEND=0,24
 timeout:	 10 ms
response:
 AT+CIPSEND=0,24

OK
> 
--------------------
++++++++++++++++++++
 command:	 Content-type:text/html
 timeout:	 10 ms
response:
 
Recv 24 bytes

SEND OK

--------------------
++++++++++++++++++++
 command:	 AT+CIPSEND=0,19
 timeout:	 10 ms
response:
 AT+CIPSEND=0,19

OK
> 
--------------------
++++++++++++++++++++
 command:	 Connection: close
 timeout:	 10 ms
response:
 
Recv 19 bytes

SEND OK

--------------------
++++++++++++++++++++
 command:	 AT+CIPSEND=0,2
 timeout:	 10 ms
response:
 AT+CIPSEND=0,2

OK
> 
--------------------
++++++++++++++++++++
 command:	 
 timeout:	 10 ms
response:
 
Recv 2 bytes

SEND OK

--------------------
++++++++++++++++++++
 command:	 AT+CIPSEND=0,14
 timeout:	 10 ms
response:
 AT+CIPSEND=0,14

OK
> 
--------------------
++++++++++++++++++++
 command:	 <html><body>
 timeout:	 10 ms
response:
 
Recv 14 bytes

SEND OK

--------------------
++++++++++++++++++++
 command:	 AT+CIPSEND=0,23
 timeout:	 10 ms
response:
 AT+CIPSEND=0,23

OK
> 
--------------------
++++++++++++++++++++
 command:	 <h1>Hello World!</h1>
 timeout:	 10 ms
response:
 
Recv 23 bytes

SEND OK

--------------------
++++++++++++++++++++
 command:	 AT+CIPSEND=0,11
 timeout:	 10 ms
response:
 AT+CIPSEND=0,11

OK
> 
--------------------
++++++++++++++++++++
 command:	 message 3
 timeout:	 10 ms
response:
 
Recv 11 bytes

SEND OK

--------------------
++++++++++++++++++++
 command:	 AT+CIPSEND=0,16
 timeout:	 10 ms
response:
 AT+CIPSEND=0,16

OK
> 
--------------------
++++++++++++++++++++
 command:	 </body></html>
 timeout:	 10 ms
response:
 
Recv 16 bytes

SEND OK

--------------------
++++++++++++++++++++
 command:	 AT+CIPCLOSE=0
 timeout:	 500 ms
response:
 AT+CIPCLOSE=0
0,CLOSED

OK
0,CONNECT

+IPD,0,301:GET /favicon.ico HTTP/1.1
Host: 10.5.244.171
Connection: keep-alive
DNT: 1
User-Agent: Mozilla/5.0 (iPhone; CPU iPhone OS 14_8 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/94.0.4606.76 Mobile/15E148 Safari/604.1
Accept-Encoding: gzip, deflate
Accept-Language: en-US,en;q=0.9


--------------------
......
**[ys] <class 'serial.serialutil.SerialException'>
**[ys] read failed: [Errno 6] Device not configured


**[ys] <class 'serial.serialutil.SerialException'>
**[ys] read failed: [Errno 6] Device not configured
    if esp.uart.any():
        recv_buf += esp.uart.readline()
    recv = recv_buf.decode()
    if len(recv) > 0:
        print(recv)
        recv_buf = bytes()
        if "+IPD" in recv:
            time.sleep(1)
            sendline("HTTP/1.1 200 OK")
            sendline("Content-type:text/html")
            sendline("Connection: close")
            sendline("")
            sendline("<h1>Hello World!</h1>")
            sendline(f"time = {(time.ticks_ms() - toc)/1000} seconds")
            esp.send("AT+CIPCLOSE=0")
            time.sleep(1)
            
            
++++++++++++++++++++
 command:	 ATE1
 timeout:	 500 ms
Unicode error encountered, returning byte string.
response:
 b'\xfeATE1\r\r\n\r\nOK\r\n'
--------------------
++++++++++++++++++++
 command:	 AT
 timeout:	 500 ms
response:
 AT

OK

--------------------
AT

OK

++++++++++++++++++++
 command:	 AT+RST
 timeout:	 500 ms
Unicode error encountered, returning byte string.
response:
 b'AT+RST\r\r\n\r\nOK\r\nWIFI DISCONNECT\r\n\r\n ets Jan  8 2013,rst cause:2, boot mode:(3,7)\r\n\r\nload 0x40100000, len 27728, room 16 \r\ntail 0\r\nchksum 0x2a\r\nload 0x3ffe8000, len 2124, room 8 \r\ntail 4\r\nchksum 0x07\r\nload 0x3ffe8850, len 9276, room 4 \r\ntail 8\r\nchksum 0xba\r\ncsum 0xba\r\n\x8c\xe3No\x83l\x8e\x8cd\x130\xe4\x0c\x88\x80\x0c\x8es\x88\x03\x8c\xe3No\x83d\x8e\x8fl\x130\xec\x0c\x88\x80\x0c\x8es\x88\x03\x8c\xe3No\x83l\x8e\x98l\x130\xec\x0c\x88\x80l\x8es\x88\x03s\x88\x03\x8f\t\x907\xff\r\nready\r\n'
--------------------
++++++++++++++++++++
 command:	 AT+GMR
 timeout:	 500 ms
response:
 AT+GMR
AT version:1.1.0.0(May 11 2016 18:09:56)
SDK version:1.5.4(baaeaebb)
compile time:May 20 2016 15:08:19
OK

--------------------
++++++++++++++++++++
 command:	 AT+CWMODE_CUR=1
 timeout:	 500 ms
response:
 AT+CWMODE_CUR=1

OK

--------------------
++++++++++++++++++++
 command:	 b'AT+CWJAP="Wilder\xe2\x80\x99s Edge","FreyaWatson"'
 timeout:	 5000 ms
.response:
 AT+CWJAP="Wilder’s Edge","FreyaWatson"
WIFI CONNECTED
WIFI GOT IP

OK

--------------------
++++++++++++++++++++
 command:	 AT+CIPMUX=1
 timeout:	 500 ms
response:
 AT+CIPMUX=1

OK

--------------------
++++++++++++++++++++
 command:	 AT+CIFSR
 timeout:	 500 ms
response:
 AT+CIFSR
+CIFSR:STAIP,"192.168.86.235"
+CIFSR:STAMAC,"84:cc:a8:b3:b6:f9"

OK

--------------------
++++++++++++++++++++
 command:	 AT+CIPSERVER=1,80
 timeout:	 2000 ms
.response:
 AT+CIPSERVER=1,80

OK

--------------------
.0,CONNECT



+IPD,0,378:GET / HTTP/1.1

++++++++++++++++++++
 command:	 AT+CIPSEND=0,17
 timeout:	 10 ms
response:
 Host: 192.168.86.235
Upgrade-Insecure-Requests: 1
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
User-Agent: Mozilla/5.0 (iPhone; CPU iPhone OS 14_8 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/94.0.4606.76 MobiAT+CIPSEND=0,17

OK
> 
--------------------
++++++++++++++++++++
 command:	 HTTP/1.1 200 OK
 timeout:	 10 ms
response:
 
Recv 17 bytes

--------------------
++++++++++++++++++++
 command:	 AT+CIPSEND=0,24
 timeout:	 10 ms
response:
 AT+CIPSEND=0,24
busy s...

--------------------
++++++++++++++++++++
 command:	 Content-type:text/html
 timeout:	 10 ms
response:
 Content-type:text/html
busy s...

--------------------
++++++++++++++++++++
 command:	 AT+CIPSEND=0,19
 timeout:	 10 ms
response:
 AT+CIPSEND=0,19
busy s...

SEND OK

--------------------
++++++++++++++++++++
 command:	 Connection: close
 timeout:	 10 ms
response:
 Connection: close
ERROR

--------------------
++++++++++++++++++++
 command:	 AT+CIPSEND=0,2
 timeout:	 10 ms
response:
 AT+CIPSEND=0,2

OK
> 
--------------------
++++++++++++++++++++
 command:	 
 timeout:	 10 ms
response:
 
Recv 2 bytes

--------------------
++++++++++++++++++++
 command:	 AT+CIPSEND=0,23
 timeout:	 10 ms
response:
 AT+CIPSEND=0,23
busy s...

--------------------
++++++++++++++++++++
 command:	 <h1>Hello World!</h1>
 timeout:	 10 ms
response:
 <h1>Hello World!</h1>
busy s...

--------------------
++++++++++++++++++++
 command:	 AT+CIPSEND=0,22
 timeout:	 10 ms
response:
 
SEND OK
AT+CIPSEND=0,22

OK
> 
--------------------
++++++++++++++++++++
 command:	 time = 7.459 seconds
 timeout:	 10 ms
response:
 
Recv 22 bytes

--------------------
++++++++++++++++++++
 command:	 AT+CIPCLOSE=0
 timeout:	 500 ms
response:
 
SEND OK
AT+CIPCLOSE=0
0,CLOSED

OK
0,CONNECT

+IPD,0,303:GET /favicon.ico HTTP/1.1
Host: 192.168.86.235
Connection: keep-alive
DNT: 1
User-Agent: Mozilla/5.0 (iPhone; CPU iPhone OS 14_8 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/94.0.4606.76 Mobile/15E148 Safari/604.1
Accept-Encoding: gzip, deflate
Accept-Language: en-US,en;q=0.9


--------------------
.1,CONNECT



+IPD,1,378:GET / HTTP/1.1

.++++++++++++++++++++
 command:	 AT+CIPSEND=0,17
 timeout:	 10 ms
response:
 Host: 192.168.86.235
Upgrade-Insecure-Requests: 1
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
User-Agent: Mozilla/5.0 (iPhone; CPU iPhone OS 14_8 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/94.0.4606.76 MobiAT+CIPSEND=0,17

OK
> 
--------------------
++++++++++++++++++++
 command:	 HTTP/1.1 200 OK
 timeout:	 10 ms
response:
 
Recv 17 bytes

--------------------
++++++++++++++++++++
 command:	 AT+CIPSEND=0,24
 timeout:	 10 ms
response:
 AT+CIPSEND=0,24
busy s...

--------------------
++++++++++++++++++++
 command:	 Content-type:text/html
 timeout:	 10 ms
response:
 Content-type:text/html
busy s...

--------------------
++++++++++++++++++++
 command:	 AT+CIPSEND=0,19
 timeout:	 10 ms
response:
 AT+CIPSEND=0,19
busy s...

--------------------
++++++++++++++++++++
 command:	 Connection: close
 timeout:	 10 ms
response:
 Connection: close
busy s...

--------------------
++++++++++++++++++++
 command:	 AT+CIPSEND=0,2
 timeout:	 10 ms
response:
 AT+CIPSEND=0,2
busy s...

--------------------
++++++++++++++++++++
 command:	 
 timeout:	 10 ms
response:
 
busy s...

--------------------
++++++++++++++++++++
 command:	 AT+CIPSEND=0,23
 timeout:	 10 ms
response:
 AT+CIPSEND=0,23
busy s...

--------------------
++++++++++++++++++++
 command:	 <h1>Hello World!</h1>
 timeout:	 10 ms
response:
 <h1>Hello World!</h1>
busy s...

SEND OK

--------------------
++++++++++++++++++++
 command:	 AT+CIPSEND=0,23
 timeout:	 10 ms
response:
 AT+CIPSEND=0,23

OK
> 
--------------------
++++++++++++++++++++
 command:	 time = 15.632 seconds
 timeout:	 10 ms
response:
 
Recv 23 bytes

--------------------
++++++++++++++++++++
 command:	 AT+CIPCLOSE=0
 timeout:	 500 ms
response:
 AT+CIPCLOSE=0
busy s...

SEND OK

--------------------
..1,CLOSED

1,CONNECT



+IPD,1,378:GET / HTTP/1.1

++++++++++++++++++++
 command:	 AT+CIPSEND=0,17
 timeout:	 10 ms
response:
 Host: 192.168.86.235
Upgrade-Insecure-Requests: 1
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
User-Agent: Mozilla/5.0 (iPhone; CPU iPhone OS 14_8 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/94.0.4606.76 MobiAT+CIPSEND=0,17

OK
> 
--------------------
++++++++++++++++++++
 command:	 HTTP/1.1 200 OK
 timeout:	 10 ms
response:
 
Recv 17 bytes

--------------------
++++++++++++++++++++
 command:	 AT+CIPSEND=0,24
 timeout:	 10 ms
response:
 AT+CIPSEND=0,24
busy s...

--------------------
++++++++++++++++++++
 command:	 Content-type:text/html
 timeout:	 10 ms
response:
 Content-type:text/html
busy s...

--------------------
++++++++++++++++++++
 command:	 AT+CIPSEND=0,19
 timeout:	 10 ms
response:
 AT+CIPSEND=0,19
busy s...

--------------------
++++++++++++++++++++
 command:	 Connection: close
 timeout:	 10 ms
response:
 Connection: close
busy s...

--------------------
++++++++++++++++++++
 command:	 AT+CIPSEND=0,2
 timeout:	 10 ms
response:
 AT+CIPSEND=0,2
busy s...

--------------------
++++++++++++++++++++
 command:	 
 timeout:	 10 ms
response:
 
busy s...

--------------------
++++++++++++++++++++
 command:	 AT+CIPSEND=0,23
 timeout:	 10 ms
response:
 AT+CIPSEND=0,23
busy s...

--------------------
++++++++++++++++++++
 command:	 <h1>Hello World!</h1>
 timeout:	 10 ms
response:
 <h1>Hello World!</h1>
busy s...

--------------------
++++++++++++++++++++
 command:	 AT+CIPSEND=0,23
 timeout:	 10 ms
response:
 AT+CIPSEND=0,23
busy s...

SEND OK

--------------------
++++++++++++++++++++
 command:	 time = 27.904 seconds
 timeout:	 10 ms
response:
 time = 27.904 seconds
ERROR

--------------------
++++++++++++++++++++
 command:	 AT+CIPCLOSE=0
 timeout:	 500 ms
response:
 AT+CIPCLOSE=0
0,CLOSED

OK

--------------------
..1,CLOSED

0,CONNECT



+IPD,0,378:GET / HTTP/1.1

++++++++++++++++++++
 command:	 AT+CIPSEND=0,17
 timeout:	 10 ms
response:
 Host: 192.168.86.235
Upgrade-Insecure-Requests: 1
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
User-Agent: Mozilla/5.0 (iPhone; CPU iPhone OS 14_8 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/94.0.4606.76 MobiAT+CIPSEND=0,17

OK
> 
--------------------
++++++++++++++++++++
 command:	 HTTP/1.1 200 OK
 timeout:	 10 ms
response:
 
Recv 17 bytes

--------------------
++++++++++++++++++++
 command:	 AT+CIPSEND=0,24
 timeout:	 10 ms
response:
 AT+CIPSEND=0,24
busy s...

--------------------
++++++++++++++++++++
 command:	 Content-type:text/html
 timeout:	 10 ms
response:
 Content-type:text/html
busy s...

--------------------
++++++++++++++++++++
 command:	 AT+CIPSEND=0,19
 timeout:	 10 ms
response:
 AT+CIPSEND=0,19
busy s...

--------------------
++++++++++++++++++++
 command:	 Connection: close
 timeout:	 10 ms
response:
 Connection: close
busy s...

SEND OK

--------------------
++++++++++++++++++++
 command:	 AT+CIPSEND=0,2
 timeout:	 10 ms
response:
 AT+CIPSEND=0,2

OK
> 
--------------------
++++++++++++++++++++
 command:	 
 timeout:	 10 ms
response:
 
Recv 2 bytes

--------------------
++++++++++++++++++++
 command:	 AT+CIPSEND=0,23
 timeout:	 10 ms
response:
 
SEND OK
AT+CIPSEND=0,23

OK
> 
--------------------
++++++++++++++++++++
 command:	 <h1>Hello World!</h1>
 timeout:	 10 ms
response:
 
Recv 23 bytes

SEND OK

--------------------
++++++++++++++++++++
 command:	 AT+CIPSEND=0,23
 timeout:	 10 ms
response:
 AT+CIPSEND=0,23

OK
> 
--------------------
++++++++++++++++++++
 command:	 time = 41.042 seconds
 timeout:	 10 ms
response:
 
Recv 23 bytes

SEND OK

--------------------
++++++++++++++++++++
 command:	 AT+CIPCLOSE=0
 timeout:	 500 ms
response:
 AT+CIPCLOSE=0
0,CLOSED

OK
0,CONNECT

+IPD,0,303:GET /favicon.ico HTTP/1.1
Host: 192.168.86.235
Connection: keep-alive
DNT: 1
User-Agent: Mozilla/5.0 (iPhone; CPU iPhone OS 14_8 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/94.0.4606.76 Mobile/15E148 Safari/604.1
Accept-Encoding: gzip, deflate
Accept-Language: en-US,en;q=0.9


--------------------
.1,CONNECT



+IPD,1,378:GET / HTTP/1.1

++++++++++++++++++++
 command:	 AT+CIPSEND=0,17
 timeout:	 10 ms
response:
 Host: 192.168.86.235
Upgrade-Insecure-Requests: 1
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
User-Agent: Mozilla/5.0 (iPhone; CPU iPhone OS 14_8 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/94.0.4606.76 MobiAT+CIPSEND=0,17

OK
> 
--------------------
++++++++++++++++++++
 command:	 HTTP/1.1 200 OK
 timeout:	 10 ms
response:
 
Recv 17 bytes

--------------------
++++++++++++++++++++
 command:	 AT+CIPSEND=0,24
 timeout:	 10 ms
response:
 AT+CIPSEND=0,24
busy s...

--------------------
++++++++++++++++++++
 command:	 Content-type:text/html
 timeout:	 10 ms
response:
 Content-type:text/html
busy s...

--------------------
++++++++++++++++++++
 command:	 AT+CIPSEND=0,19
 timeout:	 10 ms
response:
 AT+CIPSEND=0,19
busy s...

--------------------
++++++++++++++++++++
 command:	 Connection: close
 timeout:	 10 ms
response:
 
SEND OK
Connection: close
ERROR

--------------------
++++++++++++++++++++
 command:	 AT+CIPSEND=0,2
 timeout:	 10 ms
response:
 AT+CIPSEND=0,2

OK
> 
--------------------
++++++++++++++++++++
 command:	 
 timeout:	 10 ms
response:
 
Recv 2 bytes

SEND OK

--------------------
++++++++++++++++++++
 command:	 AT+CIPSEND=0,23
 timeout:	 10 ms
response:
 AT+CIPSEND=0,23

OK
> 
--------------------
++++++++++++++++++++
 command:	 <h1>Hello World!</h1>
 timeout:	 10 ms
response:
 
Recv 23 bytes

SEND OK

--------------------
++++++++++++++++++++
 command:	 AT+CIPSEND=0,22
 timeout:	 10 ms
response:
 AT+CIPSEND=0,22

OK
> 
--------------------
++++++++++++++++++++
 command:	 time = 44.12 seconds
 timeout:	 10 ms
response:
 
Recv 22 bytes

SEND OK

--------------------
++++++++++++++++++++
 command:	 AT+CIPCLOSE=0
 timeout:	 500 ms
response:
 AT+CIPCLOSE=0
0,CLOSED

OK

--------------------
....1,CLOSED

0,CONNECT



+IPD,0,378:GET / HTTP/1.1

++++++++++++++++++++
 command:	 AT+CIPSEND=0,17
 timeout:	 10 ms
response:
 Host: 192.168.86.235
Upgrade-Insecure-Requests: 1
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
User-Agent: Mozilla/5.0 (iPhone; CPU iPhone OS 14_8 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/94.0.4606.76 MobiAT+CIPSEND=0,17

OK
> 
--------------------
++++++++++++++++++++
 command:	 HTTP/1.1 200 OK
 timeout:	 10 ms
response:
 
Recv 17 bytes

--------------------
++++++++++++++++++++
 command:	 AT+CIPSEND=0,24
 timeout:	 10 ms
response:
 AT+CIPSEND=0,24
busy s...

--------------------
++++++++++++++++++++
 command:	 Content-type:text/html
 timeout:	 10 ms
response:
 Content-type:text/html
busy s...

--------------------
++++++++++++++++++++
 command:	 AT+CIPSEND=0,19
 timeout:	 10 ms
response:
 AT+CIPSEND=0,19
busy s...

SEND OK

--------------------
++++++++++++++++++++
 command:	 Connection: close
 timeout:	 10 ms
response:
 Connection: close
ERROR

--------------------
++++++++++++++++++++
 command:	 AT+CIPSEND=0,2
 timeout:	 10 ms
response:
 AT+CIPSEND=0,2

OK
> 
--------------------
++++++++++++++++++++
 command:	 
 timeout:	 10 ms
response:
 
Recv 2 bytes

SEND OK

--------------------
++++++++++++++++++++
 command:	 AT+CIPSEND=0,23
 timeout:	 10 ms
response:
 AT+CIPSEND=0,23

OK
> 
--------------------
++++++++++++++++++++
 command:	 <h1>Hello World!</h1>
 timeout:	 10 ms
response:
 
Recv 23 bytes

SEND OK

--------------------
++++++++++++++++++++
 command:	 AT+CIPSEND=0,23
 timeout:	 10 ms
response:
 AT+CIPSEND=0,23

OK
> 
--------------------
++++++++++++++++++++
 command:	 time = 68.918 seconds
 timeout:	 10 ms
response:
 
Recv 23 bytes

SEND OK

--------------------
++++++++++++++++++++
 command:	 AT+CIPCLOSE=0
 timeout:	 500 ms
response:
 AT+CIPCLOSE=0
0,CLOSED

OK
0,CONNECT

+IPD,0,303:GET /favicon.ico HTTP/1.1
Host: 192.168.86.235
Connection: keep-alive
DNT: 1
User-Agent: Mozilla/5.0 (iPhone; CPU iPhone OS 14_8 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/94.0.4606.76 Mobile/15E148 Safari/604.1
Accept-Encoding: gzip, deflate
Accept-Language: en-US,en;q=0.9


--------------------
...1,CONNECT



+IPD,1,378:GET / HTTP/1.1

++++++++++++++++++++
 command:	 AT+CIPSEND=0,17
 timeout:	 10 ms
response:
 Host: 192.168.86.235
Upgrade-Insecure-Requests: 1
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
User-Agent: Mozilla/5.0 (iPhone; CPU iPhone OS 14_8 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/94.0.4606.76 MobiAT+CIPSEND=0,17

OK
> 
--------------------
++++++++++++++++++++
 command:	 HTTP/1.1 200 OK
 timeout:	 10 ms
response:
 
Recv 17 bytes

--------------------
++++++++++++++++++++
 command:	 AT+CIPSEND=0,24
 timeout:	 10 ms
response:
 
SEND OK
AT+CIPSEND=0,24

OK
> 
--------------------
++++++++++++++++++++
 command:	 Content-type:text/html
 timeout:	 10 ms
response:
 
Recv 24 bytes

SEND OK

--------------------
++++++++++++++++++++
 command:	 AT+CIPSEND=0,19
 timeout:	 10 ms
response:
 AT+CIPSEND=0,19

OK
> 
--------------------
++++++++++++++++++++
 command:	 Connection: close
 timeout:	 10 ms
response:
 
Recv 19 bytes

SEND OK

--------------------
++++++++++++++++++++
 command:	 AT+CIPSEND=0,2
 timeout:	 10 ms
response:
 AT+CIPSEND=0,2

OK
> 
--------------------
++++++++++++++++++++
 command:	 
 timeout:	 10 ms
response:
 
Recv 2 bytes

--------------------
++++++++++++++++++++
 command:	 AT+CIPSEND=0,23
 timeout:	 10 ms
response:
 
SEND OK
AT+CIPSEND=0,23

OK
> 
--------------------
++++++++++++++++++++
 command:	 <h1>Hello World!</h1>
 timeout:	 10 ms
response:
 
Recv 23 bytes

SEND OK

--------------------
++++++++++++++++++++
 command:	 AT+CIPSEND=0,25
 timeout:	 10 ms
response:
 AT+CIPSEND=0,25

OK
> 
--------------------
++++++++++++++++++++
 command:	 time = 84.27401 seconds
 timeout:	 10 ms
response:
 
Recv 25 bytes

--------------------
++++++++++++++++++++
 command:	 AT+CIPCLOSE=0
 timeout:	 500 ms
response:
 
SEND OK
AT+CIPCLOSE=0
0,CLOSED

OK

--------------------
.....0,CONNECT

2,CONNECT



+IPD,2,472:GET / HTTP/1.1

++++++++++++++++++++
 command:	 AT+CIPSEND=0,17
 timeout:	 10 ms
response:
 Host: 192.168.86.235
Connection: keep-alive
Cache-Control: max-age=0
DNT: 1
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/94.0.4606.81 Safari/537.36
Accept: textAT+CIPSEND=0,17

OK
> 
--------------------
++++++++++++++++++++
 command:	 HTTP/1.1 200 OK
 timeout:	 10 ms
response:
 
Recv 17 bytes

--------------------
++++++++++++++++++++
 command:	 AT+CIPSEND=0,24
 timeout:	 10 ms
response:
 AT+CIPSEND=0,24
busy s...

--------------------
++++++++++++++++++++
 command:	 Content-type:text/html
 timeout:	 10 ms
response:
 Content-type:text/html
busy s...

--------------------
++++++++++++++++++++
 command:	 AT+CIPSEND=0,19
 timeout:	 10 ms
response:
 AT+CIPSEND=0,19
busy s...

--------------------
++++++++++++++++++++
 command:	 Connection: close
 timeout:	 10 ms
response:
 Connection: close
busy s...

SEND OK

--------------------
++++++++++++++++++++
 command:	 AT+CIPSEND=0,2
 timeout:	 10 ms
response:
 AT+CIPSEND=0,2

OK
> 
--------------------
++++++++++++++++++++
 command:	 
 timeout:	 10 ms
response:
 
Recv 2 bytes

SEND OK

--------------------
++++++++++++++++++++
 command:	 AT+CIPSEND=0,23
 timeout:	 10 ms
response:
 AT+CIPSEND=0,23

OK
> 
--------------------
++++++++++++++++++++
 command:	 <h1>Hello World!</h1>
 timeout:	 10 ms
response:
 
Recv 23 bytes

SEND OK

--------------------
++++++++++++++++++++
 command:	 AT+CIPSEND=0,24
 timeout:	 10 ms
response:
 AT+CIPSEND=0,24

OK
> 
--------------------
++++++++++++++++++++
 command:	 time = 109.225 seconds
 timeout:	 10 ms
response:
 
Recv 24 bytes

SEND OK

--------------------
++++++++++++++++++++
 command:	 AT+CIPCLOSE=0
 timeout:	 500 ms
response:
 AT+CIPCLOSE=0
0,CLOSED

OK

--------------------
....1,CONNECT FAIL

2,CLOSED

..0,CONNECT



+IPD,0,389:GET /favicon.ico HTTP/1.1

++++++++++++++++++++
 command:	 AT+CIPSEND=0,17
 timeout:	 10 ms
response:
 Host: 192.168.86.235
Connection: keep-alive
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/94.0.4606.81 Safari/537.36
DNT: 1
Accept: image/avif,image/webp,image/apng,image/svg+xml,image/*,*/*;qAT+CIPSEND=0,17

OK
> 
--------------------
++++++++++++++++++++
 command:	 HTTP/1.1 200 OK
 timeout:	 10 ms
response:
 
Recv 17 bytes

SEND OK

--------------------
++++++++++++++++++++
 command:	 AT+CIPSEND=0,24
 timeout:	 10 ms
response:
 AT+CIPSEND=0,24

OK
> 
--------------------
++++++++++++++++++++
 command:	 Content-type:text/html
 timeout:	 10 ms
response:
 
Recv 24 bytes

SEND OK

--------------------
++++++++++++++++++++
 command:	 AT+CIPSEND=0,19
 timeout:	 10 ms
response:
 AT+CIPSEND=0,19

OK
> 
--------------------
++++++++++++++++++++
 command:	 Connection: close
 timeout:	 10 ms
response:
 
Recv 19 bytes

SEND OK

--------------------
++++++++++++++++++++
 command:	 AT+CIPSEND=0,2
 timeout:	 10 ms
response:
 AT+CIPSEND=0,2

OK
> 
--------------------
++++++++++++++++++++
 command:	 
 timeout:	 10 ms
response:
 
Recv 2 bytes

SEND OK

--------------------
++++++++++++++++++++
 command:	 AT+CIPSEND=0,23
 timeout:	 10 ms
response:
 AT+CIPSEND=0,23

OK
> 
--------------------
++++++++++++++++++++
 command:	 <h1>Hello World!</h1>
 timeout:	 10 ms
response:
 
Recv 23 bytes

SEND OK

--------------------
++++++++++++++++++++
 command:	 AT+CIPSEND=0,23
 timeout:	 10 ms
response:
 AT+CIPSEND=0,23

OK
> 
--------------------
++++++++++++++++++++
 command:	 time = 141.62 seconds
 timeout:	 10 ms
response:
 
Recv 23 bytes

SEND OK

--------------------
++++++++++++++++++++
 command:	 AT+CIPCLOSE=0
 timeout:	 500 ms
response:
 AT+CIPCLOSE=0
0,CLOSED

OK

--------------------
...0,CONNECT



+IPD,0,446:GET / HTTP/1.1

++++++++++++++++++++
 command:	 AT+CIPSEND=0,17
 timeout:	 10 ms
response:
 Host: 192.168.86.235
Connection: keep-alive
DNT: 1
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/94.0.4606.81 Safari/537.36
Accept: text/html,application/xhtml+xmAT+CIPSEND=0,17

OK
> 
--------------------
++++++++++++++++++++
 command:	 HTTP/1.1 200 OK
 timeout:	 10 ms
response:
 
Recv 17 bytes

--------------------
++++++++++++++++++++
 command:	 AT+CIPSEND=0,24
 timeout:	 10 ms
response:
 AT+CIPSEND=0,24
busy s...

--------------------
++++++++++++++++++++
 command:	 Content-type:text/html
 timeout:	 10 ms
response:
 Content-type:text/html
busy s...

--------------------
++++++++++++++++++++
 command:	 AT+CIPSEND=0,19
 timeout:	 10 ms
response:
 AT+CIPSEND=0,19
busy s...

--------------------
++++++++++++++++++++
 command:	 Connection: close
 timeout:	 10 ms
response:
 Connection: close
busy s...

--------------------
++++++++++++++++++++
 command:	 AT+CIPSEND=0,2
 timeout:	 10 ms
response:
 AT+CIPSEND=0,2
busy s...

--------------------
++++++++++++++++++++
 command:	 
 timeout:	 10 ms
response:
 
busy s...

--------------------
++++++++++++++++++++
 command:	 AT+CIPSEND=0,23
 timeout:	 10 ms
response:
 
SEND OK
AT+CIPSEND=0,23

OK
> 
--------------------
++++++++++++++++++++
 command:	 <h1>Hello World!</h1>
 timeout:	 10 ms
response:
 
Recv 23 bytes

SEND OK

--------------------
++++++++++++++++++++
 command:	 AT+CIPSEND=0,24
 timeout:	 10 ms
response:
 AT+CIPSEND=0,24

OK
> 
--------------------
++++++++++++++++++++
 command:	 time = 156.518 seconds
 timeout:	 10 ms
response:
 
Recv 24 bytes

--------------------
++++++++++++++++++++
 command:	 AT+CIPCLOSE=0
 timeout:	 500 ms
response:
 
SEND OK
AT+CIPCLOSE=0
0,CLOSED

OK
0,CONNECT

+IPD,0,389:GET /favicon.ico HTTP/1.1
Host: 192.168.86.235
Connection: keep-alive
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/94.0.4606.81 Safari/537.36
DNT: 1
Accept: image/avif,image/webp,image/apng,image/svg+xml,image/*,*/*;q=0.8
Referer: http://192.168.86.235/
Accept-Encoding: gzip, deflate
Accept-Language: en-US,en;q=0.9


--------------------
.1,CONNECT



+IPD,1,472:GET / HTTP/1.1

++++++++++++++++++++
 command:	 AT+CIPSEND=0,17
 timeout:	 10 ms
response:
 Host: 192.168.86.235
Connection: keep-alive
Cache-Control: max-age=0
DNT: 1
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/94.0.4606.81 Safari/537.36
Accept: textAT+CIPSEND=0,17

OK
> 
--------------------
++++++++++++++++++++
 command:	 HTTP/1.1 200 OK
 timeout:	 10 ms
response:
 
Recv 17 bytes

SEND OK

--------------------
++++++++++++++++++++
 command:	 AT+CIPSEND=0,24
 timeout:	 10 ms
response:
 AT+CIPSEND=0,24

OK
> 
--------------------
++++++++++++++++++++
 command:	 Content-type:text/html
 timeout:	 10 ms
response:
 
Recv 24 bytes

SEND OK

--------------------
++++++++++++++++++++
 command:	 AT+CIPSEND=0,19
 timeout:	 10 ms
response:
 AT+CIPSEND=0,19

OK
> 
--------------------
++++++++++++++++++++
 command:	 Connection: close
 timeout:	 10 ms
response:
 
Recv 19 bytes

SEND OK

--------------------
++++++++++++++++++++
 command:	 AT+CIPSEND=0,2
 timeout:	 10 ms
response:
 AT+CIPSEND=0,2

OK
> 
--------------------
++++++++++++++++++++
 command:	 
 timeout:	 10 ms
response:
 
Recv 2 bytes

SEND OK

--------------------
++++++++++++++++++++
 command:	 AT+CIPSEND=0,23
 timeout:	 10 ms
response:
 AT+CIPSEND=0,23

OK
> 
--------------------
++++++++++++++++++++
 command:	 <h1>Hello World!</h1>
 timeout:	 10 ms
response:
 
Recv 23 bytes

--------------------
++++++++++++++++++++
 command:	 AT+CIPSEND=0,23
 timeout:	 10 ms
response:
 
SEND OK
AT+CIPSEND=0,23

OK
> 
--------------------
++++++++++++++++++++
 command:	 time = 163.19 seconds
 timeout:	 10 ms
response:
 
Recv 23 bytes

SEND OK

--------------------
++++++++++++++++++++
 command:	 AT+CIPCLOSE=0
 timeout:	 500 ms
response:
 AT+CIPCLOSE=0
0,CLOSED

OK

--------------------
..1,CLOSED

...................................................
**[ys] <class 'serial.serialutil.SerialException'>
**[ys] read failed: [Errno 6] Device not configured


**[ys] <class 'serial.serialutil.SerialException'>
**[ys] read failed: [Errno 6] Device not configured
print(esp.get_wifi_mode())
--------------------
 command:	 AT+CWMODE_CUR?
 timeout:	 500 ms
response:	 AT+CWMODE_CUR?
+CWMODE_CUR:1

OK

--------------------
STA
      
esp = ESP01S(verbose=True)
#print(esp.restart())
print(esp.version())
print(esp.set_wifi_mode(1))
print(esp.get_wifi_mode())
print(esp.send("AT+CWJAP?"))

print(esp.connect_wifi("Wilder\u2019s Edge", "FreyaWatson"))
Found serial ports: /dev/cu.usbmodem14101, /dev/cu.Bluetooth-Incoming-Port 
Connecting to --port=/dev/cu.usbmodem14101 --baud=115200 
Ready.
--------------------
 command:	 ATE1
 timeout:	 500 ms
response:	 b'ATE1\r\r\n\r\nOK\r\n'
--------------------
--------------------
 command:	 AT
 timeout:	 500 ms
response:	 b'AT\r\r\n\r\nOK\r\n'
--------------------
AT

OK

--------------------
 command:	 AT+GMR
 timeout:	 500 ms
response:	 b'AT+GMR\r\r\nAT version:1.1.0.0(May 11 2016 18:09:56)\r\nSDK version:1.5.4(baaeaebb)\r\ncompile time:May 20 2016 15:08:19\r\nOK\r\n'
--------------------
AT+GMR
AT version:1.1.0.0(May 11 2016 18:09:56)
SDK version:1.5.4(baaeaebb)
compile time:May 20 2016 15:08:19
OK

--------------------
 command:	 AT+CWMODE_CUR=1
 timeout:	 500 ms
response:	 b'AT+CWMODE_CUR=1\r\r\n\r\nOK\r\n'
--------------------
AT+CWMODE_CUR=1

OK

--------------------
 command:	 AT+CWMODE_CUR?
 timeout:	 500 ms
response:	 b'AT+CWMODE_CUR?\r\r\n+CWMODE_CUR:1\r\n\r\nOK\r\n'
--------------------
STA
--------------------
 command:	 AT+CWJAP?
 timeout:	 500 ms
response:	 b'AT+CWJAP?\r\r\n+CWJAP:"Wilder\xe2\x80\x99s Edge","70:3a:cb:da:fb:ae",11,-55\r\n\r\nOK\r\n'
--------------------
AT+CWJAP?
+CWJAP:"Wilder’s Edge","70:3a:cb:da:fb:ae",11,-55

OK

AT+CWJAP="Wilder’s Edge","FreyaWatson"
--------------------
 command:	 b'AT+CWJAP="Wilder\xe2\x80\x99s Edge","FreyaWatson"'
 timeout:	 10000 ms
..response:	 b'AT+CWJAP="Wilder\xe2\x80\x99s Edge","FreyaWatson"\r\r\nWIFI DISCONNECT\r\n'
--------------------
AT+CWJAP="Wilder’s Edge","FreyaWatson"
WIFI DISCONNECT
print(esp.send("AT+CWJAP?"))
--------------------
 command:	 AT+CWJAP?
 timeout:	 500 ms
response:	 b'AT+CWJAP?\r\r\n+CWJAP:"Wilder\xe2\x80\x99s Edge","70:3a:cb:db:02:db",1,-85\r\n\r\nOK\r\n'
--------------------
AT+CWJAP?
+CWJAP:"Wilder’s Edge","70:3a:cb:db:02:db",1,-85

OK
resp =  esp.get_wifi_APs() 
--------------------
 command:	 AT+CWLAP
 timeout:	 5000 ms
..response:	 b'AT+CWLAP\r\r\n+CWLAP:(3,"Wilder\xe2\x80\x99s Edge",-66,"7c:2e:bd:8a:18:61",1,13,0)\r\n+CWLAP:(3,"Wilder\xe2\x80\x99s Edge",-45,"70:3a:cb:db:02:db",1,18,0)\r\n+CWLAP:(3,"bermuda10",-84,"70:3a:cb:b4:9b:85",1,10,0)\r\n+CWLAP:(3,"bermuda10",-75,"70:3a:cb:b4:95:e4",1,18,0)\r\n+CWLAP:(3,"bermuda10",-90,"44:07:0b:0f:13:4f",1,18,0)\r\n+CWLAP:(3,"Wilder\xe2\x80\x99s Edge",-50,"7c:2e:bd:8a:13:d3",6,13,0)\r\n+CWLAP:(3,"Wilder\xe2\x80\x99s Edge",-66,"70:3a:cb:db:06:f0",6,13,0)\r\n+CWLAP:(3,"ATT9ssH4wv_2GEXT",-88,"8c:3b:ad:1f:2c:fc",10,0,0)\r\n+CWLAP:(3,"Wilder\xe2\x80\x99s Edge",-81,"7c:2e:bd:8a:21:51",11,16,0)\r\n+CWLAP:(3,"Wilder\xe2\x80\x99s Edge",-82,"44:07:0b:06:e8:d6",11,15,0)\r\n\r\nOK\r\n'
--------------------
aps = [r for r in resp.split("\r\n") if "+CWLAP:" in r]
print(aps)
['+CWLAP:(3,"Wilder\u2019s Edge",-66,"7c:2e:bd:8a:18:61",1,13,0)', '+CWLAP:(3,"Wilder\u2019s Edge",-45,"70:3a:cb:db:02:db",1,18,0)', '+CWLAP:(3,"bermuda10",-84,"70:3a:cb:b4:9b:85",1,10,0)', '+CWLAP:(3,"bermuda10",-75,"70:3a:cb:b4:95:e4",1,18,0)', '+CWLAP:(3,"bermuda10",-90,"44:07:0b:0f:13:4f",1,18,0)', '+CWLAP:(3,"Wilder\u2019s Edge",-50,"7c:2e:bd:8a:13:d3",6,13,0)', '+CWLAP:(3,"Wilder\u2019s Edge",-66,"70:3a:cb:db:06:f0",6,13,0)', '+CWLAP:(3,"ATT9ssH4wv_2GEXT",-88,"8c:3b:ad:1f:2c:fc",10,0,0)', '+CWLAP:(3,"Wilder\u2019s Edge",-81,"7c:2e:bd:8a:21:51",11,16,0)', '+CWLAP:(3,"Wilder\u2019s Edge",-82,"44:07:0b:06:e8:d6",11,15,0)']