- Configure in `menuconfig` which serial output you are using. Execute `idf.py menuconfig` and go to `Component config/ESP System Settings/Channel for console output`, then select the appropriate interface. By default the UART0 interface is used, this means that for example in the ESP32-S3-DevKitC-1 or ESP32-C6-DevKitC-1 you should connect to the micro-usb connector labeled as UART and not to the one labeled as USB. To use the one labeled as USB you should change the aforementioned setting to `USB Serial/JTAG Controller`.
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. The host chip, when connected to a ESP chip as a Wi-Fi co-processor, can invoke Wi-Fi APIs over a communication bus like SPI or SDIO.
The two chip solution needs:
- Communication bus like SDIO or SPI between the host and co-processor
- Co-processor flashed with ESP-Hosted co-processor (slave) software
- 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/)
### Running iperf on the ESP32-P4-Function-EV-Board
On this board,
* The ESP32-P4 is already connected with the on-board ESP32-C6 (co-processor) using SDIO communication bus. See this ESP-Hosted EV Board [documentation](https://github.com/espressif/esp-hosted-mcu/blob/main/docs/esp32_p4_function_ev_board.md) for more information.
* The ESP32-C6 is pre-flashed with ESP-Hosted slave software.
* Optionally, you can re-flash the ESP32-C6 using [ESP-Hosted Slave Flashing Steps](https://github.com/espressif/esp-hosted-mcu/blob/main/docs/esp32_p4_function_ev_board.md#5-flashing-esp32-c6)
* Only the example code on the Host needs to be built & flashed using the steps below.
The Wi-Fi Remote and ESP-Hosted components are automatically fetched during the configuration.
* Build
```sh
idf.py build
```
* Flash
```sh
idf.py -p <host_serial_port> flash
```
* Monitor
```sh
idf.py -p <host_serial_port> monitor
```
### Using ESP-Hosted with other hosts
As the other hosts may not have prior hardware communication bus set-up, the hardware connections and co-processor flashing with slave firmware need to be done explicitly. See the [ESP-Hosted Repository](https://github.com/espressif/esp-hosted-mcu/) for step-by-step instructions on setting up ESP-Hosted.