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

New component ESP-PPP-Link #462

Merged
merged 5 commits into from
Feb 23, 2024

Conversation

david-cermak
Copy link
Collaborator

@david-cermak david-cermak commented Dec 21, 2023

ESP-PPP-Link (eppp_link)

Introducing a general purpose connectivity component to share network between two endpoints: PPP server and PPP client. This component implements both roles on ESP32 using UART and SPI transport.
Since the connection is standard PPPoS, the endpoints could be any other micro-controllers or a linux host running pppd

Typical use case

Bring WiFi connectivity to endpoints that do not support WiFi

             SLAVE micro                                  HOST micro
    \|/  +----------------+                           +----------------+
     |   |                |          serial line      |                |
     +---+ WiFi NAT PPPoS |======== UART / SPI =======| PPPoS client   |
         |        (server)|                           |                |
         +----------------+                           +----------------+

API

Client

  • eppp_connect() -- Simplified API. Provides the initialization, starts the task and blocks until we're connected

Server

  • eppp_listen() -- Simplified API. Provides the initialization, starts the task and blocks until the client connects

Manual actions

  • eppp_init() -- Initializes one endpoint (client/server).
  • eppp_deinit() -- Destroys the endpoint
  • eppp_netif_start() -- Starts the network, could be called after startup or whenever a connection is lost
  • eppp_netif_stop() -- Stops the network
  • eppp_perform() -- Perform one iteration of the PPP task (need to be called regularly in task-less configuration)

Throughput

Tested with WiFi-NAPT example, no IRAM optimizations

UART @ 3Mbauds

  • TCP - 2Mbits
  • UDP - 2Mbits

SPI @ 20MHz

  • TCP - 6Mbits
  • UDP - 10Mbits

TODO

  • Add support for PPP server (and header compression) to IDF
  • Add CI jobs (wait for IDF changes) add label
  • Use console_ping and console_iperf components in examples

@david-cermak david-cermak self-assigned this Dec 21, 2023
@david-cermak david-cermak force-pushed the feat/eppp_link branch 2 times, most recently from 872ab9b to 0e8df06 Compare January 4, 2024 17:11
@david-cermak david-cermak marked this pull request as ready for review January 5, 2024 18:13
Copy link
Collaborator

@euripedesrocha euripedesrocha left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I noticed that eppp_link_types.h is empty, should it be removed?

components/eppp_link/README.md Outdated Show resolved Hide resolved
components/eppp_link/README.md Show resolved Hide resolved
components/eppp_link/examples/host/main/register_iperf.c Outdated Show resolved Hide resolved
components/eppp_link/examples/host/main/register_iperf.c Outdated Show resolved Hide resolved
components/eppp_link/examples/host/main/register_iperf.c Outdated Show resolved Hide resolved
components/eppp_link/eppp_link.c Outdated Show resolved Hide resolved
components/eppp_link/eppp_link.c Outdated Show resolved Hide resolved
components/eppp_link/eppp_link.c Show resolved Hide resolved
components/eppp_link/eppp_link.c Outdated Show resolved Hide resolved
@david-cermak
Copy link
Collaborator Author

Thanks @euripedesrocha for taking a look!

I noticed that eppp_link_types.h is empty, should it be removed?

Thanks, removed!

components/eppp_link/eppp_link.c Outdated Show resolved Hide resolved
components/eppp_link/eppp_link.c Outdated Show resolved Hide resolved
components/eppp_link/eppp_link.c Show resolved Hide resolved
components/eppp_link/eppp_link.c Show resolved Hide resolved
components/eppp_link/eppp_link.c Show resolved Hide resolved
@gabsuren
Copy link
Contributor

No high level README.md description, in the first page of esp-protocols

components/eppp_link/eppp_link.c Outdated Show resolved Hide resolved
components/eppp_link/eppp_link.c Outdated Show resolved Hide resolved
components/eppp_link/eppp_link.c Show resolved Hide resolved
components/eppp_link/eppp_link.c Outdated Show resolved Hide resolved
components/eppp_link/eppp_link.c Show resolved Hide resolved
components/eppp_link/eppp_link.c Outdated Show resolved Hide resolved
components/eppp_link/eppp_link.c Outdated Show resolved Hide resolved
components/eppp_link/eppp_link.c Outdated Show resolved Hide resolved
components/eppp_link/include/eppp_link.h Outdated Show resolved Hide resolved
components/eppp_link/eppp_link.c Outdated Show resolved Hide resolved
@david-cermak david-cermak merged commit a363bee into espressif:master Feb 23, 2024
26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants