Skip to content

Commit 18f8452

Browse files
committed
feat(eppp): Added support for SPI transport
1 parent ad27414 commit 18f8452

19 files changed

+1172
-411
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,3 +49,7 @@ Please refer to instructions in [ESP-IDF](https://github.com/espressif/esp-idf)
4949
### console_cmd_wifi
5050

5151
* Brief introduction [README](components/console_cmd_wifi/README.md)
52+
53+
### ESP PPP Link (eppp)
54+
55+
* Brief introduction [README](components/eppp_link/README.md)

components/eppp_link/Kconfig

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -32,19 +32,4 @@ menu "eppp_link"
3232
Size of the Tx packet queue.
3333
You can decrease the number for slower bit rates.
3434

35-
config EPPP_LINK_SERVER_IP
36-
hex "Server IP address"
37-
range 0 0xFFFFFFFF
38-
default 0xc0a80b01
39-
help
40-
Preferred IP address of the server side.
41-
42-
config EPPP_LINK_CLIENT_IP
43-
hex "Client IP address"
44-
range 0 0xFFFFFFFF
45-
default 0xc0a80b02
46-
help
47-
Preferred IP address of the client side.
48-
49-
5035
endmenu

components/eppp_link/README.md

Lines changed: 22 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
11
# ESP PPP Link component (eppp_link)
22

3-
The component provides a general purpose connectivity engine between two micro-controllers, one acting as PPP server (slave), the other one as PPP client (host). Typical application is a WiFi connectivity provider for chips that do not have WiFi:
3+
The component provides a general purpose connectivity engine between two microcontrollers, one acting as PPP server (slave), the other one as PPP client (host).
4+
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
5+
6+
## Typical application
7+
8+
Using this component we can construct a WiFi connectivity gateway on PPP channel. The below diagram depicts an application where
9+
PPP server is running on a WiFi capable chip with NAPT module translating packets between WiFi and PPPoS interface.
10+
We usually call this node a SLAVE microcontroller. The "HOST" microcontroller runs PPP client and connects only to the serial line,
11+
brings in the WiFi connectivity from the "SLAVE" microcontroller.
412

513
```
614
SLAVE micro HOST micro
@@ -17,27 +25,28 @@ The component provides a general purpose connectivity engine between two micro-c
1725

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

20-
* `eppp_client_init()` -- Initialization of the client. Need to run only once.
21-
* `eppp_client_start()` -- Starts the connection, could be called after startup or whenever a connection is lost
22-
* `eppp_client_perform()` -- Perform one iteration of the PPP task (need to be called regularly in task-less configuration)
23-
2428
### Server
2529

2630
* `eppp_listen()` -- Simplified API. Provides the initialization, starts the task and blocks until the client connects
27-
* `eppp_server_init()` -- Initialization of the server. Need to run only once.
28-
* `eppp_server_start()` -- (Re)starts the connection, should be called after startup or whenever a connection is lost
29-
* `eppp_server_perform()` -- Perform one iteration of the PPP task (need to be called regularly in task-less configuration)
31+
32+
### Manual actions
33+
34+
* `eppp_init()` -- Initializes one endpoint (client/server).
35+
* `eppp_deinit()` -- Destroys the endpoint
36+
* `eppp_netif_start()` -- Starts the network, could be called after startup or whenever a connection is lost
37+
* `eppp_netif_stop()` -- Stops the network
38+
* `eppp_perform()` -- Perform one iteration of the PPP task (need to be called regularly in task-less configuration)
3039

3140
## Throughput
3241

3342
Tested with WiFi-NAPT example, no IRAM optimizations
3443

3544
### UART @ 3Mbauds
3645

37-
* TCP - 2Mbits
38-
* UDP - 2Mbits
46+
* TCP - 2Mbits/s
47+
* UDP - 2Mbits/s
3948

40-
### SPI @ 40MHz
49+
### SPI @ 20MHz
4150

42-
* TCP - 6Mbits
43-
* UDP - 10Mbits
51+
* TCP - 6Mbits/s
52+
* UDP - 10Mbits/s

0 commit comments

Comments
 (0)