Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C5 | ESP32-C6 | ESP32-C61 | ESP32-H2 | ESP32-S3 | ESP32-P4 | ESP32-H2 |
---|
This example is to test the Bluetooth compatibility and mobile phones.
This example has been modified to work with ESP-Hosted. The original ESP-IDF example is at [ https://github.com/espressif/esp-idf/tree/master/examples/bluetooth/bluedroid/ble/ble_compatibility_test ].
This example is able to run on the ESP32-P4 Dev Board, acting as the BT Host, connected to a ESP32 co-processor via the GPIO header, using SPI FD (full duplex) as Hosted HCI transport. The ESP32-P4 acts as the BT Controller. The following GPIO settings were used:
SPI Function | ESP32 GPIO | ESP32-P4 GPIO |
---|---|---|
MOSI | 13 | 4 |
MISO | 12 | 5 |
CLK | 14 | 26 |
CS | 15 | 6 |
Handshake | 26 | 20 |
Data Ready | 4 | 36 |
Reset | -1 | 2 |
Note
SPI Mode 2 was used on both the ESP32-P4 and ESP32.
Users are free to choose which supported ESP-Hosted transport to use. See the main ESP-Hosted README for a list of supported transports.
Before project configuration and build, be sure to set the correct chip target using:
Bash
idf.py set-target <chip_name>
On the ESP32-P4 Dev Board, run idf.py menuconfig
.
Component config --> Bluetooth --> Bluedroid Options
Component config --> Bluetooth --> Controller
is Disabled
.Component config --> ESP-Hosted config
:SPI Full-duplex
as the transportESP32
Bluetooth Support
Run idf.py -p PORT flash monitor
to build, flash and monitor the project.
(To exit the serial monitor, type Ctrl-]
.)
See the Getting Started Guide for full steps to configure and use ESP-IDF to build projects.
To create a project from this example, run:
idf.py create-project-from-example "espressif/esp_hosted=2.0.11:host_bluedroid_ble_compatibility_test"