hfp_hf disconnects after a few seconds

iamflimflam1
Posts: 9
Joined: Fri May 22, 2020 7:58 am

hfp_hf disconnects after a few seconds

Postby iamflimflam1 » Thu Jul 22, 2021 1:14 pm

I'm trying to run the esp-idf hfp_hf example

Code: Select all

examples/bluetooth/bluedroid/classic_bt/hfp_hf
It seems to work, but disconnects after a short period of time. This is what I see in the logs:

Code: Select all

hfp_hf> con
connect
W (6571) BT_APPL: HF Client found collision (ACL) ...
hfp_hf> I (14101) BT_HF: ESP_BT_GAP_DISC_STATE_CHANGED_EVT
W (20421) BT_RFCOMM: rfc_find_lcid_mcb LCID reused LCID:0x40 current:0x0
W (20421) BT_RFCOMM: RFCOMM_DisconnectInd LCID:0x40
I (66581) BT_HF: APP HFP event: CONNECTION_STATE_EVT
I (66581) BT_HF: --connection state disconnected, peer feats 0x0, chld_feats 0x0
This is connecting to a Mac computer. Any suggestions on how to get a stable connection or debug what is happening? Does anyone have a working example? My end goal is to setup the ESP32 as a bluetooth microphone and this seems to be the only way to do this.

I'm aware that the bandwidth is severely limited, but this is just for a proof of concept.

iamflimflam1
Posts: 9
Joined: Fri May 22, 2020 7:58 am

Re: hfp_hf disconnects after a few seconds

Postby iamflimflam1 » Sat Jul 24, 2021 9:41 am

For anyone looking for a working hsp_hf I've pulled together something that works using: https://github.com/bluekitchen/btstack

It's very much based on their demo code with a very small amount of cleanup and addition of microphone input so it fully works.

https://github.com/atomic14/esp32-hsp-hf

Return to “ESP-IDF”

Who is online

Users browsing this forum: Mihir138 and 37 guests