-
Notifications
You must be signed in to change notification settings - Fork 143
Closed
Description
Describe Your Goal
Run a https server on esp32s2 compile with arduino-cli
What Does Your Project Look Like
..
If you can boil your question down to a minimal working example, please do so and share the code here:
[example](https://github.com/fhessel/esp32_https_server/blob/master/examples/HTTPS-and-HTTP/HTTPS-and-HTTP.ino)ESP32 Module
Please provide specifications of your module
- RAM/PSRAM: 2MB
- Flash Size: 4MB
- Other special properties: https://www.wemos.cc/en/latest/s2/s2_mini.html
Software (please complete the following information if applicable)
- IDE and Version: arduino-cli@0.34.2
- OS: ubuntu22.04
- Dockerfile
From ubuntu:22.04
RUN apt update; apt install curl tar make libgcrypt-dev gcc srecord zip python3 gzip unzip python3-dev python3-distutils rar git -y
RUN curl -fsSL https://raw.githubusercontent.com/arduino/arduino-cli/master/install.sh | BINDIR=/bin sh -s 0.34.2
RUN arduino-cli config init && arduino-cli config add board_manager.additional_urls https://dl.espressif.com/dl/package_esp32_index.json
RUN arduino-cli config set library.enable_unsafe_install true
RUN arduino-cli core update-index --additional-urls https://dl.espressif.com/dl/package_esp32_index.json
RUN arduino-cli core install esp32:esp32
RUN arduino-cli core upgrade
RUN curl -fsSL https://bootstrap.pypa.io/get-pip.py|python3
RUN pip3 install pyserial
RUN update-alternatives --install /usr/bin/python python /usr/bin/python3 2
RUN arduino-cli lib install --git-url https://github.com/fhessel/esp32_https_server
RUN arduino-cli lib upgrade
RUN sed -i "s#hwcrypto/sha#mbedtls/sha1#" /root/Arduino/libraries/ESP32_HTTPS_Server/src/HTTPConnection.hpp
RUN cp -r /root/Arduino/libraries/ESP32_HTTPS_Server/examples/HTTPS-and-HTTP /HTTPS-and-HTTP && \
cd /HTTPS-and-HTTP && curl -sSfL https://raw.githubusercontent.com/fhessel/esp32_https_server_compat/master/examples/HelloServerSecure/cert.h -o cert.h && \
curl -sSfL https://raw.githubusercontent.com/fhessel/esp32_https_server_compat/master/examples/HelloServerSecure/private_key.h -o private_key.h &&\
sed -i "s#example_der#example_crt_DER#" cert.h && \
sed -i "s#example_key_der#example_key_DER#" private_key.h && \
sed -i "s#<your ssid goes here>#test-example#" HTTPS-and-HTTP.ino && \
sed -i "s#<your pre-shared key goes here>#123456789#" HTTPS-and-HTTP.ino
WORKDIR /
ENTRYPOINT ["/bin/bash"]
and
docker run after docker build it
docker run -it --rm -v `pwd`:/output testesp
and insied exec
arduino-cli compile --fqbn esp32:esp32:lolin_s2_pico HTTPS-and-HTTP --output-dir=./firmware
srec_cat -output ./output/examples.bin -binary -generate 0x0000 0x1000 -constant 0xff /firmware/HTTPS-and-HTTP.ino.bootloader.bin -binary -offset 0x1000 -fill 0x00 0x1000 0x8000 /firmware/HTTPS-and-HTTP.ino.partitions.bin -binary -offset 0x8000 -fill 0x00 0x8000 0x10000 /firmware/HTTPS-and-HTTP.ino.bin -binary -offset 0x10000
Additional context
this Dockerfile env, runs Default WebServer(https://github.com/espressif/arduino-esp32/tree/master/libraries/WebServer) very well, but cant work on this lib
already tried to using esp32 core to 2.0.0, 2.0.2, 2.0.10, 2.0.11, 2.0.14
Metadata
Metadata
Assignees
Labels
No labels