Skip to content

HTTPS Server now works on ESP32-S3 but MemoryError on Pico W and ESP32-S2 #87

Closed
@anecdata

Description

@anecdata

Filing here first, though it could be a core issue and get moved.

An HTTPS server was published by a community member in early 2023 that worked on Pico W (but ran a bit slow):
https://github.com/ide/circuitpython-https-server

Then there was recently some core development to make HTTPS Server work on espressif boards:
adafruit/circuitpython#8268
adafruit/circuitpython#8932
adafruit/circuitpython#8962
(plus further changes to require explicit SO_REUSEADDR)

However, HTTPS Server seems to have broken on Pico W with MemoryError, somewhere between 8.0.0 and 8.1.0 (bisect of CP versions, but using latest 4.5.5 adafruit_HTTPServer).

Also, although HTTPS Server does now run well on ESP32-S3 boards, ESP32-S2 boards (with PSRAM) also get the MemoryError.

The MemoryError occurs in poll, when calling socket.accept():

Traceback (most recent call last):
  File "code.py", line 72, in <module>
  File "adafruit_httpserver/server.py", line 450, in poll
  File "adafruit_httpserver/server.py", line 404, in poll
MemoryError: 

Boards tested:

Adafruit CircuitPython 9.0.0-beta.2-4-gf23205c822 on 2024-02-20; Adafruit QT Py ESP32-S3 4MB Flash 2MB PSRAM with ESP32S3
Adafruit CircuitPython 9.0.0-beta.2-4-gf23205c822 on 2024-02-20; Adafruit QT Py ESP32S2 with ESP32S2
Adafruit CircuitPython 9.0.0-beta.2-4-gf23205c822 on 2024-02-20; Raspberry Pi Pico W with rp2040

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions