espressif/eppp_link

0.0.1

uploaded 2 months ago
The component provides a general purpose PPP connectivity, typically used as WiFi-PPP router

readme

# ESP PPP Link component (eppp_link)

The component provides a general purpose connectivity engine between two microcontrollers, one acting as PPP server (slave), the other one as PPP client (host).
This component could be used for extending network using physical serial connection. Applications could vary from providing PRC engine for multiprocessor solutions to serial connection to POSIX machine. This uses a standard PPP protocol to negotiate IP addresses and networking, so standard PPP toolset could be used, e.g. a `pppd` service on linux. Typical application is a WiFi connectivity provider for chips that do not have WiFi

## Typical application

Using this component we can construct a WiFi connectivity gateway on PPP channel. The below diagram depicts an application where
PPP server is running on a WiFi capable chip with NAPT module translating packets between WiFi and PPPoS interface.
We usually call this node a SLAVE microcontroller. The "HOST" microcontroller runs PPP client and connects only to the serial line,
brings in the WiFi connectivity from the "SLAVE" microcontroller.

```
             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/s
* UDP - 2Mbits/s

### SPI @ 20MHz

* TCP - 6Mbits/s
* UDP - 10Mbits/s

changelog

# Changelog

## [0.0.1](https://github.com/espressif/esp-protocols/commits/eppp-v0.0.1)

### Features

- Added CI job to build examples and tests ([8686977](https://github.com/espressif/esp-protocols/commit/8686977))
- Added support for SPI transport ([18f8452](https://github.com/espressif/esp-protocols/commit/18f8452))
- Added support for UART transport ([ad27414](https://github.com/espressif/esp-protocols/commit/ad27414))
- Introduced ESP-PPP-Link component ([a761039](https://github.com/espressif/esp-protocols/commit/a761039))

readme of host example

                                        
                                        
# Client side demo of ESP-PPP-Link

This is a basic demo of using esp-mqtt library, but connects to the internet using a PPPoS client. To run this example, you would need a PPP server that provides connectivity to the MQTT broker used in this example (by default a public broker accessible on the internet).

If configured, this example could also run a ping session and an iperf console.


The PPP server could be a Linux computer with `pppd` service or an ESP32 acting like a connection gateway with PPPoS server (see the "slave" project).

                                    

readme of slave example

                                        
                                        
# Wi-Fi station to PPPoS server

This example demonstrate using NAPT to bring connectivity from WiFi station to PPPoS server.

This example expect a PPPoS client to connect to the server and use the connectivity.
The client could be a Linux computer with `pppd` service or another microcontroller with PPP client (or another ESP32 with not WiFi interface)

                                    

Links

Supports all targets

License: Apache-2.0

To add this component to your project, run:

idf.py add-dependency "espressif/eppp_link^0.0.1"

or download archive

Dependencies

  • ESP-IDF >=5.2
  • Examples:

    To create a project from this example, run:

    idf.py create-project-from-example "espressif/eppp_link^0.0.1:host"

    or download archive (132 bytes)

    slave

    more details

    To create a project from this example, run:

    idf.py create-project-from-example "espressif/eppp_link^0.0.1:slave"

    or download archive (132 bytes)

    Stats

    • Archive size
      Archive size: 24.25 KB
    • Downloaded in total
      Downloaded in total 39 times
    • Downloaded this version
      This version: 39 times

    Badge

    espressif/eppp_link version: 0.0.1
    |