Skip to content

Commit c90f45b

Browse files
committed
Building for ESP32-P4 using esp_hosted and esp_wifi_remote
1 parent f467d5d commit c90f45b

File tree

4 files changed

+86
-3
lines changed

4 files changed

+86
-3
lines changed

network_provisioning/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
# 09-Oct-2025
2+
3+
- Build wifi_prov example for ESP32-P4 (for ESP32-P4-Function-EV-Board)
4+
- ESP32-P4 assumes ESP32-C6 (configurable) acts as Wi-Fi and BLE co-processor over SDIO transport
5+
- Uses esp_wifi_remote and esp_hosted_mcu
6+
17
# 01-April-2025
28

39
- Extend provisioning check for `ESP_WIFI_REMOTE_ENABLED` as well along with existing `ESP_WIFI_ENABLED`

network_provisioning/examples/wifi_prov/README.md

Lines changed: 36 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C6 | ESP32-S2 | ESP32-S3 |
2-
| ----------------- | ----- | -------- | -------- | -------- | -------- | -------- |
1+
| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C6 | ESP32-S2 | ESP32-S3 | ESP32-P4 |
2+
| ----------------- | ----- | -------- | -------- | -------- | -------- | -------- | -------- |
33

44
# Wi-Fi Provisioning Example
55

@@ -283,6 +283,40 @@ expected on success:
283283
CustomData response: SUCCESS
284284
```
285285

286+
## ESP32-P4 Support
287+
288+
The ESP32-P4 uses a two-chip solution with ESP-Hosted to enable Wi-Fi provisioning.
289+
290+
### Running on ESP32-P4-Function-EV-Board
291+
292+
On this board, the ESP32-P4 connects to an on-board ESP32-C6 (co-processor) via SDIO. The ESP32-C6 comes pre-flashed with ESP-Hosted co-processor software. See [ESP-Hosted ESP32-P4 EV Board documentation](https://github.com/espressif/esp-hosted-mcu/blob/main/docs/esp32_p4_function_ev_board.md) for details.
293+
294+
#### Build and Flash
295+
296+
Set ESP32-P4 as target:
297+
```
298+
idf.py set-target esp32p4
299+
```
300+
301+
Configure the project:
302+
```
303+
idf.py menuconfig
304+
```
305+
Navigate to `Component config``Wi-Fi Remote``choose slave target` and select `esp32c6`.
306+
307+
Build and flash:
308+
```
309+
idf.py -p PORT flash monitor
310+
```
311+
312+
#### Co-processor Update (Optional)
313+
314+
The pre-flashed co-processor software is compatible, but upgrading to the latest version is recommended via:
315+
- [Simplified co-processor OTA](https://github.com/espressif/esp-hosted-mcu/blob/main/docs/esp32_p4_function_ev_board.md#51-ota-updates), or
316+
- [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)
317+
318+
For ESP-Hosted technical queries, open an issue at the [ESP-Hosted GitHub repository](https://github.com/espressif/esp-hosted-mcu/issues).
319+
286320
## Troubleshooting
287321

288322
### Provisioning failed

network_provisioning/examples/wifi_prov/main/idf_component.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,11 @@ dependencies:
55
espressif/network_provisioning:
66
version: "*"
77
override_path: '../../../'
8-
8+
espressif/esp_wifi_remote:
9+
version: ">=0.10"
10+
rules:
11+
- if: "target in [esp32p4, esp32h2]"
12+
espressif/esp_hosted:
13+
version: "~2"
14+
rules:
15+
- if: "target in [esp32p4, esp32h2]"
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# Override some defaults so BT stack is enabled
2+
# in this example
3+
4+
CONFIG_FREERTOS_HZ=1000
5+
6+
# BT config
7+
CONFIG_BT_ENABLED=y
8+
CONFIG_BT_CONTROLLER_DISABLED=y
9+
CONFIG_BT_BLUEDROID_ENABLED=n
10+
CONFIG_BT_NIMBLE_ENABLED=y
11+
CONFIG_BT_NIMBLE_TRANSPORT_UART=n
12+
13+
# Wi-Fi Remote
14+
CONFIG_ESP_WIFI_REMOTE_LIBRARY_HOSTED=y
15+
16+
# Enable ESP Hosted BT
17+
## Use Hosted-HCI (https://github.com/espressif/esp-hosted-mcu/blob/main/docs/bluetooth_design.md#3-bluetooth-interface)
18+
CONFIG_ESP_HOSTED_ENABLE_BT_NIMBLE=y
19+
CONFIG_ESP_HOSTED_NIMBLE_HCI_VHCI=y
20+
21+
# Wi-Fi performance config
22+
CONFIG_WIFI_RMT_STATIC_RX_BUFFER_NUM=16
23+
CONFIG_WIFI_RMT_DYNAMIC_RX_BUFFER_NUM=64
24+
CONFIG_WIFI_RMT_DYNAMIC_TX_BUFFER_NUM=64
25+
CONFIG_WIFI_RMT_AMPDU_TX_ENABLED=y
26+
CONFIG_WIFI_RMT_TX_BA_WIN=32
27+
CONFIG_WIFI_RMT_AMPDU_RX_ENABLED=y
28+
CONFIG_WIFI_RMT_RX_BA_WIN=32
29+
30+
# LWIP performance config
31+
CONFIG_LWIP_TCP_SND_BUF_DEFAULT=65534
32+
CONFIG_LWIP_TCP_WND_DEFAULT=65534
33+
CONFIG_LWIP_TCP_RECVMBOX_SIZE=64
34+
CONFIG_LWIP_UDP_RECVMBOX_SIZE=64
35+
CONFIG_LWIP_TCPIP_RECVMBOX_SIZE=64
36+
CONFIG_LWIP_TCP_SACK_OUT=y

0 commit comments

Comments
 (0)