Skip to content
Discussion options

You must be logged in to vote

Hello Schatzmann, would like to report that HFP is working with you a2dp library if the project is built in the espidf and arduino platform as the arduino core does not support hfp via hci, which is needed. therefore the sdkconfig can be run in pio terminal and bluetooth should be set to HCI and PCM should be disabled. after, this example init / deinit code is used to hold a2dp (may need tailoring):

void safe_deinit_a2dp() {
if (!deinit_called) {
Serial.println("HFP: Deinit A2DP for SCO");
BluetoothA2DPOutputAudioTools().end();
BluetoothA2DPOutputAudioTools().set_output_active(false);
deinit_called = true;
delay(50);
}
}

void safe_init_a2dp() {
if (deinit_called) {
Serial.println("HFP: Re…

Replies: 5 comments 2 replies

Comment options

You must be logged in to vote
1 reply
@cjhudlin
Comment options

Answer selected by cjhudlin
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@cjhudlin
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants
Converted from issue

This discussion was converted from issue #772 on February 19, 2026 07:22.