This tutorial explains how to build the default factory firmware for Unit PoE-P4. Users can perform secondary development based on this firmware.
v5.4.2"." and the script in the . ./export.sh command. This command is equivalent to source ./export.sh.git clone --recursive https://github.com/espressif/esp-idf.git
cd esp-idf
git checkout v5.4.2# recommend
./install.sh
. ./export.sh idf.py commands used in the following steps depend on ESP-IDF. Before running commands, you need to call . ./export.sh from ESP-IDF in the project directory to activate the relevant environment variables. For details, please refer to ESP-IDF - ESP32-P4 Getting Started Guide.git clone https://github.com/m5stack/M5Unit-PoE-P4-UserDemo.git M5Unit-PoE-P4-UserDemo project folder and call export.sh from the esp-idf project to activate the relevant environment variables. The following commands apply when the M5Unit-PoE-P4-UserDemo folder is at the same directory level as esp-idf. For other paths, modify the commands according to your actual setup.cd M5Unit-PoE-P4-UserDemo
. ../esp-idf/export.sh
Connect Unit PoE-P4 to the computer using a data cable. Press and hold the reset button until the green indicator lights up, then release the button. The device will enter download mode and wait for firmware flashing. Execute the following command to build and flash the program.
idf.py flash monitor
After the firmware is flashed successfully, follow these steps to access the device control page:
poe-p4.local in the browserThis example is a Web control project based on ESP-IDF. The device can be remotely controlled and monitored through a web page. The system uses WebSocket to achieve real-time bidirectional communication and supports RGB LED control, button count synchronization, as well as GPIO mode and level control functions.
