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?

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

  • 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.)

Related