Noises of the Bluetooth HFP running on ESP32_LyraT board

Nob Oba
Posts: 2
Joined: Thu Dec 19, 2019 12:23 am

Noises of the Bluetooth HFP running on ESP32_LyraT board

Postby Nob Oba » Thu Dec 19, 2019 6:09 am

Hi,

I am having problems with the audio quality of the bluetooth HFP.

Hardware: ESP32_LyraT V4.3
Software: esp-idf V3.3, esp-adf v2.0-beta2-24-g40cb926
Example project: \esp-adf\examples\get-started\pipeline_a2dp_sink_and_hfp (unmodified)

I built the pipeline_a2dp_sink_and_hfp project, and flashed it to the ESP32_LyraT board. I got my iPhone paired with ESP32.

I ran the Echo/Sound test service of Skype on the iPhone. The Skype’s automated voices were transferred to and played by the LyraT board via the bluetooth HFP. The voices had cracking noises, and I had a bunch of warning messages:

W (90978) BT_BTM: SCO xmit Q overflow, pkt dropped
W (90978) BT_BTM: stat 10
W (90978) BT_BTM: SCO xmit Q overflow, pkt dropped
W (90978) BT_BTM: stat 10
W (90978) BT_BTM: SCO xmit Q overflow, pkt dropped
W (90978) BT_BTM: stat 10
W (90978) BT_BTM: SCO xmit Q overflow, pkt dropped
W (90978) BT_BTM: stat 10
W (90978) BT_BTM: SCO xmit Q overflow, pkt dropped
W (90978) BT_BTM: stat 10

Then, I talked to the microphone of the ESP32_LyraT board. Skype echoed back my voices, which were having large harsh noises and barely audible. I tried with an external microphone plugged in the LyraT board, but had the same results. My iPhone works OK with the AirPods.

Are there any clues to solving these problems?

Oba

nkizz11
Posts: 1
Joined: Sat Jan 04, 2020 6:37 pm

Re: Noises of the Bluetooth HFP running on ESP32_LyraT board

Postby nkizz11 » Sat Jan 04, 2020 8:17 pm

I'm also running into this issue. I'm using the esp-adf/examples/get-started/pipeline_a2dp_sink_and_hfp code. The module sinks audio just fine over A2DP and HFP, however when it sources audio there is just silence and the following is printed to the console every 20 milliseconds.

Code: Select all

W (50017) BT_BTM: SCO xmit Q overflow, pkt dropped
W (50017) BT_BTM: stat 10
W (50037) BT_BTM: SCO xmit Q overflow, pkt dropped
W (50037) BT_BTM: stat 10

bonelnet
Posts: 1
Joined: Fri Jan 10, 2020 12:26 pm

Re: Noises of the Bluetooth HFP running on ESP32_LyraT board

Postby bonelnet » Fri Jan 10, 2020 1:06 pm

Hi all

I am also running the ad2p_sink_and_hfp example. I have the impression that the audio quality is better from the phone to the ESP32 than from the ESP32 to the phone.

I took a look in esp-idf/components/bt/host/bluedroid/stack/btm/btm_sco.c and I added some logs in the BTM_WriteScoData function:

- Just before

Code: Select all

if (p_buf->len > BTM_SCO_DATA_SIZE_MAX)
I print p_buf->len. the value is always 60.

- Just before

Code: Select all

if (fixed_queue_length(p_ccb->xmit_data_q) < BTM_SCO_XMIT_QUEUE_THRS)
I print fixed_queue_length(p_ccb->xmit_data_q). The values are series starting from 14, 16 or 18, and ending to 20, then the " SCO xmit Q overflow, pkt dropped" message is shown. For example: 14, 15, .., 20, warning, 16, 17, .., 20, warning, and so on.

The current define values are the following:

- BTM_SCO_DATA_SIZE_MAX = 120
- BTM_SCO_XMIT_QUEUE_THRS = 20

I also notice that the mSBC codec is being used:
I (15677) MyProject: bt_app_hf_client_audio_open
I (15687) MyProject: hf open msbc
W (15697) BT_APPL: new conn_srvc id:19, app_id:0
E (15697) BT_APPL: bta_dm_pm_btm_status hci_status=32
I (15697) I2S: APLL: Req RATE: 16000, real rate: 15999.986, BITS: 16, CLKM: 1, BCK_M: 8, MCLK: 4095996.500, SCLK: 511999.562500, diva: 1, divb: 0
Could this problem be specific to the TX path, as the audio from the phone to the ESP32 (RX) seems to be correct? Do you have any ideas or suggestions?

Many thanks in advance

Bonel

Tnarain5
Posts: 7
Joined: Fri Nov 29, 2019 11:22 am

Re: Noises of the Bluetooth HFP running on ESP32_LyraT board

Postby Tnarain5 » Fri Feb 21, 2020 4:28 pm

Hi guys,
Did you find any solution to this problem??
im really having audio quality issues over this.

Thank-You
Tarun Narain

ESP_William
Posts: 135
Joined: Tue Apr 24, 2018 5:54 am

Re: Noises of the Bluetooth HFP running on ESP32_LyraT board

Postby ESP_William » Thu Mar 10, 2022 3:47 am

Hi
The above phenomenon should be packet loss caused by the coexistence problem. I have a suggestion that you could test it:
Switch ADF to the latest master, and IDF uses Release4 4.
Then use this demo to test A2DP and HFP functions:
https://github.com/espressif/esp-adf/tr ... t_ble_coex

Who is online

Users browsing this forum: No registered users and 42 guests