nRF5340 audio dk failure to maintain connection after updating Galaxy Buds2 Pro software

I was working with the nRF5340 audio dk gateway application to connect to my Samsung Galaxy Buds2 Pro ear buds. I was able to make a cis connection and stream data bidirectionally.

Then I updated the software on the Buds2 to RS10XXUDAWF4 and now I cannot stream data between the ear buds and the gateway. I see errors in the log that seem significant: "Unable to find ASE Control Point" then "No sinks found, Disconnected." Does anyone know what that means or what changed on the new Buds2 Pro software?

Parents
  • Hi Ed

    Would you happen to have an Ellisys Bluetooth sniffer (or something comparable) so you can see what is happening over the air? 

    Otherwise it is hard to know what Samsung might have done on their side, to make it non functional between one update and the next. 

    I will check internally if someone in the audio team happen to have the same airbuds, if so we can do some testing on our side to try and verify your findings. 

    Best regards
    Torbjørn

  • So, thanks again for your response earlier Torbjorn, I wasn't able to get a sniffer going but now I'm looking at this again since Samsung came out with a new software update for the Galaxy Buds2 Pro ear buds. I updated to R510XXU0AWI2 today and now connections to the nRF5340 audio dk gateway are very stable. However, when I try to stream to the buds from the gateway I2S line in the audio is choppy. If I interrupt the streaming by tapping the ear buds to pause and then tap again to un-pause, the audio is very clear and stable for a couple of seconds and then it starts to get choppy again. This behavior is very repeatable.

    I configured the gateway for bidirectional mode but, for now, I'm just trying to make input from the line in work clearly. Do you, or does anyone, have any suggestions as to what I should try now. I feel like I'm so close to a working demo!

  • After posting my results above, I briefly tried using SDK version 2.5.0 of the app. It didn't work as well as 2.4.2. I could only get audio from one ear bud and the log was spewing "Data size mismatch" warning messages.

    00> rtt:~$ *** Booting nRF Connect SDK v2.5.0 ***
    00> rtt:~$ GW [00:00:00.393,951] <inf> fw_info:
    00> nRF5340 Audio nRF5340 Audio DK cpuapp
    00> NCS base version: 2.5.0
    00> Cmake run : Sun Oct 29 12:24:25 2023
    00> rtt:~$ GW [00:00:00.393,951] <inf> fw_info: ------- DEBUG BUILD -------
    00> rtt:~$ GW [00:00:00.393,951] <inf> fw_info: Compiled for GATEWAY device
    00> rtt:~$ GW [00:00:00.404,602] <inf> board_version: Compatible board/HW version found: 1.0.0
    00> rtt:~$ GW [00:00:00.447,448] <inf> bt_mgmt_ctlr_cfg: Controller: LL_ACS_NRF53. Version: 3393
    00> rtt:~$ GW [00:00:00.449,371] <inf> bt_mgmt: Local identity addr: FD:31:C4:B9:84:DD (random)
    00> rtt:~$ GW [00:00:00.575,500] <inf> bt_mgmt_scan: Local addr: 6E:BA:8B:D8:56:5D (random). May time out. Updates not printed
    00> rtt:~$ GW [00:00:00.575,500] <inf> bt_mgmt_scan: Scanning successfully started
    00> rtt:~$ rtt:~$ GW [00:00:20.460,235] <inf> bt_mgmt_scan: Creating connection to device: 73:AA:4E:4F:0C:00 (random)
    00> rtt:~$ GW [00:00:20.643,005] <inf> bt_mgmt: Connected: 73:AA:4E:4F:0C:00 (random)
    00> rtt:~$ GW [00:00:20.651,031] <inf> bt_mgmt_scan: Local addr: 62:75:F4:4C:57:6B (random). May time out. Updates not printed
    00> rtt:~$ GW [00:00:20.651,062] <inf> bt_mgmt_scan: Scanning successfully started
    00> rtt:~$ GW [00:00:20.651,275] <inf> streamctrl_unicast_client: Device connected
    00> rtt:~$ GW [00:00:20.665,679] <inf> bt_mgmt_scan: Creating connection to device: 42:05:70:44:DA:1F (random)
    00> rtt:~$ GW [00:00:20.862,670] <inf> bt_mgmt: Connected: 42:05:70:44:DA:1F (random)
    00> rtt:~$ GW [00:00:20.862,884] <inf> streamctrl_unicast_client: Device connected
    00> rtt:~$ rtt:~$ GW [00:00:22.053,833] <inf> bt_smp: SC LTK: 0x2a38cdb73d019dca2eed913985263a75 (No bonding)
    00> rtt:~$ GW [00:00:22.054,779] <inf> streamctrl_unicast_client: Security changed
    00> rtt:~$ GW [00:00:22.121,337] <inf> bt_smp: SC LTK: 0xfdd854bafe8221a6dc87cd3fae543603 (No bonding)
    00> rtt:~$ GW [00:00:22.122,467] <inf> streamctrl_unicast_client: Security changed
    00> rtt:~$ GW [00:00:22.444,091] <inf> bt_rend_vol: VCS discover finished
    00> rtt:~$ GW [00:00:22.541,595] <inf> bt_rend_vol: VCS discover finished
    00> rtt:~$ rtt:~$ GW [00:00:26.493,835] <wrn> unicast_client: More than one sink endpoint found, idx 0 is used by default
    00> rtt:~$ GW [00:00:26.621,368] <wrn> unicast_client: More than one sink endpoint found, idx 0 is used by default
    00> rtt:~$ rtt:~$ GW [00:00:32.855,316] <inf> unicast_client: RIGHT sink stream configured
    00> rtt:~$ GW [00:00:32.884,735] <inf> unicast_client: RIGHT source stream configured
    00> rtt:~$ GW [00:00:32.974,670] <inf> unicast_client: Enable stream 0x20002e9c
    00> rtt:~$ GW [00:00:32.975,189] <inf> unicast_client: Enable stream 0x20002da8
    00> rtt:~$ GW [00:00:33.102,264] <inf> unicast_client: LEFT sink stream configured
    00> rtt:~$ GW [00:00:33.132,263] <inf> unicast_client: LEFT source stream configured
    00> rtt:~$ GW [00:00:33.222,198] <inf> unicast_client: Enable stream 0x20002c2c
    00> rtt:~$ GW [00:00:33.222,686] <inf> unicast_client: Enable stream 0x20002b38
    00> rtt:~$ GW [00:00:33.334,167] <inf> unicast_client: Stream 0x20002da8 started
    00> rtt:~$ GW [00:00:33.364,624] <inf> unicast_client: Stream 0x20002e9c started
    00> rtt:~$ GW [00:00:33.366,699] <wrn> le_audio_rx: Data size mismatch
    00> rtt:~$ GW [00:00:33.376,708] <wrn> le_audio_rx: Data size mismatch
    00> rtt:~$ GW [00:00:33.386,688] <wrn> le_audio_rx: Data size mismatch
    00> rtt:~$ GW [00:00:33.396,697] <wrn> le_audio_rx: Data size mismatch
    00> rtt:~$ GW [00:00:33.406,707] <wrn> le_audio_rx: Data size mismatch
    00> rtt:~$ GW [00:00:33.416,687] <wrn> le_audio_rx: Data size mismatch
    00> rtt:~$ GW [00:00:33.426,696] <wrn> le_audio_rx: Data size mismatch
    00> rtt:~$ rtt:~$ --- 13 messages dropped ---
    00> GW [00:00:33.436,706] <wrn> le_audio_rx: Data size mismatch
    00> rtt:~$ GW [00:00:33.446,716] <wrn> le_audio_rx: Data size mismatch
    00> rtt:~$ GW [00:00:33.466,705] <wrn> le_audio_rx: Data size mismatch
    00> rtt:~$ GW [00:00:33.476,715] <wrn> le_audio_rx: Data size mismatch
    00> rtt:~$ GW [00:00:33.486,694] <wrn> le_audio_rx: Data size mismatch
    00> rtt:~$ GW [00:00:33.496,704] <wrn> le_audio_rx: Data size mismatch
    00> rtt:~$ GW [00:00:33.506,713] <wrn> le_audio_rx: Data size mismatch
    00> rtt:~$ GW [00:00:33.516,693] <wrn> le_audio_rx: Data size mismatch
    00> rtt:~$ GW [00:00:33.526,702] <wrn> le_audio_rx: Data size mismatch
    00> rtt:~$ GW [00:00:33.566,711] <wrn> le_audio_rx: Data size mismatch
    00> rtt:~$ GW [00:00:33.616,699] <wrn> le_audio_rx: Data size mismatch
    00> rtt:~$ GW [00:00:33.676,727] <wrn> le_audio_rx: Data size mismatch
    00> rtt:~$ GW [00:00:33.686,706] <wrn> le_audio_rx: Data size mismatch
    00> rtt:~$ GW [00:00:33.696,716] <wrn> le_audio_rx: Data size mismatch
    00> rtt:~$ GW [00:00:33.701,690] <inf> unicast_client: Stream 0x20002c2c started
    00> rtt:~$ GW [00:00:33.703,216] <wrn> le_audio_rx: Data size mismatch
    00> rtt:~$ GW [00:00:33.706,726] <wrn> le_audio_rx: Data size mismatch
    00> rtt:~$ GW [00:00:33.713,226] <wrn> le_audio_rx: Data size mismatch
    00> rtt:~$ GW [00:00:33.716,705] <wrn> le_audio_rx: Data size mismatch
    00> rtt:~$ GW [00:00:33.723,236] <wrn> le_audio_rx: Data size mismatch
    00> rtt:~$ rtt:~$ GW [00:00:33.726,715] <wrn> le_audio_rx: Data size mismatch
    00> rtt:~$ GW [00:00:33.734,405] <wrn> le_audio_rx: Data size mismatch
    00> rtt:~$ GW [00:00:33.736,724] <wrn> le_audio_rx: Data size mismatch
    00> rtt:~$ GW [00:00:33.743,225] <wrn> le_audio_rx: Data size mismatch
    00> rtt:~$ GW [00:00:33.746,704] <wrn> le_audio_rx: Data size mismatch
    00> rtt:~$ GW [00:00:33.753,234] <wrn> le_audio_rx: Data size mismatch
    00> rtt:~$ GW [00:00:33.756,713] <wrn> le_audio_rx: Data size mismatch
    00> rtt:~$ GW [00:00:33.763,244] <wrn> le_audio_rx: Data size mismatch
    00> rtt:~$ GW [00:00:33.766,723] <wrn> le_audio_rx: Data size mismatch
    00> rtt:~$ GW [00:00:33.773,223] <wrn> le_audio_rx: Data size mismatch
    00> rtt:~$ GW [00:00:33.776,733] <wrn> le_audio_rx: Data size mismatch
    00> rtt:~$ GW [00:00:33.783,233] <wrn> le_audio_rx: Data size mismatch
    00> rtt:~$ GW [00:00:33.786,712] <wrn> le_audio_rx: Data size mismatch
    00> rtt:~$ GW [00:00:33.793,243] <wrn> le_audio_rx: Data size mismatch
    00> rtt:~$ GW [00:00:33.796,722] <wrn> le_audio_rx: Data size mismatch
    00> rtt:~$ GW [00:00:33.803,222] <wrn> le_audio_rx: Data size mismatch
    00> rtt:~$ GW [00:00:33.806,732] <wrn> le_audio_rx: Data size mismatch
    00> rtt:~$ GW [00:00:33.813,232] <wrn> le_audio_rx: Data size mismatch
    00> rtt:~$ GW [00:00:33.816,711] <wrn> le_audio_rx: Data size mismatch
    00> rtt:~$ GW [00:00:33.823,242] <wrn> le_audio_rx: Data size mismatch
    00> rtt:~$ GW [00:00:33.826,721] <wrn> le_audio_rx: Data size mismatch
    00> rtt:~$ rtt:~$ GW [00:00:33.833,251] <wrn> le_audio_rx: Data size mismatch
    00> rtt:~$ GW [00:00:33.836,730] <wrn> le_audio_rx: Data size mismatch
    00> rtt:~$ GW [00:00:33.843,231] <wrn> le_audio_rx: Data size mismatch
    00> rtt:~$ GW [00:00:33.846,740] <wrn> le_audio_rx: Data size mismatch
    00> rtt:~$ GW [00:00:33.854,400] <inf> audio_datapath: Drft comp state: CALIB
    00> rtt:~$ GW [00:00:33.856,719] <wrn> le_audio_rx: Data size mismatch
    00> rtt:~$ GW [00:00:33.862,365] <wrn> audio_datapath: Data received, total underruns: 515
    00> rtt:~$ GW [00:00:33.954,376] <inf> audio_datapath: Drft comp state: OFFSET
    00> rtt:~$ GW [00:00:34.375,701] <inf> audio_datapath: Drft comp state: LOCKED
    00> rtt:~$ GW [00:00:34.383,850] <inf> audio_datapath: Pres comp state: MEAS
    00> rtt:~$ GW [00:00:34.493,835] <inf> audio_datapath: Pres comp state: WAIT
    00> rtt:~$ GW [00:00:34.633,850] <inf> audio_datapath: Pres comp state: INIT
    00> rtt:~$ GW [00:00:34.643,859] <inf> audio_datapath: Pres comp state: MEAS
    00> rtt:~$ GW [00:00:34.753,845] <inf> audio_datapath: Pres comp state: LOCKED
    00> rtt:~$ rtt:~$ --- 26 messages dropped ---
    00> GW [00:00:35.796,813] <wrn> le_audio_rx: Data size mismatch
    00> rtt:~$ GW [00:00:35.806,823] <wrn> le_audio_rx: Data size mismatch
    00> rtt:~$ GW [00:00:35.816,833] <wrn> le_audio_rx: Data size mismatch
    00> rtt:~$ GW [00:00:35.826,812] <wrn> le_audio_rx: Data size mismatch
    00> rtt:~$ GW [00:00:35.836,822] <wrn> le_audio_rx: Data size mismatch
    00> rtt:~$ GW [00:00:35.843,322] <wrn> le_audio_rx: Data size mismatch
    00> rtt:~$ GW [00:00:35.846,832] <wrn> le_audio_rx: Data size mismatch
    00> rtt:~$ GW [00:00:35.853,332] <wrn> le_audio_rx: Data size mismatch
    00> rtt:~$ GW [00:00:35.856,811] <wrn> le_audio_rx: Data size mismatch
    00> rtt:~$ GW [00:00:35.863,342] <wrn> le_audio_rx: Data size mismatch
    00> rtt:~$ GW [00:00:35.866,821] <wrn> le_audio_rx: Data size mismatch
    00> rtt:~$ GW [00:00:35.873,321] <wrn> le_audio_rx: Data size mismatch
    00> rtt:~$ GW [00:00:35.876,831] <wrn> le_audio_rx: Data size mismatch
    00> rtt:~$ GW [00:00:35.883,331] <wrn> le_audio_rx: Data size mismatch
    00> rtt:~$ GW [00:00:35.886,840] <wrn> le_audio_rx: Data size mismatch
    00> rtt:~$ GW [00:00:35.893,341] <wrn> le_audio_rx: Data size mismatch
    00> rtt:~$ GW [00:00:35.913,330] <wrn> le_audio_rx: Data size mismatch
    00> rtt:~$ GW [00:00:35.947,967] <wrn> le_audio_rx: Data size mismatch
    00> rtt:~$ GW [00:00:35.976,837] <wrn> le_audio_rx: Data size mismatch
    00> rtt:~$ GW [00:00:36.006,835] <wrn> le_audio_rx: Data size mismatch
    00> rtt:~$ GW [00:00:36.033,325] <wrn> le_audio_rx: Data size mismatch
    00> rtt:~$ rtt:~$ --- 84 messages dropped ---
    00> GW [00:00:36.063,354] <wrn> le_audio_rx: Data size mismatch
    00> rtt:~$ GW [00:00:36.096,832] <wrn> le_audio_rx: Data size mismatch
    00> rtt:~$ GW [00:00:36.116,851] <wrn> le_audio_rx: Data size mismatch
    00> rtt:~$ GW [00:00:36.146,850] <wrn> le_audio_rx: Data size mismatch
    00> rtt:~$ GW [00:00:36.166,839] <wrn> le_audio_rx: Data size mismatch
    00> rtt:~$ GW [00:00:36.193,359] <wrn> le_audio_rx: Data size mismatch
    00> rtt:~$ GW [00:00:36.216,857] <wrn> le_audio_rx: Data size mismatch
    00> rtt:~$ GW [00:00:36.243,347] <wrn> le_audio_rx: Data size mismatch
    00> rtt:~$ GW [00:00:36.266,845] <wrn> le_audio_rx: Data size mismatch
    00> rtt:~$ GW [00:00:36.286,865] <wrn> le_audio_rx: Data size mismatch
    00> rtt:~$ GW [00:00:36.316,864] <wrn> le_audio_rx: Data size mismatch
    00> rtt:~$ GW [00:00:36.343,353] <wrn> le_audio_rx: Data size mismatch
    00> rtt:~$ GW [00:00:36.363,342] <wrn> le_audio_rx: Data size mismatch
    00> rtt:~$ GW [00:00:36.386,871] <wrn> le_audio_rx: Data size mismatch
    00> rtt:~$ GW [00:00:36.413,360] <wrn> le_audio_rx: Data size mismatch
    00> rtt:~$ GW [00:00:36.436,859] <wrn> le_audio_rx: Data size mismatch
    00> rtt:~$ GW [00:00:36.456,878] <wrn> le_audio_rx: Data size mismatch

  • Hi slswks, I noticed you're using an old controller version.  How do you get on with 3393? https://github.com/nrfconnect/sdk-nrf/tree/main/lib/bin/bt_ll_acs_nrf53/bin

    (see a few other posts linked to the buds2 where the Nordic team have suggested this)

  • Hi Ed

    What if you disable the bidirectional mode, are you still having issues? 

    One of my colleagues did some testing with the Buds2 Pro and can not get it to work reliably in bidirectional mode either. In terms of narrowing down the issue it would be good to know if you see the same behavior. 

    Is bidirectional support a requirement for you? 

    Best regards
    Torbjørn

  • ClinicalAudio, When I mentioned that I tried SDK version 2.5.0 I also upgraded the controller to 3393. You can see the results in the log above. It did not work as well as 2.4.2/3349.

  • Thanks Torbjorn, bidirectional mode is a requirement but I can try turning it off just to see if there's a difference.

