Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix embedded multicast examples #849

Open
sashacmc opened this issue Jan 3, 2025 · 1 comment
Open

Fix embedded multicast examples #849

sashacmc opened this issue Jan 3, 2025 · 1 comment
Labels
bug Something isn't working

Comments

@sashacmc
Copy link
Member

sashacmc commented Jan 3, 2025

At the moment, in most of the embedded examples (e.g. espidf, arduino), multicast mode is set incorrectly, if you simply change the defines to peer/multicast, the peer mode will be set, but the CONNECT string will still go as a connection endpoint, but it should be as a listening endpoint (see e.g. unix, rpi_pico examples)

@sashacmc sashacmc added the bug Something isn't working label Jan 3, 2025
@vortex314
Copy link
Contributor

vortex314 commented Jan 4, 2025

Indeed, burned myself also on this one. The ZENOH_DBUG and debug level tracing helped to address this.

#define CLIENT_OR_PEER 0 // 0: Client mode; 1: Peer mode
#if CLIENT_OR_PEER == 0
#define MODE "client"
#define CONNECT "" // If empty, it will scout
#elif CLIENT_OR_PEER == 1
#define MODE "peer"
#define CONNECT "udp/224.0.0.123:7447#iface=lo" 
#endif

  if (strcmp(CONNECT, "") != 0) {
    //        zp_config_insert(z_loan_mut(config), Z_CONFIG_CONNECT_KEY,
    //        CONNECT);
    zp_config_insert(z_loan_mut(config), Z_CONFIG_LISTEN_KEY, CONNECT);
  }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants