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.

Related