Bluetooth Handsfree , registered callback never called

ESPI_1
Posts: 10
Joined: Thu Feb 27, 2020 7:08 am

Bluetooth Handsfree , registered callback never called

Postby ESPI_1 » Thu Apr 02, 2020 7:10 am

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?

ypiotr
Posts: 3
Joined: Tue May 26, 2020 8:04 am

Re: Bluetooth Handsfree , registered callback never called

Postby ypiotr » Fri Oct 09, 2020 1:07 pm

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

Who is online

Users browsing this forum: bfredo123, Majestic-12 [Bot], snutw_ and 79 guests