Skip to content

Support for peer-to-peer serverless connections across the Internet #66

Description

@davidchatting-bot

From the README's Development section - filing as a tracked issue.

Current state

Peer networking (YY_MODE_PEER_SERVER/YY_MODE_PEER_CLIENT) is entirely local: startPeerNetworkAsAP() puts a device into WIFI_AP_STA and runs its own DNS/captive-portal AP (src/YoYoWiFiManager.cpp), and peers find each other by joining that local AP directly. There's no mechanism for two Yo-Yo devices on different networks (or on the wider Internet) to discover or talk to each other - the POST/GET HTTP helper methods used for peer broadcast (broadcastMessage(), etc.) assume a local IP reachable directly.

Ask

This is a bigger architectural addition rather than a small fix - worth scoping out before implementation, e.g.:

  • A relay/rendezvous approach (devices register with a known server, which relays messages between them - avoids NAT traversal entirely, easiest to build)
  • NAT traversal (STUN/hole-punching) for more direct device-to-device connections
  • Something MQTT/WebSocket-broker-based, reusing the existing WebSocketsServer example's dependency

Given the amount of design work involved, might be worth a short design doc/discussion issue before picking an approach, rather than diving straight into implementation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions