nrf5340_audio_dk: How to log the current scan channel index?

Hi,

I'm running some transceiver tests to look at extended broadcast and ISO transfer modes. I am using  nrf5340_audio_dk and ncs V2.6.0 to run nrf5340_audio application. I want to understand the complete flow of LE audio, as shown in the figure below.

First of all, I have constructed the contents of each packet and made it meet the time sequence according to the capture results of ellisy, as shown in the following figure.

Then I use the other BLE device to transmit and the nrf5340 as the headset to receive. I judged nrf534 successfully received AUX_SYNC_IND by printing the log, because  I saw logs that contain specific audio configurations in AUX_SYNC_IND.

HL [00:01:12.645,080] <inf> main:       Sampling rate: 48000 Hz
HL [00:01:12.645,111] <inf> main:       Bitrate (compressed): 96000 bps
HL [00:01:12.645,111] <inf> audio_datapath: Presentation delay set to 10000 us
HL [00:01:12.645,111] <inf> main: Presentation delay 10000 us is set

But then this one came along “HL [00:01:13.445,312] <inf> main: PA sync lost, reason: 31”. 

My guess is that the headset failed to scan the calculated frequency hopping sequence after receiving the channel_map indicated in the AUX_ADV_IND packet. Therefore, I would like to ask for help on how to print the channel that is currently being scanned. Or maybe something else went wrong and I ignored it.

something I have tried:

I add a log in  lll_chan_set() (in v2.6.0\zephyr\subsys\bluetooth\controller\ll_sw\nordic\lll\lll.c) but it seems no work.

Parents
  • Hello,

    The 2.6.x version of the Audio application is sensitive for RF noise. This commit provides a fix: https://github.com/nrfconnect/sdk-nrf/pull/15627/commits/ca49be4f3482cc33579d214a98fa6e4c119e85a0

    The fix is part of NCS 2.7.0-rc1 if you want to upgrade to a tagged release instead of cherry-picking the commit with the fix. It is also in NCS main.

    Best regards,

    Maria

  • Hi,

    I went through the correction section you shared with me, but it just seems to lengthen the timer of synchronising to synced , making it easier to get to synced state. But I still want to find a function to set the channel so that the current scan channel can be printed in real time. The lll_chan_set() function I found is located “in v2.6.0\zephyr\subsys\bluetooth\controller\ll_sw\nordic\lll\lll.c”, but it doesn't seem to be involved in the compilation process. Is the LL layer of the application located in the “v2.6.0\zephyr\subsys\bluetooth\controller\ll_sw\nordic\lll\”? Or where is the LL code?

    Thanks.

  • Hi,

    When it comes to getting an understanding of LE Audio I hope you've also seen this documentation with all its flow-charts and diagrams.

    My guess is that the headset failed to scan the calculated frequency hopping sequence after receiving the channel_map indicated in the AUX_ADV_IND packet. Therefore, I would like to ask for help on how to print the channel that is currently being scanned. Or maybe something else went wrong and I ignored it.

    I am not so sure that it is the channel map that is at fault here, though if you'd still like a way to look into this I will of course try to help you do that.

    liuzong said:
    But I still want to find a function to set the channel so that the current scan channel can be printed in real time

    So are you saying that you want to get the current channel or set the current channel?

    Either way though, the reason you have a difficulty finding this is that the stack NCS uses by default uses a closed source controller (the softdevice controller), which includes the Link Layer. The SDC is delivered as a binary. You are finding the LL files in the Zephyr folders though, as that is not closed source.

    Enabling the Zephyr controller is very simple (just enable CONFIG_BT_LL_SW_SPLIT), but you can't use our Audio application with the Zephyr Controller as of now, since LE Audio development is so cutting edge that what is achieved on the Zephyr Controller vs the SDC is currently a bit different. Though there are multiple Audio samples that come via Zephyr that you can have a look at (eg. this), and maybe that would be just as good if learning was your main goal.

    Regards,

    Elfving

Reply
  • Hi,

    When it comes to getting an understanding of LE Audio I hope you've also seen this documentation with all its flow-charts and diagrams.

    My guess is that the headset failed to scan the calculated frequency hopping sequence after receiving the channel_map indicated in the AUX_ADV_IND packet. Therefore, I would like to ask for help on how to print the channel that is currently being scanned. Or maybe something else went wrong and I ignored it.

    I am not so sure that it is the channel map that is at fault here, though if you'd still like a way to look into this I will of course try to help you do that.

    liuzong said:
    But I still want to find a function to set the channel so that the current scan channel can be printed in real time

    So are you saying that you want to get the current channel or set the current channel?

    Either way though, the reason you have a difficulty finding this is that the stack NCS uses by default uses a closed source controller (the softdevice controller), which includes the Link Layer. The SDC is delivered as a binary. You are finding the LL files in the Zephyr folders though, as that is not closed source.

    Enabling the Zephyr controller is very simple (just enable CONFIG_BT_LL_SW_SPLIT), but you can't use our Audio application with the Zephyr Controller as of now, since LE Audio development is so cutting edge that what is achieved on the Zephyr Controller vs the SDC is currently a bit different. Though there are multiple Audio samples that come via Zephyr that you can have a look at (eg. this), and maybe that would be just as good if learning was your main goal.

    Regards,

    Elfving

Children
No Data
Related