Like i said, it is very easy to make P4 working with nimble.
With the library i mentioned earlier you just need some configs:
- example of sdkconfig.defaults
Code: Select all
# This file was generated using idf.py save-defconfig. It can be edited manually.
# Espressif IoT Development Framework (ESP-IDF) 5.4.0 Project Minimal Configuration
#
CONFIG_IDF_TARGET="esp32p4"
CONFIG_ESPTOOLPY_FLASHSIZE_16MB=y
CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions.csv"
# Override some defaults so BT stack is enabled
# in this example
#
# BT config
#
CONFIG_BT_CONTROLLER_DISABLED=y
CONFIG_BT_BLUEDROID_ENABLED=n
CONFIG_BT_NIMBLE_TRANSPORT_UART=n
#
# Enable ESP Hosted BT
# Used as VHCI transport between BT Host and Controller
#
CONFIG_ESP_ENABLE_BT=y
CONFIG_ESP_WIFI_REMOTE_LIBRARY_HOSTED=y
CONFIG_ESP32_P4_EV_BOARD=y
CONFIG_IDF_TARGET="esp32p4"
CONFIG_ESPTOOLPY_FLASHSIZE_16MB=y
CONFIG_PARTITION_TABLE_CUSTOM=y
CONFIG_ESP32_P4_EV_BOARD=y
CONFIG_COMPILER_CXX_EXCEPTIONS=y
CONFIG_BT_NIMBLE_ENABLED=y
CONFIG_BT_NIMBLE_TRANSPORT_UART=n
CONFIG_HTTPD_MAX_REQ_HDR_LEN=800
CONFIG_HTTPD_WS_SUPPORT=y
CONFIG_ESP_WIFI_EXTRA_IRAM_OPT=n
CONFIG_ESP_WIFI_SLP_IRAM_OPT=n
CONFIG_FATFS_LFN_HEAP=y
CONFIG_FREERTOS_HZ=1000
CONFIG_ESP_HOSTED_ENABLE_BT_NIMBLE=y
CONFIG_SLAVE_IDF_TARGET_ESP32C6=y
- idf_component.yml
Code: Select all
## IDF Component Manager Manifest File
dependencies:
espressif/esp_hosted:
version: "*"
rules:
- if: "target in [esp32p4]"
espressif/esp_wifi_remote:
version: "*"
rules:
- if: "target in [esp32p4]"
## Required IDF version
idf:
version: ">=4.1.0"
- basic code, but you need to add some client or server code from library examples (this is just to run scan)
Code: Select all
NimBLEDevice::init("");
NimBLEDevice::setMTU(517);
pBLEScan = NimBLEDevice::getScan();
pBLEScan->setScanCallbacks(new MyAdvertisedDeviceCallbacks());
pBLEScan->setDuplicateFilter(true);
pBLEScan->setInterval(1000);
pBLEScan->setWindow(500);
pBLEScan->setActiveScan(1);
pBLEScan->clearResults();
This is from my code i am running, just my code is running in addition and its working with esp32-s3 and esp32-p4 + C6:
- USB/ECM
- html server
- some other peripherals