A minimal project with direct peer-to-peer (P2P) communication between an ESP32-S3 and an ESP32-CAM using the Zenoh protocol over wifi.
- To achieve bi-directional communication, the ESP32-S3 must be started at roughly the same time as the ESP32-CAM! The ESP32-S3 often fails to receive messages if it starts and initializes on the network before the ESP32-CAM is active. The ESP32-CAM appears to be more resilient and generally establishes both publishing and subscribing connections without this issue! Further investigation is required... LATER ADDITION: POSSIBLE SOLUTION seems that it needs to enable LWIP ICMP mutlicast send/receive as follows:
idf.py menuconfig
Component config -> LWIP -> ICMP
ICMP: Enable ICMP[*]
Respond to multicast pings [*]
Respond to broadcast pings [*]
- Use the components folder "as-is". It contains zenoh-pico with several alterations and hacks (e.g., the config.h file is heavily adapted). For details look at the Detailed Zenoh Installation: ESP32-Zenoh Full Implementation project.
Implementation of two ESP32 devices communicating over Wi-Fi using Zenoh in PEER mode. No central router is needed. The devices use Zenoh's scout mechanism to discover each other(?) and then begin exchanging simple messages.
- Peer-to-Peer Mode: No central broker required.
- Scout Discovery: Devices automatically find each other on the local network.
- Configurable Roles: Easily enable or disable the Publisher and Subscriber within zenoh_client.c via macros.
- Lightweight: Minimal implementation focusing solely on Wi-Fi connectivity and Zenoh messaging.
IMPRTANT: Wi-Fi Credentials Create from the template the main/secret.h with your Wi-Fi SSID and password.
- You can toggle the PUBLISHER_ON and SUBSCRIBER_ON roles at the top of main/zenoh_client.c.
- You can change the publisher and subsriber keys in the config.h


