unicast_audio_client/server cannot work out on PCA10040

hi, i just ran into a problem that i'm not familiar with, so I post it .I want your help and guide to clear me out if demo is supported with 2 PCA10040, or I did something unright.

Background:

I've been getting into some pre-research on  new features of BLE5.3, and I choose LE Audio. I try running  unicast_audio_client/unicast_audio_server demos with my PCA10040 boards to see how it works.

Problem description:

unicast_audio_client just crashes everytime when it goes to"k_sem_take(&sem_sink_discovered, K_FOREVER)"

static int discover_sink(void)
{
	static struct bt_audio_discover_params params;
	int err;

	params.func = discover_sink_cb;
	params.type = BT_AUDIO_SINK;
	printk("[LRF]:%s,%d\n", __func__, __LINE__);
	err = bt_audio_discover(default_conn, &params);
	if (err != 0) {
		printk("Failed to discover sink: %d\n", err);
		return err;
	}
	printk("[LRF]:%s,%d\n", __func__, __LINE__);
	err = k_sem_take(&sem_sink_discovered, K_FOREVER);
	if (err != 0) {
		printk("failed to take sem_sink_discovered (err %d)\n", err);
		return err;
	}
	printk("[LRF]:%s,%d\n", __func__, __LINE__);
	return 0;
}

 the following snapshot is the uart log of unicast_audio_client when it crashed

How to Reproduce:

Hardward: PCA10040 x 2

Software: ncs2.0.0

detail:

1. one PCA10040 runs demo unicast_audio_client(path: zephyr\samples\bluetooth), another runs  demo unicast_audio_server

2. modifications i made:

(1)add nr52dk_nrf52832.conf(path : zephyr\samples\bluetooth\unicast_audio_client\boards)-->just a copy from  nrf5340dk_nrf5340_cpuapp.conf

CONFIG_BT_CTLR_ADV_EXT=y
CONFIG_BT_CTLR_ADV_PERIODIC=y

# For LC3 the following configs are needed
CONFIG_FPU=y
CONFIG_LIBLC3CODEC=y
# The LC3 codec uses a large amount of stack. This app runs the codec in the work-queue, hence
# inctease stack size for that thread.
CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=4096
# LC3 lib requires floating point support in the c-lib NEWLIB is one way of getting that.
CONFIG_NEWLIB_LIBC=y

(2)add nr52dk_nrf52832.conf(path : zephyr\samples\bluetooth\unicast_audio_server\boards)-->just a copy from  nrf52840dk_nrf52840.conf

CONFIG_BT_CTLR_ADV_EXT=y
CONFIG_BT_CTLR_ADV_PERIODIC=y

Parents
  • Hello BigJim,

    I have successfully reproduced your errors. I believe this is a compatibility issue. The audio codec requires a lot of processing power, and is not suited for nRF52832. Additional information can be found in this answer to an older case.

    We don't provide support for LE audio development for the nRF52 series. Our recommended SoC for LE audio development is nRF5340, and our recommended development hardware is the nRF5340 Audio DK.

    We also recommend using our example application nRF5340 Audio as a starting point. The application documentation linked includes detailed information on how to get started with LE Audio development on nRF5340 Audio DK.

    Best regards,

    Maria

  • thanks,Maria.

    since it's compatibility issue, I will try nrf52340 as you said.

    However,there are still 2 puzzles left.

    Q1:why in  unicast_audio_client/server samples, the server doesn't need to be configured LC3 codec related features as the client. ( from sample borads configuration files, it seems that i  can run client  on nrf5340 , server running on nrf52840 )

    Q2:my friends get nrf5340 DK ,but not nrf5340 Audio DK,just make a sure if unicast_audio_client/server samples supported with nrf5340 DK(I dont need  the audio playing,just to check out the ISO and CIS working)

Reply
  • thanks,Maria.

    since it's compatibility issue, I will try nrf52340 as you said.

    However,there are still 2 puzzles left.

    Q1:why in  unicast_audio_client/server samples, the server doesn't need to be configured LC3 codec related features as the client. ( from sample borads configuration files, it seems that i  can run client  on nrf5340 , server running on nrf52840 )

    Q2:my friends get nrf5340 DK ,but not nrf5340 Audio DK,just make a sure if unicast_audio_client/server samples supported with nrf5340 DK(I dont need  the audio playing,just to check out the ISO and CIS working)

Children
  • Hello,

    A1: In my NCS-installation, the LC3 related CONFIGs are present in the nrf5340dk_nrf5340_cpuapp.overlay file in both the server and the client. The reason its not included in the nrf52840dk_nrf52840.overlay is that the nRF52840 is not able to run the LC3 codec while also handling the radio. You would need a separate unit to run the codec on when using the nRF52840DK as the server part of the Bluetooth link.

    A2: You can use the nRF5340 DK for LE Audio. Note that you need to program the network core with the dedicated audio controller found at <ncs-installation>/nrf/applications/nrf5340_audio/bin. This is the case when using the Audio DK as well as the DK. Information on how to configure your project correctly is found in this answer from my colleague. In that ticket they use the broadcast_audio samples, but the configuration should be the same. I will test it on my end, and let you know if you need to make any changes.

    BR,

    Maria

Related