Zenoh-pico: Using it in PEER mode #89
-
I successfully used Zenoh-pico in client mode to stream sensor data to a zenohd router. After that, I wanted to use peer mode, but for some reason it is not working, can not open a zenoh session. In udp.c function: _z_endpoint_udp_multicast_valid: The iface is NULL so the validity check function returns with _Z_ERR_CONFIG_LOCATOR_INVALID. Unfortunately, I could not find any more infos, and also, this check is only called one time in the stack, so no other examples. I also ran a scouting before oppening the session, and for that I can see the router. I even tried it running on UDP since I figured it out that in zenoh-pico for PEER mode only UDP multicast is implemented currently (Am I righ here?) Thanks for help in advance. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
Hello @nagygabor93 , Peer-to-peer mode between Zenoh Pico and a Zenoh Router is not supported right now. |
Beta Was this translation helpful? Give feedback.
-
Hello @nagygabor93, Peer-to-peer mode in unicast (as supported by Zenoh Router) is not supported. For that, you need to change two configurations: const char *mode = "peer";
char *locator = "udp/224.0.0.225:7447#iface=eth0";
z_owned_config_t config = z_config_default();
zp_config_insert(z_loan(config), Z_CONFIG_MODE_KEY, z_string_make(mode));
zp_config_insert(z_loan(config), Z_CONFIG_PEER_KEY, z_string_make(locator)); Note that the locator has the |
Beta Was this translation helpful? Give feedback.
Hello @nagygabor93,
Peer-to-peer mode in unicast (as supported by Zenoh Router) is not supported.
However, you can have peer-to-peer mode in Zenoh Pico between Zenoh Pico applications via e.g. UDP multicast.
For that, you need to change two configurations:
Note that the locator has the
iface
parameter, which is mandatory for Zenoh multicast transports over UDP multicast.The fact that you are not s…