Skip to content

georgevio/ESP32-ZenohMesh

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pub/sub screenshot

ESP32 Zenoh Peer-to-Peer Communication Demo

A minimal project with direct peer-to-peer (P2P) communication between an ESP32-S3 and an ESP32-CAM using the Zenoh protocol over wifi.

pub/sub screenshot

sub/pub screenshot

⚠️IMPORTANT⚠️

  1. 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 [*] 
  1. 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.

Overview

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.

Key Features

  • 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.

ZENOH settings

  • 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

About

A minimal demo of brokerless peer-to-peer (P2P) communication between ESP32 devices using the Zenoh protocol.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors