WIFI to Ethernet Bridge Adapter mit ESP32 WT32-ETH01 und USB-C
Table of Contents
This WIFI to Ethernet bridge based on the WT32-ETH01 module is ideal for cameras.
The camera is powered directly via USB-C; 12V is required at the input. A small DCDC converter supplies the WT32-ETH01 module with 3.3V.
materialistic
- WT32-ETH01 Module
- USB-C PD module for 12V
- DCDC Buck-Converter 12V -> 3.3V
- 5521 DC socket
- Housing (3D printing)
Code
https://github.com/doctormord/esp32-wifi-bridge
Many thanks to Owen Walpole for the initial implementation of the code.
Instructions: Compile code in GitHub Codespaces
This is a step-by-step guide to compile the project in a cloud environment (GitHub Codespaces) without local toolchain issues.
1. Prepare codespace environment
Before starting the codespace, the repository needs to be told which Docker image to use (so that Rust and ESP-IDF are pre-installed).
- Create the file in your fork
.devcontainer/devcontainer.json. - Insert the following content:
{
"name": "ESP-RS Env",
"image": "espressif/idf-rust:all_latest",
"runArgs": ["--privileged"],
"customizations": {
"vscode": {
"extensions": ["rust-lang.rust-analyzer", "tamasfe.even-better-toml"]
}
}
}
Now restart the codespace (or create a new one) to load this configuration.
2. Adjust configuration files (In the Codespace Terminal)
Once the codespace is up and running, make these changes to fix memory issues and update dependencies.
A. Set Cargo.toml dependencies
Open that Cargo.toml and make sure that the [dependencies] Block looks exactly like this:
[dependencies]
esp-idf-sys = "0.36"
esp-idf-hal = "0.45"
esp-idf-svc = "0.50"
# ... andere Abhängigkeiten ...
B. Speicher-Fix in sdkconfig.defaults
Run these commands in Terminal to reduce WiFi buffers from 64 to 32 (prevents “no mem” errors):
sed -i 's/CONFIG_ESP_WIFI_DYNAMIC_RX_BUFFER_NUM=64/CONFIG_ESP_WIFI_DYNAMIC_RX_BUFFER_NUM=32/' sdkconfig.defaults
sed -i 's/CONFIG_ESP_WIFI_DYNAMIC_TX_BUFFER_NUM=64/CONFIG_ESP_WIFI_DYNAMIC_TX_BUFFER_NUM=32/' sdkconfig.defaults
3. Compiling the firmware
Copy this block into the Codespace terminal. It loads the environment, exports your WiFi data (for fallback logic) and builds the project.
(Replace the placeholders in the export commands with your real data!)
# 1. Umgebungsvariablen laden (Wichtig!)
source /opt/esp/export.sh
# 2. Alten Build-Cache löschen (Zwingend bei Config-Änderungen)
rm -rf target
rm Cargo.lock
# 3. WLAN-Zugangsdaten setzen (Wird in die Firmware kompiliert)
export WIFI_SSID_1="DeinHauptWLAN"
export WIFI_PASS_1="DeinPasswort1"
export WIFI_SSID_2="DeinBackupWLAN"
export WIFI_PASS_2="DeinPasswort2"
# 4. Kompilieren (Release-Modus)
cargo build --release
4. Merge firmware files
After successful compilation, the bootloader, partition table and the app need to be merged into a single file. Run this command in codespace:
esptool.py --chip esp32 elf2image target/xtensa-esp32-espidf/release/esp32-wifi-bridge
esptool.py --chip esp32 merge_bin -o merged-firmware.bin \
0x1000 target/xtensa-esp32-espidf/release/bootloader/bootloader.bin \
0x8000 target/xtensa-esp32-espidf/release/partition-table.bin \
0x10000 target/xtensa-esp32-espidf/release/esp32-wifi-bridge.bin
Now load the file merged-firmware.bin (Right click in file explorer -> Download) to your local PC.
5. Flash locally
(requires installed esptool):
esptool.py --chip esp32 --port DEIN_COM_PORT --baud 921600 \
--before default_reset --after hard_reset write_flash \
--flash_mode dio --flash_freq 40m \
0x1000 merged-firmware.bin
(Replace DEIN_COM_PORT accordingly, e.g. by COM3 under Windows or /dev/ttyUSB0 under Linux).

