ESP32 use same peer for publisher and subscriber role

Hello,

From what I’ve understood, when joining a room, two peers are created (see client-sdk-esp32/components/livekit/core/engine.c at main · livekit/client-sdk-esp32 · GitHub). One for publishing audio/video and one to subscribe to audio/video. The publishing is the “main” peer connection and support the data channel.

Is there some limitations or needs I didn’t see or would it be possible to only create one peer for both ? That would reduce the number of created threads and sockets to maintain (and save memory on constraint devices).

Thanks,

Gaétan

Hi Gaétan, thank you for reaching out. That’s correct. Historically, the LiveKit SFU required two peer connections to avoid issues with signaling glare. However, since the initial development of the ESP32 SDK, the SFU has added support for operating with a single peer connection. The ESP32 SDK has not been updated to take advantage of this capability yet, but this is planned for an upcoming release.

Hello,

Thanks for your answer that’s clear to me now.

Do you know if there is a release plan available somewhere about ESP32 SDK ?

Thanks,

Gaétan