Page 1 of 1

Bluetooth Handsfree , registered callback never called

Posted: Thu Apr 02, 2020 7:10 am
by ESPI_1
Bluetooth Hf-AG, 100% original example from espressif

STEPS:
1) configured for SCO-HCI in Controller and in Bluedroit

2) Connection sucessfully established (I can VOLUME_CONTROL_EVT when pressing Buttons on the Device)

3) succefully set up audio connection with peer device: Terminal: enter "hf cona;"
- function "bt_app_hf_cb" receives an "ESP_HF_AUDIO_STATE_EVT"
- esp_bt_hf_register_data_callback(bt_app_hf_incoming_cb, bt_app_hf_outgoing_cb) is sucessfully called

BUT
nicer the function
"bt_app_hf_incoming_cb",
nore the function
"bt_app_hf_outgoing_cb"
is ever called --> therefore: no Audio-communication

"Hook off" Button pressed on device - no change

registered callback never called
(Info: I added 2 Counters in the callbacks, which I can read via a new implemented "hf xxx;" cmd)

I only see messages in the terminal:
"bta_ag_sco_read_cback: status(2)" BTM_SCO_DATA_NONE
and some single "bta_ag_sco_read_cback: status(1)" BTM_SCO_DATA_PAR_ERR,
but no BTM_SCO_DATA_CORRECT,



4) I added an additiona trigger "esp_hf_outgoing_data_ready();" after calling esp_bt_hf_register_data_callback
- no improvement


Any Ideas, which additional steps are necessary?

Re: Bluetooth Handsfree , registered callback never called

Posted: Fri Oct 09, 2020 1:07 pm
by ypiotr
Hi! Have you made any progress since April? I'm trying to stream some audio messages using ESP32 as Bluetooth HFP AG and I'm stuck at the same spot as you were. Please help if you can :)

Thanks,
Piotr