# This sdkconfig file has the common settings for an ESP32-P4
# host with an external ESP-Hosted Wi-Fi/BT interface.

# Wifi
CONFIG_ESP_HOSTED_ENABLED=y
CONFIG_ESP_WIFI_STATIC_RX_BUFFER_NUM=16
CONFIG_ESP_WIFI_DYNAMIC_RX_BUFFER_NUM=64
CONFIG_ESP_WIFI_DYNAMIC_TX_BUFFER_NUM=64
CONFIG_ESP_WIFI_AMPDU_TX_ENABLED=y
CONFIG_ESP_WIFI_TX_BA_WIN=32
CONFIG_ESP_WIFI_AMPDU_RX_ENABLED=y
CONFIG_ESP_WIFI_RX_BA_WIN=32

CONFIG_LWIP_TCP_SND_BUF_DEFAULT=65534
CONFIG_LWIP_TCP_WND_DEFAULT=65534
CONFIG_LWIP_TCP_RECVMBOX_SIZE=64
CONFIG_LWIP_UDP_RECVMBOX_SIZE=64
CONFIG_LWIP_TCPIP_RECVMBOX_SIZE=64

CONFIG_LWIP_TCP_SACK_OUT=y

# Bluetooth Support
CONFIG_ESP_HOSTED_ENABLE_BT_BLUEDROID=y
CONFIG_ESP_HOSTED_ENABLE_BT_NIMBLE=y
CONFIG_ESP_HOSTED_NIMBLE_HCI_VHCI=y
CONFIG_ESP_WIFI_REMOTE_ENABLED=y
CONFIG_SLAVE_SOC_WIFI_SUPPORTED=y
CONFIG_SLAVE_SOC_WIFI_WAPI_SUPPORT=y
CONFIG_SLAVE_SOC_WIFI_CSI_SUPPORT=y
CONFIG_SLAVE_SOC_WIFI_MESH_SUPPORT=y
CONFIG_SLAVE_SOC_WIFI_LIGHT_SLEEP_CLK_WIDTH=12
CONFIG_SLAVE_SOC_WIFI_HW_TSF=y
CONFIG_SLAVE_SOC_WIFI_FTM_SUPPORT=y
CONFIG_SLAVE_FREERTOS_UNICORE=y
CONFIG_SLAVE_SOC_WIFI_GCMP_SUPPORT=y
CONFIG_SLAVE_IDF_TARGET_ARCH_RISCV=y
CONFIG_SLAVE_SOC_WIFI_HE_SUPPORT=y
CONFIG_SLAVE_SOC_WIFI_MAC_VERSION_NUM=2
CONFIG_ESP_WIFI_REMOTE_LIBRARY_HOSTED=y

CONFIG_ESP_HOSTED_P4_DEV_BOARD_FUNC_BOARD=y

# BLE
CONFIG_ESP_HOSTED_ENABLE_BT_NIMBLE=y
CONFIG_BT_ENABLED=y
CONFIG_BT_NIMBLE_ENABLED=y
CONFIG_BT_CONTROLLER_DISABLED=y
CONFIG_BT_BLUEDROID_ENABLED=n
CONFIG_BT_NIMBLE_TRANSPORT_UART=n
CONFIG_BT_NIMBLE_LOG_LEVEL_ERROR=y

CONFIG_BT_NIMBLE_SVC_GAP_DEVICE_NAME="MPY ESP32"
CONFIG_BT_NIMBLE_MAX_CONNECTIONS=4

CONFIG_BT_HCI_LOG_DEBUG_EN=y

# Increase NimBLE task stack size from the default, because Python code
# (BLE IRQ handlers) will most likely run on this task.
CONFIG_BT_NIMBLE_TASK_STACK_SIZE=6144
