# ext_coex — Host
Configures the coprocessor's external-coex (PTA) work mode and grant
pin sequence so the CP's Wi-Fi / BT radio can share the air with a
third-party radio sitting next to it. The host sends a single RPC
sequence at boot: pick a role (Leader / Follower / Standalone), point
the CP at the four PTA GPIOs (request, priority, grant, tx_line), and
optionally tune the advanced knobs (grant delay, validate-high).
## Supported Platforms and Transports
### Supported Coprocessors
| Coprocessor | ESP32 | ESP32-C Series | ESP32-S Series |
| :----------: | :---: | :------------: | :------------: |
| Support | No | Yes | Yes |
### Supported Host Devices
| Host Device | ESP32-P4 | ESP32-H2 | Other MCUs | Linux |
| :---------: | :------: | :------: | :--------: | :---: |
| Support | Yes | Yes | [Yes](https://github.com/espressif/esp-hosted/blob/master/docs/getting-started-mcu.md) | [Yes](https://github.com/espressif/esp-hosted/blob/master/docs/getting-started-linux.md) |
### Supported Connection buses
| Connection bus | SDIO | SPI Full-Duplex | SPI Half-Duplex | UART |
| :------------- | :--: | :-------------: | :-------------: | :--: |
| Linux host | Yes | Yes | No | No |
| MCU host | Yes | Yes | Yes | Yes |
Select the transport (must match the co-processor):
```bash
cd examples/ext_coex/mcu_host
idf.py set-target esp32p4
idf.py menuconfig
```
```text
Component config
└── ESP-Hosted
└── Configure host
└── Host transport
├── Communication bus (co-processor <== bus ==> host)
│ ├── ( ) SPI Full Duplex
│ ├── (X) SDIO <── default (match the co-processor)
│ ├── ( ) SPI Half Duplex
│ └── ( ) UART
└── SDIO Configuration ← slot, bus width, GPIOs (defaults OK)
```
```text
Example Configuration
└── [ ] Use legacy esp_hosted_* compat-surface main <── default off
```
The host External-Coexistence feature is enabled by `sdkconfig.defaults`;
the PTA controls live under **Features**:
```text
Component config
└── ESP-Hosted
└── Configure host
└── Features
└── [*] External Coexistence
├── [*] Auto-initialize Ext-Coex feature at boot
└── [ ] Enable advanced ext-coex controls ← set_grant_delay / set_validate_high
```
The Host dependency config is **pre-set in `sdkconfig.defaults`** (do not remove):
```text
CONFIG_ESP_HOSTED_HOST_FEAT_CP_EXT_COEX=y # host external-coex control feature
CONFIG_ESP_HOSTED_HOST_FEAT_RPC=y # RPC control path
CONFIG_ESP_HOSTED_HOST_FEAT_RPC_EXT_V2=y # required RPC ext-v2
CONFIG_ESP_HOSTED_HOST_FEAT_SYSTEM=y # system RPC calls
```
Then flash and monitor:
```bash
idf.py -p <host_usb_serial_port> flash monitor
```
<!-- generated from ../README.md — edit that file, not this one -->
To create a project from this example, run:
idf.py create-project-from-example "espressif/esp_hosted=3.0.2:ext_coex/mcu_host"