feat(protocol_examples_common): Add Thread connect to support Thread for the protocol examples

This commit is contained in:
WanqQixiang
2024-11-12 14:39:14 +08:00
parent b70331a9b7
commit c5a9e39653
9 changed files with 354 additions and 10 deletions

View File

@@ -4,7 +4,7 @@ This component implements the most common connection methods for ESP32 boards. I
## How to use this component
Choose the preferred interface (WiFi, Ethernet, PPPoS) to connect to the network and configure the interface.
Choose the preferred interface (WiFi, Ethernet, Thread, PPPoS) to connect to the network and configure the interface.
It is possible to enable multiple interfaces simultaneously making the connection phase to block until all the chosen interfaces acquire IP addresses.
It is also possible to disable all interfaces, skipping the connection phase altogether.
@@ -23,6 +23,14 @@ Choose WiFi connection method (for chipsets that support it) and configure basic
Choose Ethernet connection if your board supports it. The most common settings is using Espressif Ethernet Kit, which is also the recommended HW for this selection. You can also select an SPI ethernet device (if your chipset doesn't support internal EMAC or if you prefer). It is also possible to use OpenCores Ethernet MAC if you're running the example under QEMU.
### Thread
Choose Thread connection if your board supports IEEE802.15.4 native radio or works with [OpenThread RCP](../../openthread/ot_rcp/README.md). You can configure the Thread network at menuconfig '->Components->OpenThread->Thread Core Features->Thread Operational Dataset'.
If the Thread end-device joins a Thread network with a Thread Border Router that has the NAT64 feature enabled, the end-device can access the Internet with the standard DNS APIs after configuring the following properties:
* Enable DNS64 client ('->Components->OpenThread->Thread Core Features->Enable DNS64 client')
* Enable custom DNS external resolve Hook ('->Components->LWIP->Hooks->DNS external resolve Hook->Custom implementation')
### PPP
Point to point connection method creates a simple IP tunnel to the counterpart device (running PPP server), typically a Linux machine with pppd service. We currently support only PPP over Serial (using UART or USB CDC). This is useful for simple testing of networking layers, but with some additional configuration on the server side, we could simulate standard model of internet connectivity. The PPP server could be also represented by a cellular modem device with pre-configured connectivity and already switched to PPP mode (this setup is not very flexible though, so we suggest using a standard modem library implementing commands and modes, e.g. [esp_modem](https://components.espressif.com/component/espressif/esp_modem) ).