- ✅ provide custom environment for development on ESP32-CAM with Docker and CLion
- ✅ implement ESP32 camera stream over websocket
- ✅ implement ESP32 camera stream over http multipart
- ✅ implement ESP32 control using REST API
- ✅ add options to create access point or connect to an existing station
- ✅ provide simple js client served by ESP32
- ✅ provide sample of python client with opencv
Use environment defined in env
directory. It contains script for starting and stopping
docker environment with ESP IDF with camera installed.
You can easily connect to this environment from CLion. Just use toolchains configuration and select a remote toolchains option to connect to image over ssh.
By default, script shares with docker image /DISPLAY_DEV/ttyUSB0
device which is usually an ESP32
module connected to USB port. You should adjust this configuration to your needs and rerun
start.sh
script (you can add --no-device
option as well).
You should configure your build with
idf.py menuconfig
executed in remote container.
It allows to change compiler options and log level as well as manage all modules from ESP IDF. It is standard procedure to update configuration from IDF when version of SDK has changed.
To flash project to ESP32, open terminal on remote container with action
Open Remote Host Terminal
(you can find it with Ctrl+Shift+A
) and use
idf.py flash monitor
After flashing compiled program to ESP32, serial monitor will be opened in console,
so you can easily debug log data in terminal. You can stop it with Ctrl+]
You can find two browser clients implementation available in the firmware:
- websocket client after opening
https://[esp-ip]/
- http multipart client after opening
https://[esp-ip]/stream
You can find sample python websocket client in camera_demo.py file. It connects with websocket protocol and samples frame from camera. It needs a proper configuration of camera IP (if you connect to camera AP then it might work out of the box).