You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(hosted_examples): Added ESP-Hosted to Wi-Fi examples
- add ESP32-P4 and ESP32-H2 as Supported Targets to following
examples, using ESP-Hosted and Wi-Fi Remote as components:
- iperf (H2)
- getting_started/softAP
- getting_started/station
- scan
- fast_scan
- softap_sta
- updated `.build-test-rules.yml` to enable pre-commit to accept ESP-P4
and ESP-H2 as Supported Targets
- updated iperf sdkconfig.defaults for P4 to use parameters from wifi-remote
This directory contains a range of examples ESP-IDF projects. These are intended to demonstrate the Wi-Fi functionality, and to provide code that you can copy and adapt into your own projects.
7
7
8
+
ESP Chips with Wi-Fi can use the examples as is.
9
+
10
+
ESP Chips without Wi-Fi (e.g., ESP32-P4 and ESP32-H2) can work with a [**two-chip solution**](#wi-fi-examples-with-two-chip-solution) described below.
11
+
8
12
# Example Layout
9
13
10
14
The examples are grouped into sub-directories by category. Each category directory contains one or more example projects:
@@ -23,6 +27,60 @@ The examples are grouped into sub-directories by category. Each category directo
23
27
*`wpa2_enterprise` shows how ESP connects to AP with WPA2 enterprise encryption.
24
28
*`wps` contains a how to use the Wi-Fi Protected Setup protocol.
25
29
30
+
## Wi-Fi Examples with Two-Chip Solution
31
+
32
+
Some ESP chips like the ESP32-P4 or ESP32-H2, without built-in Wi-Fi or Bluetooth, can still use these features through a **two-chip solution** via ESP-Hosted.
33
+
34
+
The two chip solution needs:
35
+
36
+
- Communication bus like SDIO or SPI between the host and co-processor
37
+
- Co-processor flashed with ESP-Hosted co-processor (slave) software
38
+
- Host processor flashed with additional software components: [esp-hosted](https://components.espressif.com/components/espressif/esp_hosted/) and [esp-wifi-remote](https://components.espressif.com/components/espressif/esp_wifi_remote/). This is handled by `idf_component.yml`. See the `idf_component.yml` in [iperf](iperf/main/idf_component.yml) for an example.
39
+
40
+
The ESP32-P4-Function-EV-Board is used here as a demonstration on how to run a Wi-Fi example.
41
+
42
+
### Running a Wi-Fi example on the ESP32-P4-Function-EV-Board
43
+
44
+
On this board,
45
+
46
+
* The ESP32-P4 is connected with the on-board ESP32-C6 (co-processor) using SDIO communication bus. See this ESP-Hosted ESP32-P4 EV Board [documentation](https://github.com/espressif/esp-hosted-mcu/blob/main/docs/esp32_p4_function_ev_board.md) for more information.
47
+
* The ESP32-C6 on the ESP32-P4 EV Board is pre-flashed with ESP-Hosted co-processor (slave) software.
48
+
* Only the example code needs to be built & flashed on the Host using the steps below.
49
+
50
+
#### Host Flashing
51
+
52
+
* Set ESP32-P4 as the target
53
+
54
+
```sh
55
+
idf.py set-target esp32p4
56
+
```
57
+
58
+
* Run Configure
59
+
60
+
```sh
61
+
idf.py menuconfig
62
+
```
63
+
64
+
Set `Component config` -> `Wi-Fi Remote` -> `choose slave target` to `esp32c6`.
65
+
66
+
Do any other project configuration required for the example.
67
+
68
+
* Build and Flash
69
+
70
+
```sh
71
+
idf.py -p <host serial port> flash monitor
72
+
```
73
+
74
+
### Co-processor Flashing
75
+
76
+
**(Optional, but recommended)**
77
+
78
+
The ESP32-C6 on the ESP32-P4 EV Board is already pre-flashed with ESP-Hosted co-processor software. Host software on the ESP-Hosted component is backward compatible with this co-processor software. It is recommended to upgrade to the latest software via [simplified co-processor OTA](https://github.com/espressif/esp-hosted-mcu/blob/main/docs/esp32_p4_function_ev_board.md#51-ota-updates) or by [manual flashing with ESP-Prog](https://github.com/espressif/esp-hosted-mcu/blob/main/docs/esp32_p4_function_ev_board.md#52-using-esp-prog).
79
+
80
+
### Troubleshooting
81
+
82
+
For any technical queries on the two-chip solution, please open an [ESP-Hosted issue](https://github.com/espressif/esp-hosted-mcu/issues) on GitHub.
83
+
26
84
# More
27
85
28
86
See the [README.md](../README.md) file in the upper level [examples](../) directory for more information about examples.
@@ -92,6 +92,10 @@ I (2086) esp_netif_handlers: sta ip: 192.168.68.110, mask: 255.255.255.0, gw: 19
92
92
93
93
```
94
94
95
+
## Running the example on ESP Chips without Wi-Fi
96
+
97
+
This example can run on ESP Chips without Wi-Fi using ESP-Hosted. See the [Two-Chip Solution](../README.md#wi-fi-examples-with-two-chip-solution) section in the upper level `README.md` for information.
98
+
95
99
## Troubleshooting
96
100
97
101
For any technical queries, please open an [issue](https://github.com/espressif/esp-idf/issues) on GitHub. We will get back to you soon.
I (27657) esp_netif_lwip: DHCP server assigned IP to a station, IP is: 192.168.4.2
52
52
```
53
53
54
+
## Running the example on ESP Chips without Wi-Fi
55
+
56
+
This example can run on ESP Chips without Wi-Fi using ESP-Hosted. See the [Two-Chip Solution](../../README.md#wi-fi-examples-with-two-chip-solution) section in the upper level `README.md` for information.
57
+
54
58
## Troubleshooting
55
59
56
60
For any technical queries, please open an [issue](https://github.com/espressif/esp-idf/issues) on GitHub. We will get back to you soon.
@@ -116,6 +116,10 @@ I (10299) wifi station: connect to the AP fail
116
116
I (10299) wifi station: Failed to connect to SSID:myssid, password:mypassword
117
117
```
118
118
119
+
## Running the example on ESP Chips without Wi-Fi
120
+
121
+
This example can run on ESP Chips without Wi-Fi using ESP-Hosted. See the [Two-Chip Solution](../../README.md#wi-fi-examples-with-two-chip-solution) section in the upper level `README.md` for information.
122
+
119
123
## Troubleshooting
120
124
121
125
For any technical queries, please open an [issue](https://github.com/espressif/esp-idf/issues) on GitHub. We will get back to you soon.
0 commit comments