Skip to content

Commit 6c574e3

Browse files
Damian-Nordicnordicjm
authored andcommitted
samples: nrf_rpc: ps_client: fix BLE snippet after upmerge
The upmerge PR enabled BT_HCI for the protocols serialization client sample, but the point of this sample is to use BT_RPC_STACK, which enables RPC serialization of Bluetooth host APIs, instead of the entire HCI-based stack. Restore the previous behavior and add necessary workarounds to enable Bluetooth shell commands despite of not using the HCI-based host implementation. Signed-off-by: Damian Krolik <damian.krolik@nordicsemi.no>
1 parent 915921d commit 6c574e3

File tree

3 files changed

+13
-2
lines changed

3 files changed

+13
-2
lines changed

samples/nrf_rpc/protocols_serialization/client/snippets/ble/ble.conf

+1-2
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,7 @@ CONFIG_BT_DEVICE_NAME="Nordic_UART_Service"
1616
CONFIG_BT_DEVICE_APPEARANCE=833
1717
CONFIG_BT_MAX_CONN=1
1818
CONFIG_BT_MAX_PAIRED=1
19-
CONFIG_BT_CTLR=n
20-
CONFIG_BT_HCI=y
19+
CONFIG_BT_LL_SOFTDEVICE=n
2120
CONFIG_BT_SHELL=y
2221

2322
# Enable the NUS service

subsys/bluetooth/rpc/CMakeLists.txt

+5
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,8 @@ add_subdirectory(common)
1212
add_subdirectory_ifdef(CONFIG_BT_RPC_CLIENT client)
1313
add_subdirectory_ifdef(CONFIG_BT_RPC_HOST host)
1414
add_subdirectory(soc)
15+
16+
# Host shell commands are only included in Zephyr for BT_HCI, the default stack implementation that
17+
# is mutually exclusive with BT_RPC_STACK, so the commands must be pulled in manually to make them
18+
# work with the RPC-based stack.
19+
add_subdirectory_ifdef(CONFIG_BT_SHELL ${ZEPHYR_BASE}/subsys/bluetooth/host/shell host/shell)

subsys/bluetooth/rpc/Kconfig

+7
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,13 @@ if BT_RPC_CLIENT
7272
config HEAP_MEM_POOL_SIZE
7373
default 4096
7474

75+
# BT_SHELL config in Zephyr depends on BT_HCI, the default stack implementation that is mutually
76+
# exclusive with BT_RPC_STACK, so this config must be duplicated to make shell commands work with
77+
# the RPC-based stack.
78+
config BT_SHELL
79+
bool "Bluetooth shell"
80+
select SHELL
81+
7582
endif # BT_RPC_CLIENT
7683

7784
if BT_RPC_HOST

0 commit comments

Comments
 (0)