A2DP source and BLE simultaneously #1228
-
Has anyone ever tried to implement BLE beacon and A2DP source in single sketch? Application example:I have a positioning proximity beacon. I want ESP32 to check if someone is within certain distance (lets say 1 meter), ESP32 plays an audio on the Bluetooth speaker. I have tried to implement this application, but gets the following error when connecting to Bluetooth speaker:
I am using player-sdfat-a2dp example as a reference. Things I tried:
For both work together, they should call esp_bt_controller_enable(ESP_BT_MODE_BTDM) once, and not the BLE lib call esp_bt_controller_enable(ESP_BT_MODE_BLE) and BluetoohSerial call esp_bt_controller_enable(ESP_BT_MODE_CLASSIC_BT) Any ideas? If I run BLE beacon part or A2DP separately it works fine, but running both simultaneously does not work. Thanks in advance |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 7 replies
-
Not sure if this helps, but I committed a correction to the ESP-A2DP project:
|
Beta Was this translation helpful? Give feedback.
-
I added a simple example for an A2DP Sink where the title is made available via BLE using the ESP32 Arduino BLE API I can confirm that the same sketch with NimBLE is crashing and you will need to rewrite/correct the NimBLE::init() method |
Beta Was this translation helpful? Give feedback.
-
I am not sure what you mean. If you want a better control over what is played when, don't use the AudioPlayer or if you want to stick to it use at least your own AudioSource |
Beta Was this translation helpful? Give feedback.
Not sure if this helps, but I committed a correction to the ESP-A2DP project: