using the Original Espressif HFP-AG example does not work properly
-> "Noise" in Speaker or "no Connection"
STEPS:
Creating a new / Espressif-IDF-Project / from template
Selecting "bluetooth/bluedroid/classic_bt/hfp_ag"
Keep the original "sdkconfig" unchanged
Compile, download - OK
Got the expected "HFP AG Command-Page" in the Terminal
When entering
hf con;
I got the Error:
W (13900) BT_APPL: AG found collision (ACL) ...
W (39150) BT_RFCOMM: rfc_find_lcid_mcb LCID reused LCID:0x43 current:0x0
W (39150) BT_RFCOMM: RFCOMM_DisconnectInd LCID:0x43
W (39150) BT_L2CAP: L2CAP - rcvd conn req for unknown PSM: 25
W (39570) BT_RFCOMM: rfc_find_lcid_mcb LCID reused LCID:0x45 current:0x0
W (39580) BT_RFCOMM: RFCOMM_DisconnectInd LCID:0x45
Effects:
I can only establish a connection with one BT-Device, the same one I sucessfully used in former A2DP Test-on this ESP32-Modul.
But there is no Audio-Channel with only Noise -
Next step: sdkconfig: I switched to SCO to HCI at 2 places,
but bt_app_hf_outgoing_cb in bt-app-hf.c seems to remain without invocation.
(fix: I fill the whole Buffer with sinus-data)
Trying to connect any other of my BT-HFP-Devices completly fails.
Question:
Any Ideas, where to search? Configuration? Clear any old BT-ConnectionList?
Bluetooth HFP-AG: ESP32 IDF Example Template Bug: Noise or No Connection
Re: Bluetooth HFP-AG: ESP32 IDF Example Template Bug: Noise or No Connection
Hallo espressif-Team It seems to be a bug in the BT-Library - can you check it - I have no source.
Switching BT DEBUG LOG LEVEL to "Verbose", I see there is an error some statements earlier
D (1395) BT_BTC: btc_hf_cb_handler: event = BTA_AG_ENABLE_EVT
E (1395) BT_BTC: btc_hf_cb_handler: Invalid index -1
Looking for "BTA_AG_ENABLE_EVT" in the Internet, I found an quite similarbugfix under
https://gitlab.com/Codeaurora/platform_ ... c7b9332b1a
Switching BT DEBUG LOG LEVEL to "Verbose", I see there is an error some statements earlier
D (1395) BT_BTC: btc_hf_cb_handler: event = BTA_AG_ENABLE_EVT
E (1395) BT_BTC: btc_hf_cb_handler: Invalid index -1
Looking for "BTA_AG_ENABLE_EVT" in the Internet, I found an quite similarbugfix under
https://gitlab.com/Codeaurora/platform_ ... c7b9332b1a
- btif/src/btif_hf.c
- {
- tBTA_AG *p_data = (tBTA_AG *)p_param;
- bdstr_t bdstr;
- - int idx = p_data->hdr.handle - 1;
- + int idx;
- BOOLEAN ignore_rfc_fail = false;
- BTIF_TRACE_IMP("%s: event=%s", __FUNCTION__, dump_hf_event(event));
- + // for BTA_AG_ENABLE_EVT/BTA_AG_DISABLE_EVT, p_data is NULL
- + if (event == BTA_AG_ENABLE_EVT || event == BTA_AG_DISABLE_EVT)
- + return;
- + // p_data is NULL for any other event, return
- + if (p_data == NULL)
- + {
- + BTIF_TRACE_ERROR("%s: data is NULL", __FUNCTION__);
- + return;
- + }
- + idx = p_data->hdr.handle - 1;
- if ((idx < 0) || (idx >= BTIF_HF_NUM_CB))
- {
- BTIF_TRACE_ERROR("%s: Invalid index %d", __FUNCTION__, idx);
Who is online
Users browsing this forum: No registered users and 70 guests