Skip to content

Commit a8631ee

Browse files
authored
Merge pull request #814 from david-cermak/feat/eppp_channels
[eppp-link]: Support for channels
2 parents e9b21ea + 3e28a72 commit a8631ee

24 files changed

+1066
-58
lines changed

components/eppp_link/.cz.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@ commitizen:
33
bump_message: 'bump(eppp): $current_version -> $new_version'
44
pre_bump_hooks: python ../../ci/changelog.py eppp_link
55
tag_format: eppp-v$version
6-
version: 0.3.1
6+
version: 1.0.0
77
version_files:
88
- idf_component.yml

components/eppp_link/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Changelog
22

3+
## [1.0.0](https://github.com/espressif/esp-protocols/commits/eppp-v1.0.0)
4+
5+
### Features
6+
7+
- Add support for custom channels ([4ee9360f](https://github.com/espressif/esp-protocols/commit/4ee9360f))
8+
39
## [0.3.1](https://github.com/espressif/esp-protocols/commits/eppp-v0.3.1)
410

511
### Bug Fixes

components/eppp_link/Kconfig

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,4 +93,21 @@ menu "eppp_link"
9393
default "06:00:00:00:00:02"
9494
depends on EPPP_LINK_DEVICE_ETH
9595

96+
config EPPP_LINK_CHANNELS_SUPPORT
97+
bool "Enable channel support (multiple logical channels)"
98+
default n
99+
depends on !EPPP_LINK_DEVICE_ETH
100+
help
101+
Enable support for multiple logical channels in the EPPP link layer.
102+
When enabled, you can configure the number of channels used for communication.
103+
104+
config EPPP_LINK_NR_OF_CHANNELS
105+
int "Number of logical channels"
106+
depends on EPPP_LINK_CHANNELS_SUPPORT && !EPPP_LINK_DEVICE_ETH
107+
range 1 8
108+
default 2
109+
help
110+
Set the number of logical channels for EPPP link communication.
111+
Each channel can be used for independent data streams.
112+
96113
endmenu

components/eppp_link/README.md

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# ESP PPP Link component (eppp_link)
22

33
The component provides a general purpose connectivity engine between two microcontrollers, one acting as PPP server, the other one as PPP client.
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 (if enabled) 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.
4+
This component could be used for extending network using physical serial connection. Applications could vary from providing RPC engine for multiprocessor solutions to serial connection to POSIX machine. This uses a standard PPP protocol (if enabled) 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.
55
Uses simplified TUN network interface by default to enable faster data transfer on non-UART transports.
66

77
## Typical application
@@ -21,6 +21,27 @@ brings in the WiFi connectivity from the communication coprocessor.
2121
+----------------+ +----------------+
2222
```
2323

24+
## Features
25+
26+
### Network Interface Modes
27+
28+
Standard PPP Mode (where PPP protocols is preferred) or simple tunnel using TUN Mode.
29+
30+
### Transport layer
31+
32+
UART, SPI, SDIO, Ethernet
33+
34+
### Support for logical channels
35+
36+
Allows channeling custom data (e.g. 802.11 frames)
37+
38+
## (Other) usecases
39+
40+
Besides the communication coprocessor example mentioned above, this component could be used to:
41+
* Bring Wi-Fi connectivity to a computer using ESP32 chip.
42+
* Connect your microcontroller to the internet via a pppd server (running on a raspberry)
43+
* Bridging two networks with two microcontrollers
44+
2445
## Configuration
2546

2647
### Choose the transport layer
@@ -39,6 +60,14 @@ Use `idf.py menuconfig` to select the transport layer:
3960

4061
Use PPP netif for UART; Keep the default (TUN) for others
4162

63+
### Channel support (multiple logical channels)
64+
65+
* `CONFIG_EPPP_LINK_CHANNELS_SUPPORT` -- Enable support for multiple logical channels (default: disabled)
66+
* `CONFIG_EPPP_LINK_NR_OF_CHANNELS` -- Number of logical channels (default: 2, range: 1-8, only visible if channel support is enabled)
67+
68+
When channel support is enabled, the EPPP link can multiplex multiple logical data streams over the same transport. The number of channels is configurable. Channel support is not available for Ethernet transport.
69+
70+
To use channels in your application, use the `eppp_add_channels()` API and provide your own channel transmit/receive callbacks. These APIs and related types are only available when channel support is enabled in Kconfig.
4271

4372
## API
4473

@@ -57,6 +86,9 @@ Use PPP netif for UART; Keep the default (TUN) for others
5786
* `eppp_netif_start()` -- Starts the network, could be called after startup or whenever a connection is lost
5887
* `eppp_netif_stop()` -- Stops the network
5988
* `eppp_perform()` -- Perform one iteration of the PPP task (need to be called regularly in task-less configuration)
89+
#ifdef CONFIG_EPPP_LINK_CHANNELS_SUPPORT
90+
* `eppp_add_channels()` -- Register channel transmit/receive callbacks (only available if channel support is enabled)
91+
#endif
6092

6193
## Throughput
6294

0 commit comments

Comments
 (0)