Reply Children
  • Hi Ed

    Thanks for the update. Just let me know when you've been able to test it. 

    Best regards
    Torbjørn

  • So, strange results Torbjorn, using 2.4.2/3349 configured with bidirectional off (unidirectional), I get good quality audio in the earbuds from the gateway line in. Then, if I turn off the unidirectional gateway and turn on a gateway configured with bidirectional on, I also get good audio quality and can transmit from the ear bud mic to the gateway headphone output left channel. Perfect, just what I expected.

    But, then, if I connect a different set of ear buds to the bidirectional gateway, they get garbled audio from the gateway line in. When I connect the original ear buds they still work fine.

    Does this make sense? It's like the ear buds remember something from when they connected to the unidirectional gateway. But, at some point the "magic" can get lost and I start getting garbled audio again with the bidirectional gateway and I have to connect the ear buds to a unidirectional gateway to get clear audio again.

    I'd like to know what is causing this behavior. Since, albeit under specific circumstances, I can get bidirectional to work, I'm hopeful that we can find a way to make it work all the time.

    Here's a log with a connection that has clear audio:

    # SEGGER J-Link RTT Viewer V7.88j Terminal Log File
    # Compiled: 13:42:53 on Jun 28 2023
    # Logging started @ 07 Nov 2023 02:16:41
    00> rtt:~$ rtt:~$
    00>
    00> rtt:~$ *** Booting Zephyr OS build v3.3.99-ncs1-1 ***
    00> rtt:~$ GW [00:00:00.387,725] <inf> fw_info:
    00> nRF5340 Audio nRF5340 Audio DK cpuapp
    00> NCS base version: 2.4.2
    00> Cmake run : Tue Nov 07 00:44:02 2023
    00> rtt:~$ GW [00:00:00.387,725] <inf> fw_info: ------- DEBUG BUILD -------
    00> rtt:~$ GW [00:00:00.387,725] <inf> fw_info: Compiled for GATEWAY device
    00> rtt:~$ GW [00:00:00.398,376] <inf> board_version: Compatible board/HW version found: 1.0.0
    00> rtt:~$ GW [00:00:00.435,607] <wrn> bt_hci_core: Controller to host flow control not supported
    00> rtt:~$ GW [00:00:00.438,720] <inf> bt_hci_core: No ID address. App must call settings_load()
    00> rtt:~$ GW [00:00:00.438,812] <inf> ble: MAC: 00:00:00:00:00:00 (public)
    00> rtt:~$ GW [00:00:00.439,361] <inf> ble: Controller version: 3349
    00> rtt:~$ GW [00:00:00.441,802] <inf> bt_hci_core: Identity: EF:CC:2A:6F:83:73 (random)
    00> rtt:~$ GW [00:00:00.441,833] <inf> bt_hci_core: IRK: 0xd18fbf28e63594dc0ada7387381ab59d
    00> rtt:~$ GW [00:00:00.441,864] <inf> bt_hci_core: HCI: version 5.2 (0x0b) revision 0x0d15, manufacturer 0x07e8
    00> rtt:~$ GW [00:00:00.441,864] <inf> bt_hci_core: LMP: version 5.2 (0x0b) subver 0x0d15
    00> rtt:~$ rtt:~$ GW [00:00:00.559,844] <inf> bt_id: RPA: 6E:78:5D:51:8E:E1
    00> rtt:~$ GW [00:00:00.560,638] <inf> cis_gateway: Scanning successfully started
    00> rtt:~$ GW [00:00:51.522,705] <inf> cis_gateway: Connected: 77:54:C0:85:1E:5F (random)
    00> rtt:~$ GW [00:00:52.874,053] <inf> bt_smp: SC LTK: 0xea63661d4dda0a946f2a26ad531df51b (No bonding)
    00> rtt:~$ GW [00:00:53.834,228] <inf> cis_gateway: Scanning successfully started
    00> rtt:~$ GW [00:00:54.649,841] <inf> cis_gateway: Connected: 4E:6D:A1:33:E0:F3 (random)
    00> rtt:~$ GW [00:00:55.094,146] <wrn> cis_gateway: More than one sink endpoints found, ep idx 0 is used by default
    00> rtt:~$ GW [00:00:56.143,096] <inf> bt_smp: SC LTK: 0x370163118a1467c87a01529a13b9c876 (No bonding)
    00> rtt:~$ GW [00:00:56.774,780] <inf> cis_gateway: RIGHT sink stream configured
    00> rtt:~$ GW [00:00:57.553,558] <inf> ble_audio_services: VCS discover finished
    00> rtt:~$ rtt:~$ GW [00:00:58.212,707] <inf> cis_gateway: All headsets connected
    00> rtt:~$ rtt:~$ GW [00:01:00.732,849] <wrn> cis_gateway: More than one sink endpoints found, ep idx 0 is used by default
    00> rtt:~$ rtt:~$ GW [00:01:02.923,950] <inf> cis_gateway: LEFT sink stream configured
    00> rtt:~$ GW [00:01:03.552,734] <inf> ble_audio_services: VCS discover finished
    00> rtt:~$ rtt:~$ GW [00:01:04.304,443] <inf> cis_gateway: RIGHT source stream configured
    00> rtt:~$ GW [00:01:04.424,377] <inf> cis_gateway: Enable stream 0x20002fc4
    00> rtt:~$ GW [00:01:04.424,865] <inf> cis_gateway: Enable stream 0x20002da4
    00> rtt:~$ GW [00:01:04.873,840] <inf> cis_gateway: Stream 0x20002da4 started
    00> rtt:~$ GW [00:01:04.900,482] <wrn> bt_hci_core: opcode 0x2061 status 0x0c
    00> rtt:~$ GW [00:01:05.174,316] <inf> cis_gateway: Stream 0x20002fc4 started
    00> rtt:~$ rtt:~$ GW [00:01:08.293,548] <inf> cis_gateway: LEFT source stream configured
    00> rtt:~$ GW [00:01:08.413,452] <inf> cis_gateway: Enable stream 0x20002b04
    00> rtt:~$ GW [00:01:08.413,970] <inf> cis_gateway: Enable stream 0x200028e4
    00> rtt:~$ GW [00:01:08.862,945] <inf> cis_gateway: Stream 0x200028e4 started
    00> rtt:~$ GW [00:01:08.870,666] <wrn> bt_hci_core: opcode 0x2061 status 0x0c
    00> rtt:~$ GW [00:01:09.103,424] <inf> cis_gateway: Stream 0x20002b04 started
    00> rtt:~$ GW [00:01:09.351,104] <inf> audio_datapath: Drft comp state: CALIB
    00> rtt:~$ GW [00:01:09.353,057] <wrn> audio_datapath: Data received, total underruns: 4466
    00> rtt:~$ GW [00:01:09.451,080] <inf> audio_datapath: Drft comp state: OFFSET
    00> rtt:~$ rtt:~$ GW [00:01:09.802,246] <inf> audio_datapath: Drft comp state: LOCKED
    00> rtt:~$ GW [00:01:09.810,729] <inf> audio_datapath: Pres comp state: MEAS
    00> rtt:~$ GW [00:01:09.920,898] <inf> audio_datapath: Pres comp state: WAIT
    00> rtt:~$ GW [00:01:10.060,852] <inf> audio_datapath: Pres comp state: INIT
    00> rtt:~$ GW [00:01:10.070,831] <inf> audio_datapath: Pres comp state: MEAS
    00> rtt:~$ GW [00:01:10.180,694] <inf> audio_datapath: Pres comp state: LOCKED
    00> rtt:~$ rtt:~$ GW [00:01:11.783,050] <inf> audio_datapath: Pres comp state: INIT
    00> rtt:~$ rtt:~$ GW [00:01:17.383,239] <inf> cis_gateway: Stream 0x200028e4 started
    00> rtt:~$ GW [00:01:17.398,101] <inf> audio_datapath: Pres comp state: MEAS
    00> rtt:~$ GW [00:01:17.400,878] <wrn> audio_datapath: Data received, total underruns: 9
    00> rtt:~$ GW [00:01:17.409,912] <inf> audio_datapath: Drft comp state: INIT
    00> rtt:~$ GW [00:01:17.410,919] <inf> audio_datapath: Drft comp state: CALIB
    00> rtt:~$ GW [00:01:17.418,365] <inf> audio_datapath: Pres comp state: INIT
    00> rtt:~$ GW [00:01:17.510,711] <inf> audio_datapath: Drft comp state: OFFSET
    00> rtt:~$ GW [00:01:17.534,332] <inf> cis_gateway: Stream 0x20002da4 started
    00> rtt:~$ GW [00:01:17.844,543] <inf> audio_datapath: Drft comp state: LOCKED
    00> rtt:~$ GW [00:01:17.847,747] <inf> audio_datapath: Pres comp state: MEAS
    00> rtt:~$ GW [00:01:17.957,794] <inf> audio_datapath: Pres comp state: WAIT
    00> rtt:~$ GW [00:01:18.097,869] <inf> audio_datapath: Pres comp state: INIT
    00> rtt:~$ GW [00:01:18.107,940] <inf> audio_datapath: Pres comp state: MEAS
    00> rtt:~$ GW [00:01:18.217,559] <inf> audio_datapath: Pres comp state: LOCKED

    Here's a log of a connection with garbled audio:

    # SEGGER J-Link RTT Viewer V7.88j Terminal Log File
    # Compiled: 13:42:53 on Jun 28 2023
    # Logging started @ 07 Nov 2023 02:18:33
    00> rtt:~$ rtt:~$
    00>
    00> rtt:~$ *** Booting Zephyr OS build v3.3.99-ncs1-1 ***
    00> rtt:~$ GW [00:00:00.368,499] <inf> fw_info:
    00> nRF5340 Audio nRF5340 Audio DK cpuapp
    00> NCS base version: 2.4.2
    00> Cmake run : Tue Nov 07 00:44:02 2023
    00> rtt:~$ GW [00:00:00.368,499] <inf> fw_info: ------- DEBUG BUILD -------
    00> rtt:~$ GW [00:00:00.368,530] <inf> fw_info: Compiled for GATEWAY device
    00> rtt:~$ GW [00:00:00.379,150] <inf> board_version: Compatible board/HW version found: 1.0.0
    00> rtt:~$ GW [00:00:00.416,473] <wrn> bt_hci_core: Controller to host flow control not supported
    00> rtt:~$ GW [00:00:00.419,586] <inf> bt_hci_core: No ID address. App must call settings_load()
    00> rtt:~$ GW [00:00:00.419,677] <inf> ble: MAC: 00:00:00:00:00:00 (public)
    00> rtt:~$ GW [00:00:00.420,227] <inf> ble: Controller version: 3349
    00> rtt:~$ GW [00:00:00.422,729] <inf> bt_hci_core: Identity: EF:CC:2A:6F:83:73 (random)
    00> rtt:~$ GW [00:00:00.422,760] <inf> bt_hci_core: IRK: 0xd18fbf28e63594dc0ada7387381ab59d
    00> rtt:~$ GW [00:00:00.422,790] <inf> bt_hci_core: HCI: version 5.2 (0x0b) revision 0x0d15, manufacturer 0x07e8
    00> rtt:~$ GW [00:00:00.422,790] <inf> bt_hci_core: LMP: version 5.2 (0x0b) subver 0x0d15
    00> rtt:~$ rtt:~$ GW [00:00:00.540,863] <inf> bt_id: RPA: 6C:5C:61:E7:D8:22
    00> rtt:~$ GW [00:00:00.541,625] <inf> cis_gateway: Scanning successfully started
    00> rtt:~$ rtt:~$ GW [00:00:09.807,159] <inf> cis_gateway: Connected: 24:11:53:86:D3:1E (public)
    00> rtt:~$ rtt:~$ GW [00:00:11.123,321] <inf> bt_smp: SC LTK: 0x22de09865901bc076a7a336fda146d6f (No bonding)
    00> rtt:~$ GW [00:00:12.053,527] <inf> cis_gateway: Scanning successfully started
    00> rtt:~$ GW [00:00:12.120,178] <inf> cis_gateway: Connected: 24:11:53:86:D6:24 (public)
    00> rtt:~$ rtt:~$ GW [00:00:13.522,369] <inf> bt_smp: SC LTK: 0x3354c75d0df384eea31381e3956346b8 (No bonding)
    00> rtt:~$ GW [00:00:13.612,976] <wrn> cis_gateway: More than one sink endpoints found, ep idx 0 is used by default
    00> rtt:~$ rtt:~$ GW [00:00:15.321,777] <inf> cis_gateway: All headsets connected
    00> rtt:~$ GW [00:00:15.864,105] <inf> cis_gateway: RIGHT sink stream configured
    00> rtt:~$ rtt:~$ GW [00:00:16.702,880] <inf> ble_audio_services: VCS discover finished
    00> rtt:~$ rtt:~$ GW [00:00:17.872,070] <wrn> cis_gateway: More than one sink endpoints found, ep idx 0 is used by default
    00> rtt:~$ rtt:~$ GW [00:00:20.123,199] <inf> cis_gateway: LEFT sink stream configured
    00> rtt:~$ GW [00:00:21.021,972] <inf> ble_audio_services: VCS discover finished
    00> rtt:~$ rtt:~$ GW [00:00:22.643,737] <inf> cis_gateway: RIGHT source stream configured
    00> rtt:~$ GW [00:00:22.793,640] <inf> cis_gateway: Enable stream 0x20002fc4
    00> rtt:~$ GW [00:00:22.794,158] <inf> cis_gateway: Enable stream 0x20002da4
    00> rtt:~$ GW [00:00:23.273,132] <inf> cis_gateway: Stream 0x20002da4 started
    00> rtt:~$ GW [00:00:23.299,743] <wrn> bt_hci_core: opcode 0x2061 status 0x0c
    00> rtt:~$ GW [00:00:23.543,609] <inf> cis_gateway: Stream 0x20002fc4 started
    00> rtt:~$ rtt:~$ GW [00:00:26.212,829] <inf> cis_gateway: LEFT source stream configured
    00> rtt:~$ GW [00:00:26.332,733] <inf> cis_gateway: Enable stream 0x20002b04
    00> rtt:~$ GW [00:00:26.333,251] <inf> cis_gateway: Enable stream 0x200028e4
    00> rtt:~$ GW [00:00:26.722,229] <inf> cis_gateway: Stream 0x200028e4 started
    00> rtt:~$ GW [00:00:26.730,010] <wrn> bt_hci_core: opcode 0x2061 status 0x0c
    00> rtt:~$ GW [00:00:27.022,705] <inf> cis_gateway: Stream 0x20002b04 started
    00> rtt:~$ GW [00:00:27.270,416] <inf> audio_datapath: Drft comp state: CALIB
    00> rtt:~$ GW [00:00:27.272,369] <wrn> audio_datapath: Data received, total underruns: 3986
    00> rtt:~$ GW [00:00:27.370,391] <inf> audio_datapath: Drft comp state: OFFSET
    00> rtt:~$ GW [00:00:27.373,382] <wrn> audio_datapath: Data received, total underruns: 3987
    00> rtt:~$ rtt:~$ GW [00:00:27.690,521] <inf> audio_datapath: Drft comp state: LOCKED
    00> rtt:~$ GW [00:00:27.700,195] <inf> audio_datapath: Pres comp state: MEAS
    00> rtt:~$ GW [00:00:27.809,906] <inf> audio_datapath: Pres comp state: WAIT
    00> rtt:~$ GW [00:00:27.950,042] <inf> audio_datapath: Pres comp state: INIT
    00> rtt:~$ GW [00:00:27.960,021] <inf> audio_datapath: Pres comp state: MEAS
    00> rtt:~$ GW [00:00:28.070,068] <inf> audio_datapath: Pres comp state: LOCKED
    00> rtt:~$ rtt:~$ GW [00:00:29.559,844] <inf> audio_datapath: sdu_ref_us not from consecutive frames (diff: 20000 us)
    00> rtt:~$ GW [00:00:29.559,875] <inf> audio_datapath: Pres comp state: WAIT
    00> rtt:~$ GW [00:00:29.689,605] <inf> audio_datapath: Pres comp state: INIT
    00> rtt:~$ GW [00:00:29.699,951] <inf> audio_datapath: Pres comp state: MEAS
    00> rtt:~$ GW [00:00:29.810,028] <inf> audio_datapath: Pres comp state: WAIT
    00> rtt:~$ GW [00:00:29.949,768] <inf> audio_datapath: Pres comp state: INIT
    00> rtt:~$ GW [00:00:29.959,747] <inf> audio_datapath: Pres comp state: MEAS
    00> rtt:~$ GW [00:00:30.069,824] <inf> audio_datapath: Pres comp state: LOCKED
    00> rtt:~$ rtt:~$ GW [00:00:33.055,694] <wrn> audio_datapath: In I2S TX underrun condition, total: 5000
    00> rtt:~$ rtt:~$ GW [00:00:38.055,877] <wrn> audio_datapath: In I2S TX underrun condition, total: 10000
    00> rtt:~$ rtt:~$ GW [00:00:39.850,372] <inf> audio_datapath: sdu_ref_us not from consecutive frames (diff: 7850008 us)
    00> rtt:~$ GW [00:00:39.850,402] <inf> audio_datapath: Pres comp state: WAIT
    00> rtt:~$ GW [00:00:39.851,928] <wrn> audio_datapath: Data received, total underruns: 11795

    Thanks in advance for your continued help,

    Ed

  • Hi Ed

    Sorry for the slow response on this one. 

    One of the audio developers did some testing and was able to get reliable bidirectional audio with the Buds2 when using the following settings, based on v2.5.0 of the SDK:

    CONFIG_BT_DEVICE_NAME="Galaxy Buds2 Pro"
    CONFIG_BT_BONDABLE=n
    CONFIG_STREAM_BIDIRECTIONAL=y
    CONFIG_AUDIO_SOURCE_I2S=y
    CONFIG_AUDIO_SAMPLE_RATE_16000_HZ=y

    CONFIG_BT_AUDIO_PRESENTATION_DELAY_US=40000

    Exactly why using 48kHz is not possible is not yet understood, but apparently he was able to get 48kHz working with an older version of the Bud2 firmware so there could be some changes on their side as well which affects the performance when running bidirectional audio and 48kHz at the same time. 

    Could you test with the same settings and see if you get more consistent performance? 

    I expect 16kHz is insufficient for your application, but at least it would help us narrow down the problem. 

    We will do some more testing on our side as well to try to understand the problem better. 

    Best regards
    Torbjørn

  • Thanks for the response Torbjorn, it was very helpful. Yes, the CONFIG_AUDIO_SAMPLE_RATE_16000_HZ=y setting seems to be the key. With that one change, the connection and audio line in audio path to the ear buds seem to be quite reliable. The 16000 Hz sample rate is fine for me right now.

    I was working with SDK version 2.4.2. I also tried 2.5.0 but the 2.4.2 SDK seems a little more reliable. The 2.5.0 version seemed to have one or the other stereo channels drop out randomly.

    I'll continue testing to see if I can make my application demo work an let you know how it goes. I need to test the other direction more (ear buds mic to the gateway headphone output.)

  • Hi Ed

    Good to hear you got better results with this configuration. 

    Please let us know once you have had more time to test it. If v2.5.0 proves less robust than v2.4.2 it is something we need to look into. 

    Best regards
    Torbjørn

Related