zephyrproject-rtos / zephyr

Primary Git Repository for the Zephyr Project. Zephyr is a new generation, scalable, optimized, secure RTOS for multiple hardware architectures.
https://docs.zephyrproject.org
Apache License 2.0
10.89k stars 6.64k forks source link

Bluetooth: Sysbuild broken on nrf5340 #74313

Open alwa-nordic opened 5 months ago

alwa-nordic commented 5 months ago

Bluetooth sample peripheral_hr fails bt_enable on nrf53 with sysbuild.

<wrn> bt_hci_core: opcode 0x0c33 status 0x12
Bluetooth init failed (err -22)

Cause: Value differs between images: CONFIG_BT_ACL_RX_SIZE. The 0x12 error code is returned from the controller when the host size is smaller. This is true for both ZLL and SDC.

Why are the values different?

Sysbuild overrides the config for the net core, but not for the app core. The app core uses the default value.

https://github.com/zephyrproject-rtos/zephyr/blob/d45605e6a3dfe68e43207d15e3bfc003cbfaa72f/samples/bluetooth/peripheral_hr/sysbuild.cmake#L16-L19

https://github.com/zephyrproject-rtos/zephyr/blob/9ae5352372dd9965805980e0c712612f21ed2229/samples/bluetooth/hci_ipc/nrf5340_cpunet_iso-bt_ll_sw_split.conf#L26

Not caught in tests because: There is a workaround applied specifically for bsim53 instead of fixing the issue.

https://github.com/zephyrproject-rtos/zephyr/blob/9ae5352372dd9965805980e0c712612f21ed2229/samples/bluetooth/peripheral_hr/boards/nrf5340bsim_nrf5340_cpuapp.conf#L1-L3

Expected fix: Propagate CONFIG_BT_ACL_RX_SIZE from the app to net core.

carlescufi commented 4 months ago

@nordicjm could you take a look?

nordicjm commented 4 months ago

Not a sysbuild issue, user issue. You would need to set the value in both images, sysbuild will not do that for you.

aescolar commented 3 months ago

@alwa-nordic given that you are looking into it, and that we need to assign issues to somebody, if you don't mind let's leave it a assigned to you by now, unless you have a better assignee in mind.

nordic-piks commented 2 months ago

Triaged internally

github-actions[bot] commented 2 weeks ago

This issue has been marked as stale because it has been open (more than) 60 days with no activity. Remove the stale label or add a comment saying that you would like to have the label removed otherwise this issue will automatically be closed in 14 days. Note, that you can always re-open a closed issue at any time.